similarity_search(query[, k])
Run similarity search using Clarifai.
similarity_search_by_vector(embedding[, k])
Return docs most similar to embedding vector.
similarity_search_with_relevance_scores(query)
Return docs and relevance scores in the range [0, 1].
similarity_search_with_score(query[, k, ...])
Run similarity search with score using Clarifai.
__init__(user_id: Optional[str] = None, app_id: Optional[str] = None, pat: Optional[str] = None, number_of_docs: Optional[int] = None, api_base: Optional[str] = None) → None[source]¶
Initialize with Clarifai client.
Parameters
user_id (Optional[str], optional) – User ID. Defaults to None.
app_id (Optional[str], optional) – App ID. Defaults to None.
pat (Optional[str], optional) – Personal access token. Defaults to None.
number_of_docs (Optional[int], optional) – Number of documents to return
None. (during vector search. Defaults to) – 
api_base (Optional[str], optional) – API base. Defaults to None.
Raises
ValueError – If user ID, app ID or personal access token is not provided.
async aadd_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documents through the embeddings and add to the vectorstore.
Parameters
(List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added texts.
Return type
List[str]
async aadd_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str]¶
Run more texts through the embeddings and add to the vectorstore.