Why does Qdrant client fail to create a collection when connecting to a Docker instance but works locally with a path? #5282
anusonawane
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the RetrieveUserProxyAgent from AutoGen with Qdrant as the vector database.
When initializing the Qdrant client locally via
**QdrantClient(path="qdrant_db")**, the collection is created successfully.However, when connecting to a Qdrant Docker instance using
**QdrantClient(url="http://localhost:6333")**,it throws a 404 Not Found error indicating the collection autogen-docs doesn't exist, despite get_or_create=True in the configuration.
Reproducible Code:
`from autogen import RetrieveUserProxyAgent, AssistantAgent
from qdrant_client import QdrantClient
import chromadb.utils.embedding_functions as embedding_functions
google_ef = embedding_functions.GoogleGenerativeAiEmbeddingFunction(api_key="your-api-key")
client = QdrantClient(url="http://localhost:6333") # Fails with Docker # client = QdrantClient(path="qdrant_db") # Works locally
ragproxyagent = RetrieveUserProxyAgent(
name="ragproxyagent",
retrieve_config={
"task": "code",
"docs_path": "docs.json",
"chunk_token_size": 2000,
"embedding_function": google_ef,
"db_config": {"client": client},
"vector_db": "qdrant",
"get_or_create": True, # Should create collection if missing
"overwrite": False,
},
)
ragproxyagent.initiate_chat(AssistantAgent(name="assistant"), problem="Sample problem")`
Error:
qdrant_client.http.exceptions.UnexpectedResponse: Unexpected Response: 404 (Not Found) Raw response content: b'{"status":{"error":"Not found: Collectionautogen-docsdoesn\'t exist!"},"time":0.000015598}'Qdrant Docker command: docker run -p 6333:6333 qdrant/qdrant
Expected Behavior:
The collection autogen-docs should be created automatically when get_or_create=True (as it does with the local path client).
Beta Was this translation helpful? Give feedback.
All reactions