File size: 533 Bytes
bd55a25 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | 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() |