# Connect to a Zilliz instance
milvus_store = Milvus(
embedding_function = embedding,
collection_name = “LangChainCollection”,
connection_args = {
“uri”: “https://in03-ba4234asae.api.gcp-us-west1.zillizcloud.com”,
“user”: “temp”,
“password”: “temp”,
“token”: “temp”, # API key as replacements for user and password
“secure”: True
}
drop_old: True,
)
Raises
ValueError – If the pymilvus python package is not installed.
Initialize the Milvus vector store.
Attributes
embeddings
Access the query embedding object if available.
Methods
__init__(embedding_function[, ...])
Initialize the Milvus vector store.
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, timeout, ...])
Insert text data into Milvus.
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.
amax_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.
as_retriever(**kwargs)
Return VectorStoreRetriever initialized from this VectorStore.