From 62f754853288b4f15234527fbf9942a9810faddb Mon Sep 17 00:00:00 2001 From: Shelton Cui <89503179+dmwcs@users.noreply.github.com> Date: Wed, 10 Sep 2025 00:33:27 +1000 Subject: [PATCH] docs(docs): fix incorrect return type in should_continue example (#6068) Description: The documentation for the should_continue function contained an incorrect return type annotation. It was shown as Literal["environment", END], but the actual logic returns "Action" or END. This PR updates the example to use Literal["Action", END] so that the documentation matches the intended behavior of the function. Issue: N/A Dependencies: None --- docs/docs/tutorials/workflows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/tutorials/workflows.md b/docs/docs/tutorials/workflows.md index 7d46f853e..9b2f4de88 100644 --- a/docs/docs/tutorials/workflows.md +++ b/docs/docs/tutorials/workflows.md @@ -1948,7 +1948,7 @@ const llmWithTools = llm.bindTools(tools); # Conditional edge function to route to the tool node or end based upon whether the LLM made a tool call - def should_continue(state: MessagesState) -> Literal["environment", END]: + def should_continue(state: MessagesState) -> Literal["Action", END]: """Decide if we should continue the loop or stop based upon whether the LLM made a tool call""" messages = state["messages"]