frames: remove AppFrame

This commit is contained in:
Aleix Conchillo Flaqué
2024-12-02 14:49:52 -08:00
parent 42658ecd92
commit 52cefaa9d6
4 changed files with 4 additions and 21 deletions

View File

@@ -96,9 +96,6 @@ Notable control frames:
## 7. Special Purpose Frames
### AppFrame
Base class for application-specific custom frames.
### MetricsFrame
Contains performance metrics data.

View File

@@ -12,7 +12,7 @@ import sys
from dataclasses import dataclass
from pipecat.frames.frames import (
AppFrame,
DataFrame,
Frame,
LLMFullResponseStartFrame,
LLMMessagesFrame,
@@ -42,7 +42,7 @@ logger.add(sys.stderr, level="DEBUG")
@dataclass
class MonthFrame(AppFrame):
class MonthFrame(DataFrame):
month: str
def __str__(self):

View File

@@ -243,16 +243,6 @@ class TransportMessageFrame(DataFrame):
return f"{self.name}(message: {self.message})"
#
# App frames. Application user-defined frames.
#
@dataclass
class AppFrame(Frame):
pass
#
# System frames
#

View File

@@ -6,7 +6,7 @@
from typing import Tuple, Type
from pipecat.frames.frames import AppFrame, ControlFrame, Frame, SystemFrame
from pipecat.frames.frames import ControlFrame, Frame, SystemFrame
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
@@ -23,11 +23,7 @@ class FrameFilter(FrameProcessor):
if isinstance(frame, self._types):
return True
return (
isinstance(frame, AppFrame)
or isinstance(frame, ControlFrame)
or isinstance(frame, SystemFrame)
)
return isinstance(frame, ControlFrame) or isinstance(frame, SystemFrame)
async def process_frame(self, frame: Frame, direction: FrameDirection):
await super().process_frame(frame, direction)