Merge pull request #4396 from pipecat-ai/aleix/remove-unused-user-mute-reset
refactor(user_mute): remove unused reset() method from strategies
This commit is contained in:
@@ -18,10 +18,6 @@ class AlwaysUserMuteStrategy(BaseUserMuteStrategy):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self._bot_speaking = False
|
self._bot_speaking = False
|
||||||
|
|
||||||
async def reset(self):
|
|
||||||
"""Reset the strategy to its initial state."""
|
|
||||||
self._bot_speaking = False
|
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame) -> bool:
|
async def process_frame(self, frame: Frame) -> bool:
|
||||||
"""Process an incoming frame.
|
"""Process an incoming frame.
|
||||||
|
|
||||||
|
|||||||
@@ -51,10 +51,6 @@ class BaseUserMuteStrategy(BaseObject):
|
|||||||
"""Cleanup the strategy."""
|
"""Cleanup the strategy."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
async def reset(self):
|
|
||||||
"""Reset the strategy to its initial state."""
|
|
||||||
pass
|
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame) -> bool:
|
async def process_frame(self, frame: Frame) -> bool:
|
||||||
"""Process an incoming frame.
|
"""Process an incoming frame.
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,6 @@ class FirstSpeechUserMuteStrategy(BaseUserMuteStrategy):
|
|||||||
self._bot_speaking = False
|
self._bot_speaking = False
|
||||||
self._first_speech_handled = False
|
self._first_speech_handled = False
|
||||||
|
|
||||||
async def reset(self):
|
|
||||||
"""Reset the strategy to its initial state."""
|
|
||||||
self._bot_speaking = False
|
|
||||||
self._first_speech_handled = False
|
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame) -> bool:
|
async def process_frame(self, frame: Frame) -> bool:
|
||||||
"""Process an incoming frame.
|
"""Process an incoming frame.
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ class FunctionCallUserMuteStrategy(BaseUserMuteStrategy):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self._function_call_in_progress: set[str] = set()
|
self._function_call_in_progress: set[str] = set()
|
||||||
|
|
||||||
async def reset(self):
|
|
||||||
"""Reset the strategy to its initial state."""
|
|
||||||
self._function_call_in_progress = set()
|
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame) -> bool:
|
async def process_frame(self, frame: Frame) -> bool:
|
||||||
"""Process an incoming frame.
|
"""Process an incoming frame.
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ class MuteUntilFirstBotCompleteUserMuteStrategy(BaseUserMuteStrategy):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self._first_speech_handled = False
|
self._first_speech_handled = False
|
||||||
|
|
||||||
async def reset(self):
|
|
||||||
"""Reset the strategy to its initial state."""
|
|
||||||
self._first_speech_handled = False
|
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame) -> bool:
|
async def process_frame(self, frame: Frame) -> bool:
|
||||||
"""Process an incoming frame.
|
"""Process an incoming frame.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user