-
Notifications
You must be signed in to change notification settings - Fork 2
Vector_Store
Indox supports three vector stores for document retrieval: Postgres using pgvector, Chroma, and Faiss. This section provides an overview of the base vector store class and detailed instructions for configuring and using each supported vector store.
To use pgvector as the vector store, users need to install pgvector and set the database address.
- host (str): The host of the PostgreSQL database.
- port (int): The port of the PostgreSQL database.
- dbname (str): The name of the database.
- user (str): The user for the PostgreSQL database.
- password (str): The password for the PostgreSQL database.
- collection_name (str): The name of the collection in the database.
- embedding (Embedding): The embedding to be used.
For instructions on installing pgvector, refer to the pgvector installation guide.
from indox.vector_stores import PGVectorStore
db = PGVectorStore(host="host",port=port,dbname="dbname",user="username",password="password",collection_name="sample",embedding=embed)Connect to the vector store:
Indox.connect_to_vectorstore(db)Store documents in the vector store:
Indox.store_in_vectorstore(docs=docs)To use chroma as the vector store, users need to install Chroma and set the collection_name of database and embedding model.
- collection_name (str): The name of the collection in the database.
- embedding (Embedding): The embedding to be used.
For instructions on installing chroma, refer to the chroma installation guide.
from indox.vector_stores import ChromaVectorStore
db = ChromaVectorStore(collection_name="name",embedding=embed)Connect to the vector store:
Indox.connect_to_vectorstore(db)Store documents in the vector store:
Indox.store_in_vectorstore(docs=docs)To use Faiss as the vector store, users need to install faiss and set the embedding model.
- embedding (Embedding): The embedding to be used.
For instructions on installing faiss, refer to the FAISS installation guide.
from indox.vector_stores import FAISSVectorStore
db = FAISSVectorStore(embedding=embed)Connect to the vector store:
Indox.connect_to_vectorstore(db)Store documents in the vector store:
Indox.store_in_vectorstore(docs=docs)- Home
- Getting Started
-
Components
- LLMs
- Document Loader:
- Spliter:
- Embeddings Model:
- Vector Store:
- Usecases: