Skip to content

Releases: pipecat-ai/pipecat-flows

v0.0.14

09 Feb 12:37
690f2de
Compare
Choose a tag to compare

Reverted

  • Temporarily reverted the deprecation of the tts parameter in
    FlowManager.__init__(). This feature will be deprecated in a future release
    after the required Pipecat changes are completed.

v0.0.13

06 Feb 18:55
ddcb7b7
Compare
Choose a tag to compare

Added

  • Added context update strategies to control how context is managed during node
    transitions:
    • APPEND: Add new messages to existing context (default behavior)
    • RESET: Clear and replace context with new messages and most recent
      function call results
    • RESET_WITH_SUMMARY: Reset context but include an LLM-generated summary
      along with the new messages
    • Strategies can be set globally or per-node
    • Includes automatic fallback to RESET if summary generation fails

Example usage:

# Global strategy
flow_manager = FlowManager(
    context_strategy=ContextStrategyConfig(
        strategy=ContextStrategy.RESET
    )
)

# Per-node strategy
node_config = {
    "task_messages": [...],
    "functions": [...],
    "context_strategy": ContextStrategyConfig(
        strategy=ContextStrategy.RESET_WITH_SUMMARY,
        summary_prompt="Summarize the key points discussed so far."
    )
}
  • Added a new function called get_current_context which provides access to
    the LLM context.

Example usage:

# Access current conversation context
context = flow_manager.get_current_context()
  • Added a new dynamic example called restaurant_reservation.py.

Changed

  • Transition callbacks now receive function results directly as a second argument:
    async def handle_transition(args: Dict, result: FlowResult, flow_manager: FlowManager).
    This enables direct access to typed function results for making routing decisions.
    For backwards compatibility, the two-argument signature
    (args: Dict, flow_manager: FlowManager) is still supported.

  • Updated dynamic examples to use the new result argument.

Deprecated

  • The tts parameter in FlowManager.__init__() is now deprecated and will
    be removed in a future version. The tts_say action now pushes a
    TTSSpeakFrame.

v0.0.12

30 Jan 14:06
2fd5d80
Compare
Choose a tag to compare

Added

  • Support for inline action handlers in flow configuration:
    • Actions can now be registered via handler field in config
    • Maintains backwards compatibility with manual registration
    • Built-in actions (tts_say, end_conversation) work without changes

Example of the new pattern:

"pre_actions": [
    {
        "type": "check_status",
        "handler": check_status_handler
    }
]

Changed

  • Updated dynamic flows to use per-function, inline transition callbacks:
    • Removed global transition_callback from FlowManager initialization
    • Transition handlers are now specified directly in function definitions
    • Dynamic transitions are now specified similarly to the static flows'
      transition_to field
    • Breaking change: Dynamic flows must now specify transition callbacks in
      function configuration

Example of the new pattern:

# Before - global transition callback
flow_manager = FlowManager(
    transition_callback=handle_transition
)

# After - inline transition callbacks
def create_node() -> NodeConfig:
    return {
        "functions": [{
            "type": "function",
            "function": {
                "name": "collect_age",
                "handler": collect_age,
                "description": "Record user's age",
                "parameters": {...},
                "transition_callback": handle_age_collection
            }
        }]
    }
  • Updated dynamic flow examples to use the new transition_callback pattern.

Fixed

  • Fixed an issue where multiple, consecutive function calls could result in two completions.

v0.0.11

19 Jan 17:09
5d223ae
Compare
Choose a tag to compare

Changed

  • Updated FlowManager to more predictably handle function calls:

    • Edge functions (which transition to a new node) now result in an LLM
      completion after both the function call and messages are added to the
      LLM's context.
    • Node functions (which execute a function call without transitioning nodes)
      result in an LLM completion upon the function call result returning.
    • This change also improves the reliability of the pre- and post-action
      execution timing.
  • Breaking changes:

    • The FlowManager has a new required arg, context_aggregator.
    • Pipecat's minimum version has been updated to 0.0.53 in order to use the
      new FunctionCallResultProperties frame.
  • Updated all examples to align with the new changes.

v0.0.10

21 Dec 13:44
ab224dc
Compare
Choose a tag to compare

Changed

  • Nodes now have two message types to better delineate defining the role or
    persona of the bot from the task it needs to accomplish. The message types are:

    • role_messages, which defines the personality or role of the bot
    • task_messages, which defines the task to be completed for a given node
  • role_messages can be defined for the initial node and then inherited by
    subsequent nodes. You can treat this as an LLM "system" message.

  • Simplified FlowManager initialization by removing the need for manual context
    setup in both static and dynamic flows. Now, you need to create a FlowManager
    and initialize it to start the flow.

  • All examples have been updated to align with the API changes.

Fixed

  • Fixed an issue where importing the Flows module would require OpenAI,
    Anthropic, and Google LLM modules.

v0.0.9

08 Dec 15:06
e729054
Compare
Choose a tag to compare

Changed

  • Fixed function handler registration in FlowManager to handle __function__: tokens
    • Previously, the handler string was used directly, causing "not callable" errors
    • Now correctly looks up and uses the actual function object from the main module
    • Supports both direct function references and function names exported from the Flows editor

v0.0.8

07 Dec 15:18
38ed003
Compare
Choose a tag to compare

Changed

  • Improved type safety in FlowManager by requiring keyword arguments for initialization
  • Enhanced error messages for LLM service type validation

v0.0.7

06 Dec 06:38
8816ed0
Compare
Choose a tag to compare

Added

  • New transition_to field for static flows
    • Combines function handlers with state transitions
    • Supports all LLM providers (OpenAI, Anthropic, Gemini)
    • Static examples updated to use this new transition

Changed

  • Static flow transitions now use transition_to instead of matching function names
    • Before: Function name had to match target node name
    • After: Function explicitly declares target via transition_to

Fixed

  • Duplicate LLM responses during transitions

v0.0.6

03 Dec 04:06
4d997f1
Compare
Choose a tag to compare

Added

  • New FlowManager supporting both static and dynamic conversation flows
    • Static flows: Configuration-driven with predefined paths
    • Dynamic flows: Runtime-determined conversation paths
    • Documentation: Guide and Reference
  • Provider-specific examples demonstrating dynamic flows:
    • OpenAI: insurance_openai.py
    • Anthropic: insurance_anthropic.py
    • Gemini: insurance_gemini.py
  • Type safety improvements:
    • FlowArgs: Type-safe function arguments
    • FlowResult: Type-safe function returns

Changed

  • Simplified function handling:
    • Automatic LLM function registration
    • Optional handlers for edge nodes
  • Updated all examples to use unified FlowManager interface

v0.0.5

27 Nov 21:00
3c15837
Compare
Choose a tag to compare

Added

  • Added LLM support for:

    • Anthropic
    • Google Gemini
  • Added LLMFormatParser, a format parser to handle LLM provider-specific
    messages and function call formats

  • Added new examples:

    • movie_explorer_anthropic.py (Claude 3.5)
    • movie_explorer_gemini.py (Gemini 1.5 Flash)
    • travel_planner_gemini.py (Gemini 1.5 Flash)