Vector stores
A vector store stores embedded data and performs similarity search.
Select embedding model:
Select embeddings model:
pip install -qU langchain-openai
import getpass
import os
if not os.environ.get("OPENAI_API_KEY"):
os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter API key for OpenAI: ")
from langchain_openai import OpenAIEmbeddings
embeddings = OpenAIEmbeddings(model="text-embedding-3-large")
Select vector store:
Select vector store:
pip install -qU langchain-core
from langchain_core.vectorstores import InMemoryVectorStore
vector_store = InMemoryVectorStore(embeddings)
Vectorstore | Delete by ID | Filtering | Search by Vector | Search with score | Async | Passes Standard Tests | Multi Tenancy | IDs in add Documents |
---|---|---|---|---|---|---|---|---|
AstraDBVectorStore | โ | โ | โ | โ | โ | โ | โ | โ |
Chroma | โ | โ | โ | โ |