MCPcopy Create free account
hub / github.com/microsoft/Webwright / _load_structured_config

Function _load_structured_config

src/webwright/tools/_model_config.py:22–30  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

20
21
22def _load_structured_config(path: Path) -> dict[str, Any]:
23 text = path.read_text(encoding="utf-8")
24 if path.suffix.lower() in {".yaml", ".yml"}:
25 loaded = yaml.safe_load(text)
26 else:
27 loaded = json.loads(text)
28 if not isinstance(loaded, dict):
29 raise ValueError(f"Model config must be an object: {path}")
30 return loaded
31
32
33def _extract_model_block(config: dict[str, Any]) -> dict[str, Any]:

Callers 1

load_tool_modelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected