Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The README should document the required ANTHROPIC_API_KEY setup for the configured model.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates the Functional API human-in-the-loop sample with LLM-generated drafts, interactive feedback, and revision support.
Changes:
- Adds LLM-based drafting and revision.
- Prompts for terminal approval or revision feedback.
- Adds deterministic mocked tests.
- Updates the interactive workflow documentation.
File summaries
| File | Summary |
|---|---|
tests/langgraph_plugin/functional_human_in_the_loop_test.py |
Tests approval and revision with mocked chat-model calls. |
langgraph_plugin/functional_api/human_in_the_loop/workflow.py |
Generates and revises drafts with an LLM. |
langgraph_plugin/functional_api/human_in_the_loop/run_workflow.py |
Prompts for interactive human feedback. |
langgraph_plugin/functional_api/human_in_the_loop/README.md |
Documents the workflow; should specify the required Anthropic credential setup. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Rewrite both graph_api and functional_api human-in-the-loop samples to be deliberately model-free without requiring an Anthropic API key. Draft generation and revision use deterministic templates while preserving the interactive terminal review workflow. Update unit tests and documentation accordingly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Brings the LangGraph Functional API human-in-the-loop sample to parity with the Graph API version and makes both HITL samples deliberately model-free (per review feedback from @brianstrauch):
human_in_the_loop_test.pyandfunctional_human_in_the_loop_test.py) test approval and revision deterministically without LLM mocking.Ref: #146, #324