Skip to content

v0.0.23

Latest

Choose a tag to compare

@markbackman markbackman released this 28 Feb 00:41
· 6 commits to main since this release
9ade05c

Added

  • Added cancel_on_interruption to FlowsFunctionSchemas.

  • Added @flows_direct_function decorator for attaching metadata to Pipecat direct functions. This allows configuring behavior like cancel_on_interruption on 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=False by default,
    ensuring all function calls complete even during user interruptions.

Changed

  • Changed cancel_on_interruption default from True to False in both FlowsFunctionSchema and @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.