MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / from_dict

Method from_dict

entity/configs/dynamic_base.py:435–443  ·  view source on GitHub ↗
(cls, data: Mapping[str, Any] | None, *, path: str)

Source from the content-addressed store, hash-verified

433
434 @classmethod
435 def from_dict(cls, data: Mapping[str, Any] | None, *, path: str) -> "TreeDynamicConfig":
436 if data is None:
437 return cls(path=path)
438 mapping = require_mapping(data, path)
439 group_size = int(mapping.get("group_size", 3))
440 if group_size < 2:
441 raise ConfigError("group_size must be at least 2", extend_path(path, "group_size"))
442 max_parallel = int(mapping.get("max_parallel", 10))
443 return cls(group_size=group_size, max_parallel=max_parallel, path=path)

Callers

nothing calls this directly

Calls 4

require_mappingFunction · 0.90
ConfigErrorClass · 0.90
extend_pathFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected