remove LLMResponseStartFrame and LLMResponseEndFrame

This was added in the past to properly handle interruptions for the
LLMAssistantContextAggregator. But this is not necessary anymore since we can
handle interruptions by just processing the StartInterruptionFrame, so there's
no need for these extra frames.
This commit is contained in:
Aleix Conchillo Flaqué
2024-07-17 20:47:15 -07:00
parent d1b62c5495
commit 37027f68cb
8 changed files with 30 additions and 47 deletions

View File

@@ -8,8 +8,6 @@ from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
from pipecat.frames.frames import (
LLMFullResponseStartFrame,
LLMFullResponseEndFrame,
LLMResponseEndFrame,
LLMResponseStartFrame,
TextFrame
)
from pipecat.utils.test_frame_processor import TestFrameProcessor
@@ -64,7 +62,7 @@ if __name__ == "__main__":
llm.register_function("get_current_weather", get_weather_from_api)
t = TestFrameProcessor([
LLMFullResponseStartFrame,
[LLMResponseStartFrame, TextFrame, LLMResponseEndFrame],
TextFrame,
LLMFullResponseEndFrame
])
llm.link(t)
@@ -98,7 +96,7 @@ if __name__ == "__main__":
llm.register_function("get_current_weather", get_weather_from_api)
t = TestFrameProcessor([
LLMFullResponseStartFrame,
[LLMResponseStartFrame, TextFrame, LLMResponseEndFrame],
TextFrame,
LLMFullResponseEndFrame
])
llm.link(t)
@@ -121,7 +119,7 @@ if __name__ == "__main__":
api_key = os.getenv("OPENAI_API_KEY")
t = TestFrameProcessor([
LLMFullResponseStartFrame,
[LLMResponseStartFrame, TextFrame, LLMResponseEndFrame],
TextFrame,
LLMFullResponseEndFrame
])
llm = OpenAILLMService(