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
@@ -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",