Skip to content

Commit e685191

Browse files
committed
feat: Add HTTPS support for Qdrant connection configuration
1 parent 7726266 commit e685191

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

app/Services/vector_db_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(self):
3333
case QdrantMode.SERVER:
3434
self._client = AsyncQdrantClient(host=config.qdrant.host, port=config.qdrant.port,
3535
grpc_port=config.qdrant.grpc_port, api_key=config.qdrant.api_key,
36-
prefer_grpc=config.qdrant.prefer_grpc)
36+
prefer_grpc=config.qdrant.prefer_grpc, https=config.qdrant.https)
3737
wrap_object(self._client, retry_async((AioRpcError, HTTPError)))
3838
case QdrantMode.LOCAL:
3939
self._client = AsyncQdrantClient(path=config.qdrant.local_path)

app/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class QdrantSettings(BaseModel):
2323
coll: str = 'NekoImg'
2424
prefer_grpc: bool = True
2525
api_key: str | None = None
26+
https: bool | None = None
2627

2728
local_path: str = './images_metadata'
2829

config/default.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
# APP_QDRANT__API_KEY=
2626
# Collection name to use in Qdrant
2727
# APP_QDRANT__COLL="NekoImg"
28+
# Set to True if you want to use SSL for qdrant connection
29+
# APP_QDRANT__HTTPS=
2830

2931
# Local Qdrant File Configuration
3032
# Path to the file where vectors will be stored

0 commit comments

Comments
 (0)