MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / from_dict

Method from_dict

uncommon_route/semantic.py:123–145  ·  view source on GitHub ↗
(
        cls,
        data: Mapping[str, Any] | None,
        *,
        base: SideChannelConfig | None = None,
    )

Source from the content-addressed store, hash-verified

121
122 @classmethod
123 def from_dict(
124 cls,
125 data: Mapping[str, Any] | None,
126 *,
127 base: SideChannelConfig | None = None,
128 ) -> SideChannelConfig:
129 base = base or DEFAULT_SIDECHANNEL_CONFIG
130 if not data:
131 return base
132 return cls(
133 tool_summary=SideChannelTaskConfig.from_dict(
134 data.get("tool_summary"),
135 base=base.tool_summary,
136 ),
137 checkpoint=SideChannelTaskConfig.from_dict(
138 data.get("checkpoint"),
139 base=base.checkpoint,
140 ),
141 rehydrate=SideChannelTaskConfig.from_dict(
142 data.get("rehydrate"),
143 base=base.rehydrate,
144 ),
145 )
146
147 def to_dict(self) -> dict[str, Any]:
148 return {

Callers 2

mainFunction · 0.45
from_dictMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected