Return docs most similar to embedding vector.
async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs most similar to query.
delete(ids: Optional[List[str]] = None, **kwargs: Any) → Any[source]¶
Delete by vector IDs or filter.
:param ids: List of ids to delete.
classmethod from_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶
Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, text_key: str = 'text', index_name: Optional[str] = None, client: Any = None, host: List[str] = ['172.20.31.10:13000'], user: str = 'root', password: str = '123123', batch_size: int = 500, **kwargs: Any) → Dingo[source]¶
Construct Dingo wrapper from raw documents.
This is a user friendly interface that:
Embeds documents.
Adds the documents to a provided Dingo index
This is intended to be a quick way to get started.
Example:from langchain.vectorstores import Dingo
from langchain.embeddings import OpenAIEmbeddings
import dingodb
sssembeddings = OpenAIEmbeddings()
dingo = Dingo.from_texts(
texts,
embeddings,
index_name=”langchain-demo”
)