mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-29 03:09:45 +02:00
docs: __start__/__end__ consistency (#1874)
* changes * skip mermaid * retries fix * viz error * changes
This commit is contained in:
@@ -312,7 +312,7 @@
|
||||
"from typing import Literal\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def router(state) -> Literal[\"call_tool\", \"__end__\", \"continue\"]:\n",
|
||||
"def router(state):\n",
|
||||
" # This is the router\n",
|
||||
" messages = state[\"messages\"]\n",
|
||||
" last_message = messages[-1]\n",
|
||||
@@ -321,7 +321,7 @@
|
||||
" return \"call_tool\"\n",
|
||||
" if \"FINAL ANSWER\" in last_message.content:\n",
|
||||
" # Any agent decided the work is done\n",
|
||||
" return \"__end__\"\n",
|
||||
" return END\n",
|
||||
" return \"continue\""
|
||||
]
|
||||
},
|
||||
@@ -351,12 +351,12 @@
|
||||
"workflow.add_conditional_edges(\n",
|
||||
" \"Researcher\",\n",
|
||||
" router,\n",
|
||||
" {\"continue\": \"chart_generator\", \"call_tool\": \"call_tool\", \"__end__\": END},\n",
|
||||
" {\"continue\": \"chart_generator\", \"call_tool\": \"call_tool\", END: END},\n",
|
||||
")\n",
|
||||
"workflow.add_conditional_edges(\n",
|
||||
" \"chart_generator\",\n",
|
||||
" router,\n",
|
||||
" {\"continue\": \"Researcher\", \"call_tool\": \"call_tool\", \"__end__\": END},\n",
|
||||
" {\"continue\": \"Researcher\", \"call_tool\": \"call_tool\", END: END},\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"workflow.add_conditional_edges(\n",
|
||||
|
||||
Reference in New Issue
Block a user