from pydantic_settings import BaseSettings from functools import lru_cache import os class Settings(BaseSettings): # Supabase supabase_url: str supabase_anon_key: str supabase_service_role_key: str # LLM - laozhang (gpt-4o, gpt-4o-mini) laozhang_base_url: str = "https://api.laozhang.ai/v1" laozhang_api_key: str = "" # LLM - DashScope (qwen-plus) dashscope_base_url: str = "https://dashscope.aliyuncs.com/compatible-mode/v1" dashscope_api_key: str = "" # LLM - DeepSeek deepseek_base_url: str = "https://api.deepseek.com/v1" deepseek_api_key: str = "" # Google Gemini (official) google_gemini_api_key: str = "" model_config = { "env_file": os.path.join(os.path.dirname(__file__), "../../.env"), "env_file_encoding": "utf-8", "extra": "ignore", } @lru_cache def get_settings() -> Settings: return Settings()