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

Function check_config

check/check.py:99–121  ·  view source on GitHub ↗
(yaml_content: Any)

Source from the content-addressed store, hash-verified

97
98
99def check_config(yaml_content: Any) -> str:
100 if not isinstance(yaml_content, dict):
101 return "YAML root must be a mapping"
102
103 # Skip placeholder resolution during save - users may configure env vars at runtime
104 # Use yaml_content directly instead of prepare_design_mapping()
105 schema_errors = validate_design(yaml_content)
106 if schema_errors:
107 formatted = "\n".join(f"- {err}" for err in schema_errors)
108 return formatted
109
110 logic_errors = check_workflow_structure(yaml_content)
111 if logic_errors:
112 formatted = "\n".join(f"- {err}" for err in logic_errors)
113 return formatted
114
115 graph = yaml_content.get("graph") or {}
116 try:
117 _ensure_supported(graph)
118 except Exception as e:
119 return str(e)
120
121 return ""

Callers 1

Calls 4

validate_designFunction · 0.90
check_workflow_structureFunction · 0.90
_ensure_supportedFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected