0.0.2 • Published 4 months ago

langchain-turbopuffer v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

LangChainJS x TurboPuffer

This is a 3rd party integration of TurboPuffer as a Vector Store class into the LangChain ecosystem.

Turbopuffer is a vector store built ontop of object storage so it is remarkably cheap and scalable.

Python is always going to come first as an official version so I thought I'd make a JS version for the community.

Installation

npm install langchain-turbopuffer

or if you use pnpm

pnpm install langchain-turbopuffer

Usage

import { TurboPufferVectorStore } from "langchain-turbopuffer";

const embeddings = new OpenAIEmbeddings();

const vectorStore = new TurboPufferVectorStore(embeddings);

const doc = new Document({
  pageContent: "This is a test",
  metadata: {
    source: "https://example.com",
  },
});

await vectorStore.addDocuments([doc]);

Contribute to the project

This is a community project, so feel free to contribute to it and bring up any issues. If you have any questions, please contact me on the Turbopuffer Slack.