Conditions#
The conditions module contains functions that determine whether the pipeline component should be executed or not.
The standard set of them allows user to set up dependencies between pipeline components.
- always_start_condition(_, __)[source]#
Condition that always allows service execution. It’s the default condition for all services.
- Parameters:
_ – Current dialog context.
__ – Pipeline.
- Return type:
bool
- service_successful_condition(path=None)[source]#
Condition that allows service execution, only if the other service was executed successfully. Returns
StartConditionCheckerFunction
.
- not_condition(func)[source]#
Condition that returns opposite boolean value to the one returned by incoming function. Returns
StartConditionCheckerFunction
.
- aggregate_condition(aggregator, *functions)[source]#
Condition that returns aggregated boolean value from all booleans returned by incoming functions. Returns
StartConditionCheckerFunction
.
- all_condition(*functions)[source]#
Condition that returns True only if all incoming functions return True. Returns
StartConditionCheckerFunction
.