Features: - AsyncQdrantClient for non-blocking Qdrant operations - Singleton pattern for QdrantService - Monthly full curation (day 1 at 03:00) - Configurable UID/GID for Docker - Timezone support via TZ env var - Configurable log directory (VERA_LOG_DIR) - Volume mounts for config/, prompts/, logs/ - Standard Docker format with .env file Fixes: - Removed unused system_token_budget - Added semantic_score_threshold config - Fixed streaming response handling - Python-based healthcheck (no curl dependency)
19 lines
620 B
Python
19 lines
620 B
Python
"""Global singleton instances for Vera-AI."""
|
|
from .qdrant_service import QdrantService
|
|
from .config import config
|
|
|
|
_qdrant_service: QdrantService = None
|
|
|
|
|
|
def get_qdrant_service() -> QdrantService:
|
|
"""Get or create the global QdrantService singleton."""
|
|
global _qdrant_service
|
|
if _qdrant_service is None:
|
|
_qdrant_service = QdrantService(
|
|
host=config.qdrant_host,
|
|
collection=config.qdrant_collection,
|
|
embedding_model=config.embedding_model,
|
|
vector_size=config.vector_size,
|
|
ollama_host=config.ollama_host
|
|
)
|
|
return _qdrant_service |