File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,11 @@ def __init__(
38
38
39
39
self .embedding_provider = create_embedding_provider (embedding_provider_settings )
40
40
self .qdrant_connector = QdrantConnector (
41
- qdrant_settings .location or qdrant_settings . local_path ,
41
+ qdrant_settings .location ,
42
42
qdrant_settings .api_key ,
43
43
qdrant_settings .collection_name ,
44
44
self .embedding_provider ,
45
+ qdrant_settings .local_path ,
45
46
)
46
47
47
48
super ().__init__ (name = name , instructions = instructions , ** settings )
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ class QdrantConnector:
29
29
:param collection_name: The name of the default collection to use. If not provided, each tool will require
30
30
the collection name to be provided.
31
31
: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.
32
33
"""
33
34
34
35
def __init__ (
@@ -37,12 +38,15 @@ def __init__(
37
38
qdrant_api_key : str | None ,
38
39
collection_name : str | None ,
39
40
embedding_provider : EmbeddingProvider ,
41
+ qdrant_local_path : str | None = None ,
40
42
):
41
43
self ._qdrant_url = qdrant_url .rstrip ("/" ) if qdrant_url else None
42
44
self ._qdrant_api_key = qdrant_api_key
43
45
self ._default_collection_name = collection_name
44
46
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
+ )
46
50
47
51
async def get_collection_names (self ) -> list [str ]:
48
52
"""
You can’t perform that action at this time.
0 commit comments