NeuralDBClientVectorStore(
self,
db: ndb.NeuralDBClient,
)| Name | Type |
|---|---|
| db | ndb.NeuralDBClient |
Vectorstore that uses ThirdAI's NeuralDB Enterprise Python Client for NeuralDBs.
To use, you should have the thirdai[neural_db] python package installed.
Example:
.. code-block:: python
from langchain_community.vectorstores import NeuralDBClientVectorStore from thirdai.neural_db import ModelBazaar, NeuralDBClient
bazaar = ModelBazaar(base_url="http://{NEURAL_DB_ENTERPRISE_IP}/api/") bazaar.log_in(email="user@thirdai.com", password="1234")
ndb_client = NeuralDBClient( deployment_identifier="user/model-0:user/deployment-0", base_url="http://{NEURAL_DB_ENTERPRISE_IP}/api/", bazaar=bazaar ) vectorstore = NeuralDBClientVectorStore(db=ndb_client) retriever = vectorstore.as_retriever(search_kwargs={'k':5})
NeuralDB Client instance
Retrieve {k} contexts with for a given query
Inserts documents into the VectorStore and return the corresponding Sources.
Deletes documents from the VectorStore using source ids.