Merge pull request #2590 from pipecat-ai/pk/gemini-multimodal-live-doesnt-support-llm-context

Raise an error when attempting to use Gemini Multimodal Live with uni…
This commit is contained in:
kompfner
2025-09-05 09:22:33 -04:00
committed by GitHub

View File

@@ -33,6 +33,7 @@ from pipecat.frames.frames import (
InputAudioRawFrame, InputAudioRawFrame,
InputImageRawFrame, InputImageRawFrame,
InputTextRawFrame, InputTextRawFrame,
LLMContextFrame,
LLMFullResponseEndFrame, LLMFullResponseEndFrame,
LLMFullResponseStartFrame, LLMFullResponseStartFrame,
LLMMessagesAppendFrame, LLMMessagesAppendFrame,
@@ -738,6 +739,10 @@ class GeminiMultimodalLiveLLMService(LLMService):
# Support just one tool call per context frame for now # Support just one tool call per context frame for now
tool_result_message = context.messages[-1] tool_result_message = context.messages[-1]
await self._tool_result(tool_result_message) await self._tool_result(tool_result_message)
elif isinstance(frame, LLMContextFrame):
raise NotImplementedError(
"Universal LLMContext is not yet supported for Gemini Multimodal Live."
)
elif isinstance(frame, InputTextRawFrame): elif isinstance(frame, InputTextRawFrame):
await self._send_user_text(frame.text) await self._send_user_text(frame.text)
await self.push_frame(frame, direction) await self.push_frame(frame, direction)