Features: - GWÖ-Matrix 2.0 Analyse für NRW-Landtagsanträge - Verbesserungsvorschläge im Redline-Format (Original/Vorschlag/Begründung) - Wahlprogramm- und Parteiprogrammtreue-Bewertung - Landtag-Suche via OPAL-API - Tag-Wolke mit Multi-Select Filter - Partei-Filter mit Durchschnittswerten - PDF-Report-Generierung - Security Headers (CSP, X-Frame-Options, etc.) - Persistente SQLite-DB via Docker Volumes Tech Stack: - FastAPI + Jinja2 - Qwen LLM via DashScope API - SQLite + aiosqlite - WeasyPrint für PDF - Docker Compose mit Traefik
36 lines
967 B
Python
36 lines
967 B
Python
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()
|