python[patch]: call create_react_agent model node without is_last_step (#3114)

So that you can call agent.nodes['agent'].invoke({'messages': []})
without needing to specify is_last_step. very helpful for evaluating
just the model node of the agent
This commit is contained in:
Bagatur
2025-01-20 18:28:57 -08:00
committed by GitHub
parent 6cbc7e8b67
commit 6087b1969e
2 changed files with 3 additions and 3 deletions
@@ -635,7 +635,7 @@ def create_react_agent(
if (
(
"remaining_steps" not in state
and state["is_last_step"]
and state.get("is_last_step", False)
and has_tool_calls
)
or (
@@ -672,7 +672,7 @@ def create_react_agent(
if (
(
"remaining_steps" not in state
and state["is_last_step"]
and state.get("is_last_step", False)
and has_tool_calls
)
or (
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langgraph"
version = "0.2.64"
version = "0.2.65"
description = "Building stateful, multi-actor applications with LLMs"
authors = []
license = "MIT"