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

Method field_specs

entity/configs/node/node.py:149–166  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

147
148 @classmethod
149 def field_specs(cls) -> Dict[str, ConfigFieldSpec]:
150 specs = super().field_specs()
151 type_spec = specs.get("type")
152 if type_spec:
153 registrations = iter_node_schemas()
154 specs["type"] = replace(
155 type_spec,
156 enum=list(registrations.keys()),
157 enum_options=[
158 EnumOption(
159 value=name,
160 label=name,
161 description=schema.summary or "No description provided for this node type",
162 )
163 for name, schema in registrations.items()
164 ],
165 )
166 return specs
167
168 @classmethod
169 def from_dict(cls, data: Mapping[str, Any], *, path: str) -> "Node":

Callers 3

_emit_configMethod · 0.45
_resolve_config_classFunction · 0.45
build_schema_responseFunction · 0.45

Calls 4

iter_node_schemasFunction · 0.90
EnumOptionClass · 0.90
itemsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected