dmChatbotBackend / src /agent_params.py
github-actions
Auto deploy from GitHub
b1198f0
Raw
History Blame Contribute Delete
472 Bytes
import json
from pathlib import Path
def _load_params() -> dict:
params_path = Path(__file__).with_name("params.json")
if not params_path.exists():
return {}
with params_path.open("r", encoding="utf-8") as handle:
data = json.load(handle)
return data if isinstance(data, dict) else {}
def get_agent_params(agent_name: str) -> dict:
params = _load_params().get(agent_name, {})
return params if isinstance(params, dict) else {}