MCPcopy Create free account
hub / github.com/OpenBMB/ChatDev / SchemaNode

Class SchemaNode

entity/configs/base.py:124–136  ·  view source on GitHub ↗

Serializable representation of a configuration node.

Source from the content-addressed store, hash-verified

122
123@dataclass(frozen=True)
124class SchemaNode:
125 """Serializable representation of a configuration node."""
126
127 node: str
128 fields: Sequence[ConfigFieldSpec]
129 constraints: Sequence[RuntimeConstraint] = field(default_factory=list)
130
131 def to_json(self) -> Dict[str, Any]:
132 return {
133 "node": self.node,
134 "fields": [spec.to_json() for spec in self.fields],
135 "constraints": [constraint.to_json() for constraint in self.constraints],
136 }
137
138
139@dataclass

Callers 1

collect_schemaMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected