# Embeddings Configuration # Copy this file to .env and fill in ALL required values # The application will fail to start if required variables are missing # ============================================================================= # REQUIRED: Backend Selection (no defaults - must be set explicitly) # ============================================================================= # Default backend: vllm or llamacpp EMB_DEFAULT_BACKEND=vllm # Enable backends (true/false) EMB_ENABLE_VLLM=true EMB_ENABLE_LLAMACPP=false # External URL for OpenAPI spec (REQUIRED) EMB_EXTERNAL_URL=http://localhost:14100 # ============================================================================= # OPTIONAL: API Server Settings # ============================================================================= # Server binding # EMB_HOST=0.0.0.0 # EMB_PORT=14100 # Prod: 14100, Dev: 54100 # ============================================================================= # OPTIONAL: API Authentication # ============================================================================= # API tokens for Bearer authentication (comma-separated) # If not set, authentication is disabled and all endpoints are public # If set, requests to protected endpoints require: Authorization: Bearer # Health endpoints (/health, /ready) are always public # EMB_API_TOKENS=token1,token2,token3 # ============================================================================= # OPTIONAL: vLLM Backend Configuration # ============================================================================= # vLLM server URL (internal Docker network) # EMB_VLLM_BASE_URL=http://localhost:54101 # vLLM model to load (Hugging Face model ID) EMB_VLLM_MODEL=BAAI/bge-m3 # vLLM server port # EMB_VLLM_PORT=14101 # GPU assignment for vLLM # EMB_VLLM_GPU=0 # GPU memory utilization # EMB_VLLM_GPU_UTIL=0.50 # Maximum model sequence length # EMB_VLLM_MAX_LEN=8192 # ============================================================================= # OPTIONAL: llama.cpp Backend Configuration # ============================================================================= # llama.cpp server URL (internal Docker network) # EMB_LLAMACPP_BASE_URL=http://localhost:54110 # Directory containing model files (absolute path recommended) MODELS_DIR=/path/to/models # llama.cpp model file (GGUF format, filename only - must be in MODELS_DIR) EMB_LLAMACPP_MODEL=bge-m3-q4_k_m.gguf # llama.cpp server port # EMB_LLAMACPP_PORT=14110 # llama.cpp context size # EMB_LLAMACPP_CTX=8192 # llama.cpp performance settings # EMB_LLAMACPP_THREADS=4 # EMB_LLAMACPP_PARALLEL=4 # ============================================================================= # OPTIONAL: Timeout Settings # ============================================================================= # Request timeout for embedding calls (seconds) # EMB_REQUEST_TIMEOUT=120.0 # Connection timeout (seconds) # EMB_CONNECT_TIMEOUT=10.0 # ============================================================================= # OPTIONAL: Rate Limiting and Concurrency # ============================================================================= # Requests per second limit # EMB_RATE_LIMIT_RPS=20.0 # Maximum burst size for rate limiting # EMB_RATE_LIMIT_BURST=40 # Maximum concurrent embedding requests # EMB_MAX_CONCURRENT_REQUESTS=20 # ============================================================================= # OPTIONAL: Logging # ============================================================================= # Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL # EMB_LOG_LEVEL=INFO # Enable JSON logging format (true/false) # EMB_LOG_JSON=false # ============================================================================= # OPTIONAL: Shared Settings (for Docker) # ============================================================================= # HuggingFace cache directory # HF_CACHE_DIR=/cai2_ds_storage/hf_cache # HuggingFace token # HF_TOKEN=