langchain.vectorstores.vald.Vald¶
class langchain.vectorstores.vald.Vald(embedding: Embeddings, host: str = 'localhost', port: int = 8080, grpc_options: Tuple = (('grpc.keepalive_time_ms', 10000), ('grpc.keepalive_timeout_ms', 10000)))[source]¶
Wrapper around Vald vector database.
To use, you should have the vald-client-python python package installed.
Example
from langchain.embeddings import HuggingFaceEmbeddings
from langchain.vectorstores import Vald
texts = ['foo', 'bar', 'baz']
vald = Vald.from_texts(
    texts=texts,
    embedding=HuggingFaceEmbeddings(),
    host="localhost",
    port=8080,
    skip_strict_exist_check=False,
 )
Attributes
embeddings
Access the query embedding object if available.
Methods
__init__(embedding[, host, port, grpc_options])
aadd_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
aadd_texts(texts[, metadatas])
Run more texts through the embeddings and add to the vectorstore.
add_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
add_texts(texts[, metadatas, ...])
param skip_strict_exist_check
Deprecated. This is not used basically.
afrom_documents(documents, embedding, **kwargs)
Return VectorStore initialized from documents and embeddings.
afrom_texts(texts, embedding[, metadatas])
Return VectorStore initialized from texts and embeddings.
amax_marginal_relevance_search(query[, k, ...])
Return docs selected using the maximal marginal relevance.