docs(langchain): document middleware-registered stream transformers#4126
Open
Nick Hollon (nick-hollon-lc) wants to merge 2 commits into
Open
docs(langchain): document middleware-registered stream transformers#4126Nick Hollon (nick-hollon-lc) wants to merge 2 commits into
Nick Hollon (nick-hollon-lc) wants to merge 2 commits into
Conversation
Add a subsection to the LangChain event streaming page covering the new `AgentMiddleware.transformers` attribute (langchain-ai/langchain#37591), including the compile-time merge order: ToolCallTransformer → middleware-registered factories → caller-supplied `transformers=`.
Contributor
|
Thanks for opening a docs PR, Nick Hollon (@nick-hollon-lc)! When it's ready for review, please add the relevant reviewers:
|
Contributor
|
Mintlify preview branch generated: Site preview: https://langchain-5e9cc07a-preview-nhmidd-1779380202-e986092.mintlify.app Preview links may take a few minutes to start working while the deployment finishes. Changed documentation pages (preview deep links): |
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.
Documents the new
AgentMiddleware.transformersattribute introduced in langchain-ai/langchain#37591. Middleware can now declare scope-awareStreamTransformerfactories alongside theirtoolsand lifecycle hooks;create_agentmerges them with caller-suppliedtransformers=at compile time.Summary
Register transformers on middlewaresubsection under "Custom updates" insrc/oss/langchain/event-streaming.mdx.ToolCallTransformer→ middleware-registered factories (in middleware order) → caller-suppliedtransformers=fromcreate_agent.:::pythonfenced) — the upstream PR only ships the Python surface. JS parity can be documented whenlangchainjsadds the equivalent.Reviewer notes
<Note>pins the minimum version tolangchain>=1.3.2(next patch after the current1.3.1). If the upstream PR ends up shipping in a different release, adjust the note.langchainrelease that contains it is published.Test plan
make lint_prose FILES="src/oss/langchain/event-streaming.mdx"— cleanlangchainrelease tag matches the<Note>before merge