Skip to content

Commit d4978a1

Browse files
committed
fix: revert removal of local path
1 parent 9471fea commit d4978a1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/mcp_server_qdrant/mcp_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ def __init__(
3838

3939
self.embedding_provider = create_embedding_provider(embedding_provider_settings)
4040
self.qdrant_connector = QdrantConnector(
41-
qdrant_settings.location or qdrant_settings.local_path,
41+
qdrant_settings.location,
4242
qdrant_settings.api_key,
4343
qdrant_settings.collection_name,
4444
self.embedding_provider,
45+
qdrant_settings.local_path,
4546
)
4647

4748
super().__init__(name=name, instructions=instructions, **settings)

src/mcp_server_qdrant/qdrant.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class QdrantConnector:
2929
:param collection_name: The name of the default collection to use. If not provided, each tool will require
3030
the collection name to be provided.
3131
:param embedding_provider: The embedding provider to use.
32+
:param qdrant_local_path: The path to the storage directory for the Qdrant client, if local mode is used.
3233
"""
3334

3435
def __init__(
@@ -37,12 +38,15 @@ def __init__(
3738
qdrant_api_key: str | None,
3839
collection_name: str | None,
3940
embedding_provider: EmbeddingProvider,
41+
qdrant_local_path: str | None = None,
4042
):
4143
self._qdrant_url = qdrant_url.rstrip("/") if qdrant_url else None
4244
self._qdrant_api_key = qdrant_api_key
4345
self._default_collection_name = collection_name
4446
self._embedding_provider = embedding_provider
45-
self._client = AsyncQdrantClient(location=qdrant_url, api_key=qdrant_api_key)
47+
self._client = AsyncQdrantClient(
48+
location=qdrant_url, api_key=qdrant_api_key, path=qdrant_local_path
49+
)
4650

4751
async def get_collection_names(self) -> list[str]:
4852
"""

0 commit comments

Comments
 (0)