mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-24 00:22:25 +02:00
docs: __start__/__end__ consistency (#1874)
* changes * skip mermaid * retries fix * viz error * changes
This commit is contained in:
@@ -391,7 +391,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from typing import Literal\n",
|
||||
"\n",
|
||||
"from langgraph.graph import END\n",
|
||||
"\n",
|
||||
"async def execute_step(state: PlanExecute):\n",
|
||||
" plan = state[\"plan\"]\n",
|
||||
@@ -420,9 +420,9 @@
|
||||
" return {\"plan\": output.action.steps}\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def should_end(state: PlanExecute) -> Literal[\"agent\", \"__end__\"]:\n",
|
||||
"def should_end(state: PlanExecute):\n",
|
||||
" if \"response\" in state and state[\"response\"]:\n",
|
||||
" return \"__end__\"\n",
|
||||
" return END\n",
|
||||
" else:\n",
|
||||
" return \"agent\""
|
||||
]
|
||||
@@ -459,6 +459,7 @@
|
||||
" \"replan\",\n",
|
||||
" # Next, we pass in the function that will determine which node is called next.\n",
|
||||
" should_end,\n",
|
||||
" [\"agent\",END]\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# Finally, we compile it!\n",
|
||||
|
||||
Reference in New Issue
Block a user