Add list of text along with embeddings to the vector store
Parameters
texts (Iterable[str]) – collection of text to add to the database
Returns
List of ids for the newly inserted documents
async adelete(ids: Optional[List[str]] = None, **kwargs: Any) → Optional[bool][source]¶
Delete by document ID asynchronously.
Parameters
ids – List of ids to delete.
**kwargs – Other keyword arguments that subclasses might use.
Returns
True if deletion is successful,
False otherwise.
Return type
Optional[bool]
async classmethod afrom_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶
Return VectorStore initialized from documents and embeddings.
async classmethod afrom_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, **kwargs: Any) → SurrealDBStore[source]¶
Create SurrealDBStore from list of text asynchronously
Parameters
texts (List[str]) – list of text to vectorize and store
embedding (Optional[Embeddings]) – Embedding function.
dburl (str) – SurrealDB connection url
(default: “ws://localhost:8000/rpc”)
ns (str) – surrealdb namespace for the vector store.
(default: “langchain”)
db (str) – surrealdb database for the vector store.
(default: “database”)
collection (str) – surrealdb collection for the vector store.
(default: “documents”)
db_pass ((optional) db_user and) – surrealdb credentials
Returns
SurrealDBStore object initialized and ready for use.