frames: remove AppFrame
This commit is contained in:
@@ -96,9 +96,6 @@ Notable control frames:
|
|||||||
|
|
||||||
## 7. Special Purpose Frames
|
## 7. Special Purpose Frames
|
||||||
|
|
||||||
### AppFrame
|
|
||||||
Base class for application-specific custom frames.
|
|
||||||
|
|
||||||
### MetricsFrame
|
### MetricsFrame
|
||||||
Contains performance metrics data.
|
Contains performance metrics data.
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import sys
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from pipecat.frames.frames import (
|
from pipecat.frames.frames import (
|
||||||
AppFrame,
|
DataFrame,
|
||||||
Frame,
|
Frame,
|
||||||
LLMFullResponseStartFrame,
|
LLMFullResponseStartFrame,
|
||||||
LLMMessagesFrame,
|
LLMMessagesFrame,
|
||||||
@@ -42,7 +42,7 @@ logger.add(sys.stderr, level="DEBUG")
|
|||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class MonthFrame(AppFrame):
|
class MonthFrame(DataFrame):
|
||||||
month: str
|
month: str
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|||||||
@@ -243,16 +243,6 @@ class TransportMessageFrame(DataFrame):
|
|||||||
return f"{self.name}(message: {self.message})"
|
return f"{self.name}(message: {self.message})"
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# App frames. Application user-defined frames.
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class AppFrame(Frame):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# System frames
|
# System frames
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
from typing import Tuple, Type
|
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
|
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
||||||
|
|
||||||
|
|
||||||
@@ -23,11 +23,7 @@ class FrameFilter(FrameProcessor):
|
|||||||
if isinstance(frame, self._types):
|
if isinstance(frame, self._types):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return (
|
return isinstance(frame, ControlFrame) or isinstance(frame, SystemFrame)
|
||||||
isinstance(frame, AppFrame)
|
|
||||||
or isinstance(frame, ControlFrame)
|
|
||||||
or isinstance(frame, SystemFrame)
|
|
||||||
)
|
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame, direction: FrameDirection):
|
async def process_frame(self, frame: Frame, direction: FrameDirection):
|
||||||
await super().process_frame(frame, direction)
|
await super().process_frame(frame, direction)
|
||||||
|
|||||||
Reference in New Issue
Block a user