gwoe-antragspruefer/app/config.py

36 lines
967 B
Python
Raw Normal View History

from pydantic_settings import BaseSettings
from pathlib import Path
class Settings(BaseSettings):
app_name: str = "GWÖ-Antragsprüfer"
app_version: str = "1.0.0"
prompt_version: str = "v4.1"
# Paths
base_dir: Path = Path(__file__).resolve().parent.parent
data_dir: Path = base_dir / "data"
reports_dir: Path = base_dir / "reports"
kontext_dir: Path = Path(__file__).resolve().parent / "kontext"
db_path: Path = data_dir / "gwoe-antraege.db"
# LLM
dashscope_api_key: str = ""
dashscope_base_url: str = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
llm_model_default: str = "qwen-plus-latest"
llm_model_premium: str = "qwen-max"
# Keycloak (TODO)
keycloak_url: str = ""
keycloak_realm: str = ""
keycloak_client_id: str = ""
# Server
host: str = "0.0.0.0"
port: int = 8000
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
settings = Settings()