Spaces:
Sleeping
Sleeping
| """ | |
| Configuration file for the AI Resume Search application | |
| """ | |
| import os | |
| from dotenv import load_dotenv | |
| # Load environment variables | |
| load_dotenv() | |
| # OpenAI Configuration | |
| OPENAI_API_KEY = os.getenv('OPENAI_API_KEY') | |
| # Application Configuration | |
| DEBUG = os.getenv('DEBUG', 'false').lower() == 'true' | |
| CACHE_FILE = "embeddings_cache.pkl" | |
| # Validation | |
| def validate_config(): | |
| """Validate that required configuration is present""" | |
| if not OPENAI_API_KEY: | |
| raise ValueError( | |
| "OPENAI_API_KEY not found in environment variables. " | |
| "Please set it in your .env file or environment variables. " | |
| "Get your API key from: https://platform.openai.com/api-keys" | |
| ) | |
| return True | |