import os from dotenv import load_dotenv # Load environment variables load_dotenv() class Config: """Base configuration class""" SECRET_KEY = os.getenv('SECRET_KEY', 'research-radar-secret-key-2024') GEMINI_API_KEY = os.getenv('GEMINI_API_KEY') # Upload settings UPLOAD_FOLDER = 'uploads' MAX_CONTENT_LENGTH = 16 * 1024 * 1024 # 16MB ALLOWED_EXTENSIONS = {'txt', 'pdf', 'docx'} # ChromaDB settings CHROMA_PERSIST_DIRECTORY = 'chroma_db' # Model settings EMBEDDING_MODEL = 'all-MiniLM-L6-v2' # Sentence transformer model name LOCAL_MODEL_PATH = os.getenv('LOCAL_MODEL_PATH', os.path.join(os.path.dirname(__file__), 'all-MiniLM-L6-v2')) # Local model path GEMINI_MODEL = 'gemini-1.5-flash-latest' # ArXiv settings ARXIV_MAX_RESULTS = 10 @staticmethod def init_app(app): """Initialize application with config""" pass class DevelopmentConfig(Config): """Development configuration""" DEBUG = True FLASK_ENV = 'development' class ProductionConfig(Config): """Production configuration""" DEBUG = False FLASK_ENV = 'production' class TestingConfig(Config): """Testing configuration""" TESTING = True WTF_CSRF_ENABLED = False # Configuration dictionary config = { 'development': DevelopmentConfig, 'production': ProductionConfig, 'testing': TestingConfig, 'default': DevelopmentConfig }