UPDATE
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
کلاینت Qdrant — اتصال به دیتابیس وکتور
|
||||
"""
|
||||
from qdrant_client import QdrantClient
|
||||
from qdrant_client.http import models as qmodels
|
||||
|
||||
from .config import QdrantConfig, load_rag_config
|
||||
|
||||
|
||||
def get_qdrant_client(config: QdrantConfig | None = None) -> QdrantClient:
|
||||
"""
|
||||
ایجاد کلاینت Qdrant.
|
||||
اگر config داده نشود، از rag_config.yaml بارگذاری میشود.
|
||||
"""
|
||||
if config is None:
|
||||
rag = load_rag_config()
|
||||
config = rag.qdrant
|
||||
|
||||
return QdrantClient(host=config.host, port=config.port)
|
||||
Reference in New Issue
Block a user