_astream() — langchain Function Reference
Architecture documentation for the _astream() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9d4ca0da_5964_edaf_8d1d_fff4bcffbe96["_astream()"] a665c4a9_c39b_dae5_6804_3af3b58ecdfc["ModelWithAsyncStream"] 9d4ca0da_5964_edaf_8d1d_fff4bcffbe96 -->|defined in| a665c4a9_c39b_dae5_6804_3af3b58ecdfc 4751d0c5_d82f_367c_e1e4_20188bbcd56c["test_astream_implementation_uses_astream()"] 4751d0c5_d82f_367c_e1e4_20188bbcd56c -->|calls| 9d4ca0da_5964_edaf_8d1d_fff4bcffbe96 style 9d4ca0da_5964_edaf_8d1d_fff4bcffbe96 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/language_models/llms/test_base.py lines 217–226
async def _astream(
self,
prompt: str,
stop: list[str] | None = None,
run_manager: AsyncCallbackManagerForLLMRun | None = None,
**kwargs: Any,
) -> AsyncIterator[GenerationChunk]:
"""Stream the output of the model."""
yield GenerationChunk(text="a")
yield GenerationChunk(text="b")
Domain
Subdomains
Source
Frequently Asked Questions
What does _astream() do?
_astream() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/language_models/llms/test_base.py.
Where is _astream() defined?
_astream() is defined in libs/core/tests/unit_tests/language_models/llms/test_base.py at line 217.
What calls _astream()?
_astream() is called by 1 function(s): test_astream_implementation_uses_astream.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free