Skip to content

Node.js library for the Tychos API

License

Notifications You must be signed in to change notification settings

ilya/tychos-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tychos Node.js Library

The Tychos Node.js library provides convenient access to the Tychos API from applications written in JavaScript and TypeScript. The Tychos API allows you to query live, hosted vector datasets in your LLM application without needing to manage your own vector database / embedding pipelines.

To see the Tychos API in action, you can test out our PubMed Demo App.

Note: this library is meant for server-side usage only

Installation

You don't need this source code unless you want to modify the package. If you just want to use the package, just run:

npm install tychos

Requirements

  • Node.js 12 or higher

Usage

The library needs to be configured with your account's secret key which is available via the Tychos Website. Set tychos.apiKey to its value:

const { VectorDataStore } = require('tychos');
const apiKey = "sk_test_12345";

Query live vector datasets:

// initialize data store with API key
const tychos = new VectorDataStore(apiKey);

// list available datasets
const datasets = tychos.list()

// get name of the first dataset
console.log(datasets.data[0].name)

// query the data store object
const queryResults = tychos.query({
    name: "pub-med-abstracts",
    queryString: "What is the latest research on molecular peptides",
    limit: 5
})

// print the metadata associated with the first result
console.log(queryResults[0].payload);

Datasets available

We currently support a handful of research datasets. If there's a particular dataset you'd like to incorporate into your LLM application, feel free to reach out.

Vector datasets

  • PubMed abstracts (source): 33.2M documents, updated daily at 07:00 UTC.

Feedback and support

If you'd like to provide feedback, run into issues, or need support using embeddings, feel free to reach out or raise an issue via GitHub.

About

Node.js library for the Tychos API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%