This repository contains the langchain-turbopuffer integration package for LangChain.
turbopuffer is a fast, cost-efficient vector database. This package provides a TurbopufferVectorStore class that integrates with LangChain's vector store interface.
pip install langchain-turbopufferfrom langchain_turbopuffer import TurbopufferVectorStore
from langchain_openai import OpenAIEmbeddings
from turbopuffer import Turbopuffer
tpuf = Turbopuffer(
# Pick the right region https://turbopuffer.com/docs/regions
region="gcp-us-central1",
# This is the default and can be omitted
api_key=os.environ.get("TURBOPUFFER_API_KEY"),
)
ns = tpuf.namespace("example")
vector_store = TurbopufferVectorStore(
namespace=ns,
embedding=OpenAIEmbeddings(),
)See libs/langchain-turbopuffer/ for the package source.