Spaces:
Sleeping
Sleeping
File size: 847 Bytes
01543cd 333cede 01543cd 333cede 01543cd 333cede 01543cd 6e2e53b 01543cd 333cede 01543cd 6e2e53b 333cede 6e2e53b 29de744 d604f12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | """Centralized configuration for the FAQ API."""
import os
from pathlib import Path
# Directories
BASE_DIR: Path = Path(__file__).parent
DATA_DIR: Path = BASE_DIR / "data"
# FAQ JSON file path
FAQ_JSON_PATH: str = str(DATA_DIR / "260717_FAQ_Miss_Terry_developpeur.json")
# Embedding configuration
MODEL_NAME: str = os.getenv("MODEL_NAME", "intfloat/multilingual-e5-small")
# ChromaDB configuration
CHROMA_COLLECTION_NAME: str = "faq"
# Similarity configuration
SIMILARITY_THRESHOLD: float = float(os.getenv("SIMILARITY_THRESHOLD", "0.85"))
TOP_K = 3
CROSS_ENCODER_MODEL_NAME = "cross-encoder/ms-marco-MiniLM-L6-v2"
CROSS_ENCODEUR_GAP_THRESHOLD: float = float(os.getenv("CROSS_ENCODEUR_GAP_THRESHOLD", "0.10"))
CROSS_ENCODEUR_CONFIDENCE_THRESHOLD: float = float(os.getenv("CROSS_ENCODEUR_CONFIDENCE_THRESHOLD", "0.80")) |