MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / load_config

Function load_config

openkb/config.py:246–256  ·  view source on GitHub ↗

Load YAML config from config_path, merged with DEFAULT_CONFIG. If the file does not exist, returns a copy of the defaults.

(config_path: Path)

Source from the content-addressed store, hash-verified

244
245
246def load_config(config_path: Path) -> dict[str, Any]:
247 """Load YAML config from config_path, merged with DEFAULT_CONFIG.
248
249 If the file does not exist, returns a copy of the defaults.
250 """
251 config = dict(DEFAULT_CONFIG)
252 if config_path.exists():
253 with config_path.open("r", encoding="utf-8") as fh:
254 data = yaml.safe_load(fh) or {}
255 config.update(data)
256 return config
257
258
259def save_config(config_path: Path, config: dict) -> None:

Callers 15

test_save_load_roundtripFunction · 0.90
_setup_llm_keyFunction · 0.90
_add_single_file_lockedFunction · 0.90
queryFunction · 0.90
_cleanup_pageindexFunction · 0.90
recompileFunction · 0.90
chatFunction · 0.90
run_lintFunction · 0.90
skill_newFunction · 0.90

Calls

no outgoing calls