Skip to content

Commit

Permalink
frames: StartFrame is now a control frame
Browse files Browse the repository at this point in the history
  • Loading branch information
aconchillo committed Jul 24, 2024
1 parent 5bb6409 commit 0fd2fca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- `StartFrame` is now a control frame similar to `EndFrame`.

### Fixed

- Fixed a `BaseInputTransport` issue that was causing incoming system frames to
Expand Down
16 changes: 8 additions & 8 deletions src/pipecat/frames/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,6 @@ class SystemFrame(Frame):
pass


@dataclass
class StartFrame(SystemFrame):
"""This is the first frame that should be pushed down a pipeline."""
allow_interruptions: bool = False
enable_metrics: bool = False
report_only_initial_ttfb: bool = False


@dataclass
class CancelFrame(SystemFrame):
"""Indicates that a pipeline needs to stop right away."""
Expand Down Expand Up @@ -306,6 +298,14 @@ class ControlFrame(Frame):
pass


@dataclass
class StartFrame(ControlFrame):
"""This is the first frame that should be pushed down a pipeline."""
allow_interruptions: bool = False
enable_metrics: bool = False
report_only_initial_ttfb: bool = False


@dataclass
class EndFrame(ControlFrame):
"""Indicates that a pipeline has ended and frame processors and pipelines
Expand Down

0 comments on commit 0fd2fca

Please sign in to comment.