_atransform() — langchain Function Reference
Architecture documentation for the _atransform() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6a8e40f9_b621_2878_43d7_e38d2dca02c5["_atransform()"] c4bf8d59_69f9_f8e5_efba_837c20df2360["RunnableSequence"] 6a8e40f9_b621_2878_43d7_e38d2dca02c5 -->|defined in| c4bf8d59_69f9_f8e5_efba_837c20df2360 df93336b_2161_a3ab_4adf_2f7000c37a15["_atransform()"] df93336b_2161_a3ab_4adf_2f7000c37a15 -->|calls| 6a8e40f9_b621_2878_43d7_e38d2dca02c5 178252a4_c169_63ca_3a82_a5f7a1dcd26b["_atransform()"] 178252a4_c169_63ca_3a82_a5f7a1dcd26b -->|calls| 6a8e40f9_b621_2878_43d7_e38d2dca02c5 df93336b_2161_a3ab_4adf_2f7000c37a15["_atransform()"] 6a8e40f9_b621_2878_43d7_e38d2dca02c5 -->|calls| df93336b_2161_a3ab_4adf_2f7000c37a15 style 6a8e40f9_b621_2878_43d7_e38d2dca02c5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/base.py lines 3488–3511
async def _atransform(
self,
inputs: AsyncIterator[Input],
run_manager: AsyncCallbackManagerForChainRun,
config: RunnableConfig,
**kwargs: Any,
) -> AsyncIterator[Output]:
steps = [self.first, *self.middle, self.last]
# stream the last steps
# transform the input stream of each step with the next
# steps that don't natively support transforming an input stream will
# buffer input in memory until all available, and then start emitting output
final_pipeline = cast("AsyncIterator[Output]", inputs)
for idx, step in enumerate(steps):
config = patch_config(
config,
callbacks=run_manager.get_child(f"seq:step:{idx + 1}"),
)
if idx == 0:
final_pipeline = step.atransform(final_pipeline, config, **kwargs)
else:
final_pipeline = step.atransform(final_pipeline, config)
async for output in final_pipeline:
yield output
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does _atransform() do?
_atransform() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is _atransform() defined?
_atransform() is defined in libs/core/langchain_core/runnables/base.py at line 3488.
What does _atransform() call?
_atransform() calls 1 function(s): _atransform.
What calls _atransform()?
_atransform() is called by 2 function(s): _atransform, _atransform.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free