# AI Insights Service Environment Variables

# Service Info
SERVICE_NAME=ai-insights
SERVICE_VERSION=1.0.0
API_V1_PREFIX=/api/v1/ai-insights

# Database
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/bakery_ai_insights
DB_POOL_SIZE=20
DB_MAX_OVERFLOW=10

# Redis
REDIS_URL=redis://localhost:6379/5
REDIS_CACHE_TTL=900

# Service URLs
FORECASTING_SERVICE_URL=http://forecasting-service:8000
PROCUREMENT_SERVICE_URL=http://procurement-service:8000
PRODUCTION_SERVICE_URL=http://production-service:8000
SALES_SERVICE_URL=http://sales-service:8000
INVENTORY_SERVICE_URL=http://inventory-service:8000

# Circuit Breaker Settings
CIRCUIT_BREAKER_FAILURE_THRESHOLD=5
CIRCUIT_BREAKER_TIMEOUT=60

# Insight Settings
MIN_CONFIDENCE_THRESHOLD=60
DEFAULT_INSIGHT_TTL_DAYS=7
MAX_INSIGHTS_PER_REQUEST=100

# Feedback Settings
FEEDBACK_PROCESSING_ENABLED=true
FEEDBACK_PROCESSING_SCHEDULE="0 6 * * *"

# Logging
LOG_LEVEL=INFO

# CORS
ALLOWED_ORIGINS=["http://localhost:3000","http://localhost:5173"]
