-
Notifications
You must be signed in to change notification settings - Fork 2
vectorstore_PGVector
Mehraneh-Barani edited this page Jul 26, 2024
·
1 revision
class PGVectorStore(host, port, dbname, user, password, collection_name, embedding)
Bases: VectorStore
A concrete implementation of VectorStoreBase using PostgreSQL for storage.
Attributes:
db (PGVector): The PostgreSQL vector store.
add_document(docs)
Adds documents to the PostgreSQL vector store.
Args:
docs: The documents to be added to the vector store.
retrieve(query, top_k=5)
Retrieves documents similar to the given query from the PostgreSQL vector store.
Args:
- query (str): The query to retrieve similar documents.
- top_k (int, optional): The number of top similar documents to retrieve. Defaults to 5.
Returns:
Tuple[List[str], List[float]]: The context and scores of the retrieved documents.
- Home
- Getting Started
-
Components
- LLMs
- Document Loader:
- Spliter:
- Embeddings Model:
- Vector Store:
- Usecases: