File size: 472 Bytes
b1198f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 {}