Added
-
Added
cancel_on_interruptiontoFlowsFunctionSchemas. -
Added
@flows_direct_functiondecorator for attaching metadata to Pipecat direct functions. This allows configuring behavior likecancel_on_interruptionon the function definition.Example usage:
from pipecat_flows import flows_direct_function, FlowManager @flows_direct_function(cancel_on_interruption=False) async def long_running_task(flow_manager: FlowManager, query: str): """Perform a task that should not be cancelled on interruption. Args: query: The query to process. """ # ... implementation return {"status": "complete"}, None
Non-decorated direct functions use
cancel_on_interruption=Falseby default,
ensuring all function calls complete even during user interruptions.
Changed
- Changed
cancel_on_interruptiondefault fromTruetoFalsein bothFlowsFunctionSchemaand@flows_direct_function. Function calls now complete even during user interruptions by default, preventing stalled transitions and dropped results.
Fixed
- Fixed interrupted transition leaving flow permanently stuck when a user interruption cancelled a function call mid-execution.