Commit d1c89f1
docs: Enhance HumanInTheLoopMiddleware configuration for email review (#1205)
## Overview
The current config produces an issue:
```
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
File "/home/mc/.venv-langchain-v1/lib/python3.10/site-packages/langchain/agents/middleware/human_in_the_loop.py", line 193, in __init__
elif tool_config.get("allowed_decisions"):
AttributeError: 'str' object has no attribute 'get'
```
The old example conflicts with the configuration options described in
[LangChain’s
documentation](https://docs.langchain.com/oss/python/langchain/middleware#human-in-the-loop)
The description field is part of InterruptOnConfig, so the dictionary
value should be an InterruptOnConfig object.
## Type of change
**Type:** [Update existing documentation /bug/Remove outdated content]
## 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)
- [x] I have tested my changes locally using `docs dev`
- [x] All code examples have been tested and work correctly
- [x] I have used **root relative** paths for internal links
- [x] 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 -->
---------
Co-authored-by: Lauren Hirata Singh <[email protected]>1 parent 5b50105 commit d1c89f1
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
319 | 323 | | |
320 | 324 | | |
321 | 325 | | |
| |||
0 commit comments