Skip to content

Commit 1f32654

Browse files
Remove edge from approval to proceed and cancel (#1397)
Removed added edges from `approval_node` node to `proceed` and `cancel`. These edges are causing an error where the graph tries to update `status` channel at the same time (in node `proceed` and `cancel`) Also since we have `approval_node` already points to `proceed` and `cancel`, adding these edges is unnecessary. Error message if the example compiled without any changes: `InvalidUpdateError: At key 'status': Can receive only one value per step. Use an Annotated key to handle multiple values.` ## Overview <!-- Brief description of what documentation is being added/updated --> Updates the approve or reject example in LangGraph `interrupts` documentation. ## Type of change Fix bug **Type:** [Replace with: New documentation page / Update existing documentation / Fix typo/bug/link/formatting / Remove outdated content / Other] ## Related issues/PRs <!-- Link to related issues, feature PRs, or discussions (if applicable) To automatically close an issue when this PR is merged, use closing keywords: - "closes #123" or "fixes #123" or "resolves #123" For regular references without auto-closing, just use: - "#123" or "See issue #123" Examples: - closes #456 (will auto-close issue #456 when PR is merged) - See #789 for context (will reference but not auto-close issue #789) --> - GitHub issue: - Feature PR: <!-- For LangChain employees, if applicable: --> - Linear issue: - Slack thread: ## Checklist <!-- Put an 'x' in all boxes that apply --> - [ x ] I have read the [contributing guidelines](README.md) - [ ] I have tested my changes locally using `docs dev` - [ ] All code examples have been tested and work correctly - [ ] I have used **root relative** paths for internal links - [ ] I have updated navigation in `src/docs.json` if needed - I have gotten approval from the relevant reviewers - (Internal team members only / optional) I have created a preview deployment using the [Create Preview Branch workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) ## Additional notes <!-- Any other information that would be helpful for reviewers -->
1 parent 25af698 commit 1f32654

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/oss/langgraph/interrupts.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@ await graph.invoke(new Command({ resume: false }), config);
235235
builder.add_node("proceed", proceed_node)
236236
builder.add_node("cancel", cancel_node)
237237
builder.add_edge(START, "approval")
238-
builder.add_edge("approval", "proceed")
239-
builder.add_edge("approval", "cancel")
240238
builder.add_edge("proceed", END)
241239
builder.add_edge("cancel", END)
242240

0 commit comments

Comments
 (0)