docs: __start__/__end__ consistency (#1874)

* changes

* skip mermaid

* retries fix

* viz error

* changes
This commit is contained in:
Isaac Francisco
2024-09-30 13:55:53 -07:00
committed by GitHub
parent d29747906d
commit 17dc1108a3
18 changed files with 110 additions and 108 deletions
@@ -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",