# ============================================================================ # ML Column Recommender - Environment Configuration # ============================================================================ # # This file contains all configuration needed to run the application. # IMPORTANT: Copy this file to .env and fill in your values. # NEVER commit .env to version control! # # ============================================================================ # AZURE OPENAI CONFIGURATION (REQUIRED) # ============================================================================ # # Get these values from: https://portal.azure.com # # Steps: # 1. Go to your Azure OpenAI resource # 2. Click "Keys and Endpoint" section # 3. Copy ENDPOINT and API KEY # 4. Get deployment names from "Model deployments" section # # Your Azure OpenAI resource endpoint # Format: https://your-resource-name.openai.azure.com/ # DO NOT include /openai or trailing slash AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/ # Your Azure OpenAI API key (keep this SECRET!) # Found in Azure Portal under "Keys and Endpoint" # Use Key1 or Key2 - both work AZURE_OPENAI_API_KEY=your-api-key-here # API version for Azure OpenAI # Current stable: 2024-02-15-preview AZURE_OPENAI_API_VERSION=2024-02-15-preview # ============================================================================ # MODEL DEPLOYMENT NAMES (REQUIRED) # ============================================================================ # # These are the names you gave to your model deployments in Azure. # Can be found in Azure Portal under "Model deployments" # # Deployment name for chat/completion model # Most commonly: gpt-4o-mini, gpt-4-turbo, gpt-4 AZURE_OPENAI_DEPLOYMENT=gpt-4o-mini # Deployment name for embedding model # Most commonly: text-embedding-3-large, text-embedding-3-small AZURE_OPENAI_EMBEDDING_DEPLOYMENT=text-embedding-3-large # API version for embeddings (usually same as above) # Optional: defaults to AZURE_OPENAI_API_VERSION # AZURE_OPENAI_EMBEDDING_API_VERSION=2024-02-15-preview # ============================================================================ # OPTIONAL: SEPARATE EMBEDDING ENDPOINT # ============================================================================ # # If your embedding model is in a different Azure region, specify here. # Otherwise, defaults to AZURE_OPENAI_ENDPOINT # # AZURE_OPENAI_EMBEDDING_ENDPOINT=https://different-resource.openai.azure.com/ # ============================================================================ # APPLICATION CONFIGURATION (OPTIONAL) # ============================================================================ # Application log level: DEBUG, INFO, WARNING, ERROR # Default: INFO # APP_LOG_LEVEL=INFO # Maximum file upload size in MB # Default: 50 # MAX_UPLOAD_SIZE_MB=50 # Maximum characters allowed in user query # Default: 2000 # MAX_QUERY_LENGTH=2000 # Rate limit: maximum requests per minute per user # Default: 60 # RATE_LIMIT_PER_MINUTE=60 # ============================================================================ # NOTES FOR TROUBLESHOOTING # ============================================================================ # # Common Issues: # # 1. "ValueError: AZURE_OPENAI_ENDPOINT is not set" # → Make sure you have a .env file (not .env.example) # → Make sure AZURE_OPENAI_ENDPOINT is defined # # 2. "Authentication error" # → API key might be incorrect # → Try regenerating it in Azure Portal # → Make sure you're using the right subscription # # 3. "Deployment not found" # → Deployment name must match exactly (case-sensitive) # → Check Azure Portal for exact deployment names # → Common mistakes: missing "-", wrong capitalization # # 4. "Request timed out" # → Check your internet connection # → Azure OpenAI might be unavailable (check Azure status page) # → Try again in a few moments # # ============================================================================