Spaces:
Running
Running
| # ====== RUNTIME APP (FastAPI / Uvicorn) ====== | |
| PORT=7860 | |
| # ====== EMBEDDINGS: ORCHESTRATION ====== | |
| # Ordre des backends d'embeddings à essayer. DeepInfra d'abord pour débloquer l'indexation. | |
| EMB_BACKEND_ORDER=deepinfra,hf | |
| VECTOR_STORE=memory | |
| # Autoriser l'auto-fallback vers DeepInfra si HF route vers SentenceSimilarity | |
| ALLOW_DI_AUTOFALLBACK=true | |
| # Timeouts & retries | |
| EMB_TIMEOUT_SEC=120 | |
| EMB_RETRY_MAX=6 | |
| EMB_RETRY_BASE=1.5 | |
| EMB_RETRY_JITTER=0.35 | |
| # ====== DEEPINFRA (OpenAI-compatible Embeddings) ====== | |
| # ✅ Endpoint OpenAI-compatible (embeddings) | |
| DEEPINFRA_EMBED_URL=https://api.deepinfra.com/v1/openai/embeddings | |
| # ✅ Modèle d'embeddings disponible sur DeepInfra (multilingue & robuste) | |
| DEEPINFRA_EMBED_MODEL=BAAI/bge-m3 | |
| # ⛔️ SECRET à définir dans "Variables and secrets" du Space : | |
| # DEEPINFRA_API_KEY=<set-in-HF-Secrets> | |
| # (Docs DeepInfra OpenAI-compatible: base_url https://api.deepinfra.com/v1/openai ; embeddings supportés) | |
| # https://deepinfra.com/docs/openai_api / https://deepinfra.com/docs/inference | |
| # (Exemples modèles embeddings: BAAI/bge-m3, BAAI/bge-base-en-v1.5, thenlper/gte-base, etc.) | |
| # https://deepinfra.com/BAAI/bge-m3/api | |
| # ====== HUGGING FACE (fallback) ====== | |
| # Modèle HF pour feature-extraction (peut être gardé, sinon ex: intfloat/e5-base-v2) | |
| HF_EMBED_MODEL=sentence-transformers/all-MiniLM-L6-v2 | |
| # Préférer d'abord le endpoint pipeline, sinon fallback auto vers /models | |
| HF_PIPELINE_FIRST=true | |
| # Attendre le chargement du modèle côté Inference API | |
| HF_WAIT_FOR_MODEL=true | |
| # (Optionnel) Forcer des URLs spécifiques si nécessaire : | |
| # HF_API_URL_PIPELINE=https://api-inference.huggingface.co/pipeline/feature-extraction/sentence-transformers/all-MiniLM-L6-v2 | |
| # HF_API_URL_MODELS=https://api-inference.huggingface.co/models/sentence-transformers/all-MiniLM-L6-v2 | |
| # ⛔️ SECRET à définir dans "Variables and secrets" du Space : | |
| # HF_API_TOKEN=<set-in-HF-Secrets> | |
| # (Référence "feature-extraction" HF) https://huggingface.co/docs/inference-providers/en/tasks/feature-extraction | |
| # ====== QDRANT (vector store) ====== | |
| # Ajuste l'URL selon ton infra (container local, service managé, etc.) | |
| QDRANT_URL=https://5d19e925-2e0b-4c11-85e4-0ae3e93f6b40.eu-central-1-0.aws.cloud.qdrant.io:6333 | |
| # ⛔️ SECRET si ton instance requiert une clé : | |
| # QDRANT_API_KEY=<set-in-HF-Secrets> | |
| # ====== AUTH INTERNE DU SERVICE (recommandé) ====== | |
| # Jeton simple à passer côté client dans l'en-tête X-Auth-Token | |
| # ⛔️ SECRET : | |
| # REMOTE_INDEX_TOKEN=<set-in-HF-Secrets> | |