MCPcopy
hub / github.com/OpenBMB/ChatDev / as_config

Method as_config

entity/configs/base.py:177–182  ·  view source on GitHub ↗

Return the nested config stored under *attr* if it matches the expected type.

(self, expected_type: type[TConfig], *, attr: str = "config")

Source from the content-addressed store, hash-verified

175 return None
176
177 def as_config(self, expected_type: type[TConfig], *, attr: str = "config") -> TConfig | None:
178 """Return the nested config stored under *attr* if it matches the expected type."""
179 value = getattr(self, attr, None)
180 if isinstance(value, expected_type):
181 return value
182 return None
183
184 @classmethod
185 def collect_schema(cls) -> SchemaNode:

Callers 15

executeMethod · 0.45
_prepare_call_optionsMethod · 0.45
_invoke_providerMethod · 0.45
_execute_tool_batchMethod · 0.45
_get_tool_loop_limitMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected