This commit is contained in:
Nuno Campos
2024-12-05 13:50:42 -08:00
parent aa4fea48dd
commit 1f745ca017
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -667,7 +667,7 @@ class CompiledStateGraph(CompiledGraph):
raise InvalidUpdateError(msg)
# state updaters
write_entries = [
write_entries: list[Union[ChannelWriteEntry, ChannelWriteTupleEntry]] = [
ChannelWriteTupleEntry(
mapper=_get_root if output_keys == ["__root__"] else _get_updates
)
@@ -706,7 +706,7 @@ class CompiledStateGraph(CompiledGraph):
writers=[
# publish to this channel and state keys
ChannelWrite(
[ChannelWriteEntry(key, key)] + write_entries,
write_entries + [ChannelWriteEntry(key, key)],
tags=[TAG_HIDDEN],
),
],
+1 -1
View File
@@ -37,7 +37,7 @@ class ChannelWriteEntry(NamedTuple):
class ChannelWriteTupleEntry(NamedTuple):
mapper: Callable[[Any], Sequence[tuple[str, Any]]]
mapper: Callable[[Any], Optional[Sequence[tuple[str, Any]]]]
"""Function to extract tuples from value."""
value: Any = PASSTHROUGH
"""Value to write, or PASSTHROUGH to use the input."""