No op step
A step that does nothing.
References
NONE
NoOpStep(name, retry_config=None, error_handler=None, cache_store=None, cache_config=None)
Bases: BasePipelineStep
A step that does nothing.
This step is useful when you want to add a step that does not perform any processing. For example, you can use this step to implement a toggle pattern for a certain component.
Example:
pipeline = (
step_a
| ConditionalStep(
name="branch",
branches={
"execute": step_b,
"continue": NoOpStep("no_op")
},
condition=lambda x: "execute" if x["should_execute"] else "continue"
)
| step_c
)
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
A unique identifier for this pipeline step. |
execute(state, runtime, config=None)
async
Executes this step, which does nothing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
dict[str, Any]
|
The current state of the pipeline. |
required |
runtime
|
Runtime[dict[str, Any] | BaseModel]
|
Runtime information for this step's execution. |
required |
config
|
RunnableConfig | None
|
The runnable configuration. Defaults to None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
This step does not modify the pipeline state. |