Skip to content

Commit 7a6bdac

Browse files
authored
fix: Change max_tokens to trigger in middleware config (#1234)
## Overview Fixed a typo in Context Edit Middleware docs. ## Type of change **Type:** typofix ## 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 --> - [ ] 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 cd94474 commit 7a6bdac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oss/langchain/middleware.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ agent = create_agent(
10771077
middleware=[
10781078
ContextEditingMiddleware(
10791079
edits=[
1080-
ClearToolUsesEdit(max_tokens=1000), # Clear old tool uses
1080+
ClearToolUsesEdit(trigger=1000), # Clear old tool uses
10811081
],
10821082
),
10831083
],

0 commit comments

Comments
 (0)