mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-07 10:17:50 +02:00
chore: update emphemeral local (#6091)
basically - for conditional edges, we use this to merge the updates from state with the state object (before the actual update really occurs in the tick.after) otherwise - an emphemeral value will actually last through the logic in the conditional edge of the node after
This commit is contained in:
@@ -194,15 +194,12 @@ def local_read(
|
||||
for c, v in task.writes:
|
||||
if c in select:
|
||||
updated[c].append(v)
|
||||
if fresh and updated:
|
||||
if fresh:
|
||||
# apply writes
|
||||
local_channels: dict[str, BaseChannel] = {}
|
||||
for k in channels:
|
||||
if k in updated:
|
||||
cc = channels[k].copy()
|
||||
cc.update(updated[k])
|
||||
else:
|
||||
cc = channels[k]
|
||||
cc = channels[k].copy()
|
||||
cc.update(updated[k])
|
||||
local_channels[k] = cc
|
||||
# read fresh values
|
||||
values = read_channels(local_channels, select)
|
||||
|
||||
Reference in New Issue
Block a user