Files
wehub-resource-sync e4dcfc49aa
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:00:43 +08:00

19 lines
534 B
Python

from typing import Callable
class ConfigAccessor:
def __init__(self, loader: Callable[[], dict]):
self._loader = loader
def llm_model(self) -> str:
cfg = self._loader()
return str(cfg.get("llm", {}).get("model", "Pro/Flash"))
def llm_provider(self) -> str:
cfg = self._loader()
return str(cfg.get("llm", {}).get("provider", "openai"))
def user_data_dir(self) -> str:
cfg = self._loader()
return str(cfg.get("paths", {}).get("user_data_dir", "./data/user"))