Method
from_dict
(
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 { |
Tested by
no test coverage detected