29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
from __future__ import annotations
|
|
|
|
import os
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class Settings:
|
|
ollama_host: str = os.getenv("OLLAMA_HOST", "http://localhost:11434")
|
|
base_model: str = os.getenv("BASE_MODEL", "qwen2.5:7b-instruct")
|
|
boost_model: str = os.getenv("BOOST_MODEL", "qwen2.5:14b-instruct")
|
|
english_model: str = os.getenv("ENGLISH_MODEL", "llama3:8b-instruct")
|
|
english_ratio_threshold: float = float(os.getenv("ENGLISH_RATIO_THRESHOLD", "0.65"))
|
|
embedding_model: str = os.getenv("EMBEDDING_MODEL", "nomic-embed-text")
|
|
index_path: str = os.getenv("INDEX_PATH", "data/index.jsonl")
|
|
output_dir: str = os.getenv("OUTPUT_DIR", "outputs")
|
|
|
|
# Optional export targets (e.g., Synology NAS shares)
|
|
export_html_dir: str = os.getenv("EXPORT_HTML_DIR", "")
|
|
export_upload_dir: str = os.getenv("EXPORT_UPLOAD_DIR", "")
|
|
|
|
# Paperless (user will provide API details)
|
|
paperless_base_url: str = os.getenv("PAPERLESS_BASE_URL", "")
|
|
paperless_token: str = os.getenv("PAPERLESS_TOKEN", "")
|
|
|
|
|
|
settings = Settings()
|
|
|