Download src/agent_params.py from DiabetesCareChatbot/dmChatbotBackend: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/spaces/DiabetesCareChatbot/dmChatbotBackend/resolve/main/src/agent_params.py
- Command line
-
hf download hf://spaces/DiabetesCareChatbot/dmChatbotBackend/src/agent_params.py
-
curl -L -o agent_params.py https://huggingface.co/spaces/DiabetesCareChatbot/dmChatbotBackend/resolve/main/src/agent_params.py
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 {} | |