Returns
List of Tuples of (doc, similarity_score)
async asimilarity_search_with_score(*args: Any, **kwargs: Any) → List[Tuple[Document, float]]¶
Run similarity search with distance asynchronously.
consolidate_updates(**kwargs: Any) → None[source]¶
classmethod create(index_uri: str, index_type: str, dimensions: int, vector_type: dtype, *, metadatas: bool = True, config: Optional[Mapping[str, Any]] = None) → None[source]¶
delete(ids: Optional[List[str]] = None, timestamp: int = 0, **kwargs: Any) → Optional[bool][source]¶
Delete by vector ID or other criteria.
Parameters
ids – List of ids to delete.
timestamp – Optional timestamp to delete with.
**kwargs – Other keyword arguments that subclasses might use.
Returns
True if deletion is successful,
False otherwise, None if not implemented.
Return type
Optional[bool]
classmethod from_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶
Return VectorStore initialized from documents and embeddings.
classmethod from_embeddings(text_embeddings: List[Tuple[str, List[float]]], embedding: Embeddings, index_uri: str, *, metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, metric: str = 'euclidean', index_type: str = 'FLAT', config: Optional[Mapping[str, Any]] = None, index_timestamp: int = 0, **kwargs: Any) → TileDB[source]¶
Construct TileDB index from embeddings.
Parameters
text_embeddings – List of tuples of (text, embedding)
embedding – Embedding function to use.
index_uri – The URI to write the TileDB arrays
metadatas – List of metadata dictionaries to associate with documents.