Simplify frames in the NotifierGate

This commit is contained in:
Mark Backman
2025-08-22 11:24:24 -04:00
parent 4d49210a73
commit 69c6a95b8a

View File

@@ -22,18 +22,13 @@ from loguru import logger
from pipecat.frames.frames import ( from pipecat.frames.frames import (
BotInterruptionFrame, BotInterruptionFrame,
CancelFrame,
CancelTaskFrame,
EndFrame, EndFrame,
EndTaskFrame,
Frame, Frame,
LLMFullResponseEndFrame, LLMFullResponseEndFrame,
LLMFullResponseStartFrame, LLMFullResponseStartFrame,
LLMTextFrame, LLMTextFrame,
StartInterruptionFrame,
StopFrame, StopFrame,
StopInterruptionFrame, SystemFrame,
StopTaskFrame,
TTSAudioRawFrame, TTSAudioRawFrame,
TTSStartedFrame, TTSStartedFrame,
TTSStoppedFrame, TTSStoppedFrame,
@@ -104,19 +99,7 @@ class NotifierGate(FrameProcessor):
await self.push_frame(frame, direction) await self.push_frame(frame, direction)
elif isinstance( elif isinstance(
frame, frame,
( (SystemFrame, EndFrame, StopFrame),
BotInterruptionFrame,
CancelFrame,
CancelTaskFrame,
EndTaskFrame,
EndFrame,
StartInterruptionFrame,
StopInterruptionFrame,
StopFrame,
StopTaskFrame,
UserStartedSpeakingFrame,
UserStoppedSpeakingFrame,
),
): ):
await self.push_frame(frame, direction) await self.push_frame(frame, direction)