18 lines
447 B
Python
18 lines
447 B
Python
from functools import lru_cache
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
qwen_api_key: str = ""
|
|
qwen_base_url: str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
|
|
qwen_model: str = "qwen-plus"
|
|
request_timeout_seconds: float = 20.0
|
|
|
|
|
|
@lru_cache
|
|
def get_settings() -> Settings:
|
|
return Settings()
|