mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-25 09:02:25 +02:00
Various small changes (#1268)
This commit is contained in:
@@ -341,8 +341,10 @@ class PregelLoop:
|
||||
k: v
|
||||
for k, v in channel_versions.items()
|
||||
if k not in self.checkpoint_previous_versions
|
||||
or k in self.checkpoint_previous_versions
|
||||
and v > self.checkpoint_previous_versions[k]
|
||||
or (
|
||||
k in self.checkpoint_previous_versions
|
||||
and v > self.checkpoint_previous_versions[k]
|
||||
)
|
||||
}
|
||||
else:
|
||||
new_versions = channel_versions
|
||||
|
||||
@@ -7452,12 +7452,20 @@ def test_simple_multi_edge(snapshot: SnapshotAssertion) -> None:
|
||||
|
||||
assert app.get_graph().draw_mermaid(with_styles=False) == snapshot
|
||||
assert app.invoke({"my_key": "my_value"}) == {"my_key": "my_value_more"}
|
||||
assert [*app.stream({"my_key": "my_value"})] == [
|
||||
{"up": None},
|
||||
{"side": None},
|
||||
{"other": {"my_key": "_more"}},
|
||||
{"down": None},
|
||||
]
|
||||
assert [*app.stream({"my_key": "my_value"})] in (
|
||||
[
|
||||
{"up": None},
|
||||
{"side": None},
|
||||
{"other": {"my_key": "_more"}},
|
||||
{"down": None},
|
||||
],
|
||||
[
|
||||
{"up": None},
|
||||
{"other": {"my_key": "_more"}},
|
||||
{"side": None},
|
||||
{"down": None},
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
def test_nested_graph_xray(snapshot: SnapshotAssertion) -> None:
|
||||
|
||||
@@ -27,7 +27,7 @@ export interface Config {
|
||||
/**
|
||||
* Timestamp of the state checkpoint
|
||||
*/
|
||||
thread_ts?: string;
|
||||
checkpoint_id?: string;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -783,7 +783,8 @@ class ThreadsClient:
|
||||
'configurable':
|
||||
{
|
||||
'thread_id': 'e2496803-ecd5-4e0c-a779-3226296181c2',
|
||||
'thread_ts': '1ef4a9b8-e6fb-67b1-8001-abd5184439d1'
|
||||
'checkpoint_ns': '',
|
||||
'checkpoint_id': '1ef4a9b8-e6fb-67b1-8001-abd5184439d1'
|
||||
}
|
||||
},
|
||||
'metadata':
|
||||
@@ -822,7 +823,8 @@ class ThreadsClient:
|
||||
'configurable':
|
||||
{
|
||||
'thread_id': 'e2496803-ecd5-4e0c-a779-3226296181c2',
|
||||
'thread_ts': '1ef4a9b8-d80d-6fa7-8000-9300467fad0f'
|
||||
'checkpoint_ns': '',
|
||||
'checkpoint_id': '1ef4a9b8-d80d-6fa7-8000-9300467fad0f'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1184,7 +1186,7 @@ class RunsClient:
|
||||
'user_id': None,
|
||||
'graph_id': 'agent',
|
||||
'thread_id': 'my_thread_id',
|
||||
'thread_ts': None,
|
||||
'checkpoint_id': None,
|
||||
'model_name': "openai",
|
||||
'assistant_id': 'my_assistant_id'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user