qdrant_retriever#
Leverage a Qdrant collection to retrieve documents.
Classes
|
Use a Qdrant collection to retrieve documents. |
- class QdrantRetriever(collection_name: str, client: QdrantClient, embedder: Embedder, top_k: int | None = 10, vector_name: str | None = None, text_key: str = 'text', metadata_key: str = 'meta_data', filter: Filter | None = None)[source]#
Bases:
Retriever
[Any
,str
]Use a Qdrant collection to retrieve documents.
- Parameters:
collection_name (str) – the collection name in Qdrant.
client (QdrantClient) – An instance of qdrant_client.QdrantClient.
embedder (Embedder) – An instance of Embedder.
top_k (Optional[int], optional) – top k documents to fetch. Defaults to 10.
vector_name (Optional[str], optional) – the name of the vector in the collection. Defaults to None.
text_key (str, optional) – the key in the payload that contains the text. Defaults to “text”.
metadata_key (str, optional) – the key in the payload that contains the metadata. Defaults to “meta_data”.
filter (Optional[models.Filter], optional) – the filter to apply to the query. Defaults to None.
References: [1] Qdrant: https://qdrant.tech/ [2] Documentation: https://qdrant.tech/documentation/