26 lines
630 B
Python
26 lines
630 B
Python
from pathlib import Path
|
|
|
|
from pydantic_core import Url
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
PHOTOOLS3_DIR = Path(__file__).parent.resolve()
|
|
SRC_DIR = PHOTOOLS3_DIR.parent
|
|
ROOT_DIR = SRC_DIR.parent
|
|
EXAMPLES_DIR = ROOT_DIR / "examples"
|
|
DNG_EXAMPLES_DIR = EXAMPLES_DIR / "dng"
|
|
CONFIG_DIR = ROOT_DIR / "config"
|
|
KEYWORDS_LIST_PATH = CONFIG_DIR / "keywords.txt"
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env")
|
|
|
|
llm_api_base_url: Url
|
|
llm_api_key: str
|
|
llm_default_temperature: float
|
|
|
|
metadata_prefix: str
|
|
|
|
|
|
settings = Settings() # type: ignore[call-arg]
|