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
+3 -1
View File
@@ -655,7 +655,7 @@
"from langgraph.graph import END, StateGraph, START\n",
"\n",
"\n",
"def should_loop(state: TreeState) -> Literal[\"expand\", \"__end__\"]:\n",
"def should_loop(state: TreeState):\n",
" \"\"\"Determine whether to continue the tree search.\"\"\"\n",
" root = state[\"root\"]\n",
" if root.is_solved:\n",
@@ -675,11 +675,13 @@
" \"start\",\n",
" # Either expand/rollout or finish\n",
" should_loop,\n",
" ['expand',END]\n",
")\n",
"builder.add_conditional_edges(\n",
" \"expand\",\n",
" # Either continue to rollout or finish\n",
" should_loop,\n",
" ['expand',END]\n",
")\n",
"\n",
"graph = builder.compile()"