-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Description
Checked other resources
- This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
- I added a clear and descriptive title that summarizes this issue.
- I used the GitHub search to find a similar question and didn't find it.
- I am sure that this is a bug in LangChain rather than my code.
- The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
- I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
- I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.
Example Code
# pip install langchain-qdrant==0.1.4
# pip install fastembed==0.4.1
# pip install langchain-community==0.2.17
from qdrant_client import QdrantClient, AsyncQdrantClient
from langchain_qdrant import QdrantVectorStore
from langchain_community.embeddings import FastEmbedEmbeddings
client = AsyncQdrantClient(path="foo") # QdrantClient works, I know
embedding = FastEmbedEmbeddings()
vs = QdrantVectorStore(client=client, collection_name="foo", embedding=embedding)Error Message and Stack Trace (if applicable)
vector_config = collection_info.config.params.vectors
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'coroutine' object has no attribute 'config'
sys:1: RuntimeWarning: coroutine 'AsyncQdrantClient.get_collection' was never awaited
Description
- I am trying to use langchain's support for a vector store using async calls so that the Python VM does not get blocked in these I/O calls (FastAPI with qdrant here)
- Qdrant has the async client
- https://github.com/langchain-ai/langchain/discussions/24772 implies that all async methods are there in QdrantVectorStore
- Unfortunately we can see that the constructor can only take QdrantClient and not AsyncQdrantClient
- If I try to sneak AsyncQdrantClient as "client" (see code snippet), the constructor will explode when it calls validation helpers
Maybe a class AsyncQdrantVectorStore is needed? Or maybe QdrantVectorStore could take client: QdrantClient|AsyncQdrantClient ? (In the latter case, internal methods would need to test & call the appropriate helper).
Did I miss anything wrt async vector store usage or is it really a bug?
System Info
System Information
OS: Darwin
OS Version: Darwin Kernel Version 23.6.0: Thu Apr 24 20:29:27 PDT 2025; root:xnu-10063.141.1.705.2~1/RELEASE_ARM64_T6030
Python Version: 3.11.10 (main, Sep 7 2024, 01:03:31) [Clang 15.0.0 (clang-1500.3.9.4)]
Package Information
langchain_core: 0.2.43
langchain: 0.2.17
langchain_community: 0.2.17
langsmith: 0.1.147
langchain_anthropic: 0.1.15
langchain_elasticsearch: 0.2.2
langchain_experimental: 0.0.65
langchain_google_community: 1.0.8
langchain_google_genai: 1.0.6
langchain_google_vertexai: 1.0.6
langchain_groq: 0.1.5
langchain_openai: 0.1.22
langchain_qdrant: 0.2.0
langchain_text_splitters: 0.2.4
langgraph: 0.2.17
Optional packages not installed
langserve
Other Dependencies
aiohttp: 3.11.8
anthropic: 0.40.0
anthropic[vertexai]: Installed. No version info available.
async-timeout: Installed. No version info available.
beautifulsoup4: 4.12.2
dataclasses-json: 0.6.7
db-dtypes: Installed. No version info available.
defusedxml: 0.7.1
elasticsearch[vectorstore-mmr]: Installed. No version info available.
fastembed: 0.7.1
gapic-google-longrunning: Installed. No version info available.
google-api-core: 2.23.0
google-api-python-client: 2.131.0
google-auth-httplib2: 0.2.0
google-auth-oauthlib: 1.2.1
google-cloud-aiplatform: 1.73.0
google-cloud-bigquery: 3.27.0
google-cloud-bigquery-storage: Installed. No version info available.
google-cloud-contentwarehouse: Installed. No version info available.
google-cloud-discoveryengine: Installed. No version info available.
google-cloud-documentai: Installed. No version info available.
google-cloud-documentai-toolbox: Installed. No version info available.
google-cloud-speech: Installed. No version info available.
google-cloud-storage: 2.18.2
google-cloud-texttospeech: Installed. No version info available.
google-cloud-translate: Installed. No version info available.
google-cloud-vision: Installed. No version info available.
google-generativeai: 0.5.4
googlemaps: Installed. No version info available.
groq: 0.13.0
grpcio: 1.68.0
httpx: 0.27.2
jsonpatch: 1.33
langgraph-checkpoint: 1.0.12
langsmith-pyo3: Installed. No version info available.
numpy: 1.26.4
openai: 1.41.1
orjson: 3.10.12
packaging: 24.2
pandas: 1.5.3
pillow: 10.4.0
pyarrow: Installed. No version info available.
pydantic: 2.10.2
PyYAML: 6.0.2
qdrant-client: 1.14.3
requests: 2.31.0
requests-toolbelt: 1.0.0
SQLAlchemy: 2.0.31
tenacity: 8.3.0
tiktoken: 0.7.0
typing-extensions: 4.12.2