Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

langchain-turbopuffer

mattzcarey15MIT0.0.2TypeScript support: included

An open source and LangChain compatible Vector Store class for Turbopuffer. Store vectors in object storage for cheap.

AI, retriever, vector store, object store, turbopuffer, langchain

readme

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.