langchain.vectorstores.qdrant.Qdrant¶
class langchain.vectorstores.qdrant.Qdrant(client: Any, collection_name: str, embeddings: Optional[Embeddings] = None, content_payload_key: str = 'page_content', metadata_payload_key: str = 'metadata', distance_strategy: str = 'COSINE', vector_name: Optional[str] = None, embedding_function: Optional[Callable] = None)[source]¶
Qdrant vector store.
To use you should have the qdrant-client package installed.
Example
from qdrant_client import QdrantClient
from langchain.vectorstores import Qdrant
client = QdrantClient()
collection_name = "MyCollection"
qdrant = Qdrant(client, collection_name, embedding_function)
Initialize with necessary components.
Attributes
CONTENT_KEY
METADATA_KEY
VECTOR_NAME
embeddings
Access the query embedding object if available.
Methods
__init__(client, collection_name[, ...])
Initialize with necessary components.
aadd_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
aadd_texts(texts[, metadatas, ids, batch_size])
Run more texts through the embeddings and add to the vectorstore.
aconstruct_instance(texts, embedding[, ...])
add_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
add_texts(texts[, metadatas, ids, batch_size])
Run more texts through the embeddings and add to the vectorstore.
afrom_documents(documents, embedding, **kwargs)
Return VectorStore initialized from documents and embeddings.
afrom_texts(texts, embedding[, metadatas, ...])