fix(langgraph): remove deprecated output usage in favor of output_schema (#5095)

use output_schema
This commit is contained in:
Sydney Runkle
2025-06-13 12:34:39 -04:00
committed by GitHub
parent c439cb0872
commit 0171e9a323
5 changed files with 24 additions and 15 deletions
+5 -2
View File
@@ -1089,14 +1089,17 @@ def test_react_with_subgraph_tools(
return {"result": state["a"] + state["b"]}
add_subgraph = (
StateGraph(State, output=Output).add_node(add).add_edge(START, "add").compile()
StateGraph(State, output_schema=Output)
.add_node(add)
.add_edge(START, "add")
.compile()
)
def multiply(state):
return {"result": state["a"] * state["b"]}
multiply_subgraph = (
StateGraph(State, output=Output)
StateGraph(State, output_schema=Output)
.add_node(multiply)
.add_edge(START, "multiply")
.compile()