Various small changes (#1268)

This commit is contained in:
Nuno Campos
2024-08-07 20:17:47 -04:00
committed by GitHub
parent 9650f0d41d
commit 002b260e7a
4 changed files with 24 additions and 12 deletions
+4 -2
View File
@@ -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
+14 -6
View File
@@ -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:
+1 -1
View File
@@ -27,7 +27,7 @@ export interface Config {
/**
* Timestamp of the state checkpoint
*/
thread_ts?: string;
checkpoint_id?: string;
[key: string]: unknown;
};
}
+5 -3
View File
@@ -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'
}