From 84643b2789aeda6adb019cb6e2923798fe63e1fe Mon Sep 17 00:00:00 2001 From: Vadym Barda Date: Wed, 11 Sep 2024 17:59:12 -0400 Subject: [PATCH] langgraph: update core & snapshots (#1689) --- libs/langgraph/poetry.lock | 12 +- libs/langgraph/pyproject.toml | 2 +- .../tests/__snapshots__/test_pregel.ambr | 132 +++++++----------- .../__snapshots__/test_pregel_async.ambr | 20 +-- 4 files changed, 68 insertions(+), 98 deletions(-) diff --git a/libs/langgraph/poetry.lock b/libs/langgraph/poetry.lock index 085c27366..b9c425218 100644 --- a/libs/langgraph/poetry.lock +++ b/libs/langgraph/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiosqlite" @@ -1232,18 +1232,18 @@ files = [ [[package]] name = "langchain-core" -version = "0.2.38" +version = "0.2.39" description = "Building applications with LLMs through composability" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "langchain_core-0.2.38-py3-none-any.whl", hash = "sha256:8a5729bc7e68b4af089af20eff44fe4e7ca21d0e0c87ec21cef7621981fd1a4a"}, - {file = "langchain_core-0.2.38.tar.gz", hash = "sha256:eb69dbedd344f2ee1f15bcea6c71a05884b867588fadc42d04632e727c1238f3"}, + {file = "langchain_core-0.2.39-py3-none-any.whl", hash = "sha256:5a5ad4e1c02d13e7021c026b2c7965069ad71ef67b018274cd52bab56e39143e"}, + {file = "langchain_core-0.2.39.tar.gz", hash = "sha256:73d7b6f0b0212bc8069c3640d69e8d75faa51097784019ffa5c36c617c04acb0"}, ] [package.dependencies] jsonpatch = ">=1.33,<2.0" -langsmith = ">=0.1.75,<0.2.0" +langsmith = ">=0.1.112,<0.2.0" packaging = ">=23.2,<25" pydantic = [ {version = ">=1,<3", markers = "python_full_version < \"3.12.4\""}, @@ -3159,4 +3159,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.9.0,<4.0" -content-hash = "ea51ea9d9a33ea282b72e48ab84e1c07533ab5fee04ff7b1672599e38902e74d" +content-hash = "d0a7dd0a9bb6c125398545644e1e673c4ef677a36285988d4a607da474697672" diff --git a/libs/langgraph/pyproject.toml b/libs/langgraph/pyproject.toml index fe29bbbf5..2db108922 100644 --- a/libs/langgraph/pyproject.toml +++ b/libs/langgraph/pyproject.toml @@ -9,7 +9,7 @@ repository = "https://www.github.com/langchain-ai/langgraph" [tool.poetry.dependencies] python = ">=3.9.0,<4.0" -langchain-core = ">=0.2.38,<0.4" +langchain-core = ">=0.2.39,<0.4" langgraph-checkpoint = "^1.0.2" diff --git a/libs/langgraph/tests/__snapshots__/test_pregel.ambr b/libs/langgraph/tests/__snapshots__/test_pregel.ambr index b1137d70a..b2da32b65 100644 --- a/libs/langgraph/tests/__snapshots__/test_pregel.ambr +++ b/libs/langgraph/tests/__snapshots__/test_pregel.ambr @@ -1,16 +1,4 @@ # serializer version: 1 -# name: test_branch_then - ''' - graph TD; - __start__ --> prepare; - finish --> __end__; - prepare -.-> tool_two_slow; - tool_two_slow --> finish; - prepare -.-> tool_two_fast; - tool_two_fast --> finish; - - ''' -# --- # name: test_branch_then.1 ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% @@ -49,12 +37,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first prepare(prepare) tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) finish(finish) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> prepare; finish --> __end__; prepare -.-> tool_two_slow; @@ -83,12 +71,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first prepare(prepare) tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) finish(finish) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> prepare; finish --> __end__; prepare -.-> tool_two_slow; @@ -117,12 +105,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first prepare(prepare) tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) finish(finish) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> prepare; finish --> __end__; prepare -.-> tool_two_slow; @@ -151,12 +139,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first prepare(prepare) tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) finish(finish) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> prepare; finish --> __end__; prepare -.-> tool_two_slow; @@ -185,12 +173,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first prepare(prepare) tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) finish(finish) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> prepare; finish --> __end__; prepare -.-> tool_two_slow; @@ -4629,10 +4617,10 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first inner(inner) side(side) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> inner; inner --> side; side --> __end__; @@ -4771,14 +4759,14 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first tool_one(tool_one) - tool_two___start__(__start__) + tool_two___start__(

__start__

) tool_two_tool_two_slow(tool_two_slow) tool_two_tool_two_fast(tool_two_fast) - tool_two___end__(__end__) + tool_two___end__(

__end__

) tool_three(tool_three) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ -.-> tool_one; tool_one --> __end__; __start__ -.-> tool_two___start__; @@ -4965,15 +4953,15 @@ ''' graph TD; __start__ --> Researcher; - Researcher -.  continue  .-> Chart_Generator; - Researcher -.  call_tool  .-> Call_Tool; - Researcher -.  end  .-> __end__; - Chart_Generator -.  continue  .-> Researcher; - Chart_Generator -.  call_tool  .-> Call_Tool; - Chart_Generator -.  end  .-> __end__; + Researcher -.  continue  .-> Chart_Generator; + Researcher -.  call_tool  .-> Call_Tool; + Researcher -.  end  .-> __end__; + Chart_Generator -.  continue  .-> Researcher; + Chart_Generator -.  call_tool  .-> Call_Tool; + Chart_Generator -.  end  .-> __end__; Call_Tool -.-> Researcher; Call_Tool -.-> Chart_Generator; - Researcher -.  redo  .-> Researcher; + Researcher -.  redo  .-> Researcher; ''' # --- @@ -4989,32 +4977,14 @@ ''' # --- -# name: test_start_branch_then - ''' - %%{init: {'flowchart': {'curve': 'linear'}}}%% - graph TD; - __start__([__start__]):::first - tool_two_slow(tool_two_slow) - tool_two_fast(tool_two_fast) - __end__([__end__]):::last - __start__ -.-> tool_two_slow; - tool_two_slow --> __end__; - __start__ -.-> tool_two_fast; - tool_two_fast --> __end__; - classDef default fill:#f2f0ff,line-height:1.2 - classDef first fill-opacity:0 - classDef last fill:#bfb6fc - - ''' -# --- # name: test_start_branch_then[memory] ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ -.-> tool_two_slow; tool_two_slow --> __end__; __start__ -.-> tool_two_fast; @@ -5029,10 +4999,10 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ -.-> tool_two_slow; tool_two_slow --> __end__; __start__ -.-> tool_two_fast; @@ -5047,10 +5017,10 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ -.-> tool_two_slow; tool_two_slow --> __end__; __start__ -.-> tool_two_fast; @@ -5065,10 +5035,10 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ -.-> tool_two_slow; tool_two_slow --> __end__; __start__ -.-> tool_two_fast; @@ -5083,10 +5053,10 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first tool_two_slow(tool_two_slow) tool_two_fast(tool_two_fast) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ -.-> tool_two_slow; tool_two_slow --> __end__; __start__ -.-> tool_two_fast; @@ -5128,12 +5098,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__; @@ -5153,12 +5123,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__; @@ -5178,12 +5148,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__; @@ -5203,12 +5173,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__; @@ -5228,12 +5198,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__; @@ -5253,22 +5223,22 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first p_one(p_one) - p_two___start__(__start__) + p_two___start__(

__start__

) p_two_c_one(c_one) p_two_c_two(c_two) - p_two___end__(__end__) - __end__([__end__]):::last + p_two___end__(

__end__

) + __end__([

__end__

]):::last __start__ --> p_one; p_two___end__ --> p_one; - p_one -.  0  .-> p_two___start__; - p_one -.  1  .-> __end__; + p_one -.  0  .-> p_two___start__; + p_one -.  1  .-> __end__; subgraph p_two p_two___start__ --> p_two_c_one; p_two_c_two --> p_two_c_one; - p_two_c_one -.  0  .-> p_two_c_two; - p_two_c_one -.  1  .-> p_two___end__; + p_two_c_one -.  0  .-> p_two_c_two; + p_two_c_one -.  1  .-> p_two___end__; end classDef default fill:#f2f0ff,line-height:1.2 classDef first fill-opacity:0 diff --git a/libs/langgraph/tests/__snapshots__/test_pregel_async.ambr b/libs/langgraph/tests/__snapshots__/test_pregel_async.ambr index 1b0f6c41d..0acb4d0a8 100644 --- a/libs/langgraph/tests/__snapshots__/test_pregel_async.ambr +++ b/libs/langgraph/tests/__snapshots__/test_pregel_async.ambr @@ -1198,12 +1198,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__; @@ -1223,12 +1223,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__; @@ -1248,12 +1248,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__; @@ -1273,12 +1273,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__; @@ -1298,12 +1298,12 @@ ''' %%{init: {'flowchart': {'curve': 'linear'}}}%% graph TD; - __start__([__start__]):::first + __start__([

__start__

]):::first router_node(router_node) normal_llm_node(normal_llm_node) weather_graph_model_node(model_node) weather_graph_weather_node(weather_node
__interrupt = before) - __end__([__end__]):::last + __end__([

__end__

]):::last __start__ --> router_node; normal_llm_node --> __end__; weather_graph_weather_node --> __end__;