Spaces:
Sleeping
Sleeping
File size: 724 Bytes
38d75be | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | """
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
|