Principle:Langchain ai Langchain Input Preparation For Streaming
| Knowledge Sources | |
|---|---|
| Domains | NLP, Data_Preprocessing |
| Last Updated | 2026-02-11 00:00 GMT |
Overview
Normalization of user inputs into a unified message format as the first step of the streaming pipeline.
Description
The same input normalization used in non-streaming invocation applies to the streaming path. Both stream() and astream() call _convert_input() to normalize the input before configuring callbacks and initiating the streaming provider call. This ensures consistent input handling regardless of the execution path.
Usage
This is applied automatically within stream() and astream(). The developer does not interact with it directly.
Theoretical Basis
Same as the non-streaming Input_Preparation principle. The streaming path reuses the identical normalization logic.