| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| import os | |
| class Settings(BaseSettings): | |
| GEMINI_API_KEY: str | |
| IMAGE_GEN_MODEL: str = "gemini-2.0-flash-preview-image-generation" | |
| # Pydantic-settings will automatically look for a .env file | |
| # and load variables from there if they match the field names. | |
| model_config = SettingsConfigDict(env_file=".env", env_file_encoding='utf-8', extra='ignore') | |
| # Create a single instance of the settings to be used throughout the application | |
| settings = Settings() |