You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/partners/qdrant
Anush e002c855bd
qdrant[patch]: Use collection_exists API instead of exceptions (#22764)
## Description

Currently, the Qdrant integration relies on exceptions raised by
[`get_collection`
](https://qdrant.tech/documentation/concepts/collections/#collection-info)
to check if a collection exists.

Using
[`collection_exists`](https://qdrant.tech/documentation/concepts/collections/#check-collection-existence)
is recommended to avoid missing any unhandled exceptions. This PR
addresses this.

## Testing
All integration and unit tests pass. No user-facing changes.
3 months ago
..
langchain_qdrant qdrant[patch]: Use collection_exists API instead of exceptions (#22764) 3 months ago
scripts qdrant: init package (#21146) 4 months ago
tests qdrant: init package (#21146) 4 months ago
.gitignore qdrant: init package (#21146) 4 months ago
LICENSE qdrant: init package (#21146) 4 months ago
Makefile qdrant: init package (#21146) 4 months ago
README.md qdrant: init package (#21146) 4 months ago
poetry.lock qdrant[patch]: Use collection_exists API instead of exceptions (#22764) 3 months ago
pyproject.toml qdrant[patch]: Use collection_exists API instead of exceptions (#22764) 3 months ago

README.md

langchain-qdrant

This package contains the LangChain integration with Qdrant.

Installation

pip install -U langchain-qdrant

Usage

The Qdrant class exposes the connection to the Qdrant vector store.

from langchain_qdrant import Qdrant

embeddings = ... # use a LangChain Embeddings class

vectorstore = Qdrant.from_existing_collection(
    embeddings=embeddings,
    collection_name="<COLLECTION_NAME>",
    url="http://localhost:6333",
)