Add Qdrant and ChromaDB support to the project

- Added Qdrant service to both docker-compose files for production and development.
- Updated environment variables in .env.example and settings.py to include Qdrant configuration.
- Included necessary dependencies for Qdrant and ChromaDB in requirements.txt.
- Updated .gitignore to exclude ChromaDB data files.
This commit is contained in:
2026-02-27 19:37:02 +03:30
parent 9ec0807d3c
commit 197f70ee12
36 changed files with 1199 additions and 0 deletions
+19
View File
@@ -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)