Merge pull request #2341 from getchannel/realtime-text
Hotfix: Correct Gemini Live API class to fix 1007 payload error.
This commit is contained in:
@@ -983,17 +983,14 @@ class GeminiMultimodalLiveLLMService(LLMService):
|
|||||||
with audio and video inputs, preventing temporal misalignment that can occur
|
with audio and video inputs, preventing temporal misalignment that can occur
|
||||||
when different modalities are processed through separate API pathways.
|
when different modalities are processed through separate API pathways.
|
||||||
|
|
||||||
After sending the text, we signal turn completion to trigger a model response
|
For realtimeInput, turn completion is automatically inferred by the API based
|
||||||
for text-only interactions.
|
on user activity, so no explicit turnComplete signal is needed.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
text: The text to send as user input.
|
text: The text to send as user input.
|
||||||
"""
|
"""
|
||||||
evt = events.TextInputMessage.from_text(text)
|
evt = events.TextInputMessage.from_text(text)
|
||||||
await self.send_client_event(evt)
|
await self.send_client_event(evt)
|
||||||
# After sending text, we need to signal that the turn is complete.
|
|
||||||
evt = events.ClientContentMessage.model_validate({"clientContent": {"turnComplete": True}})
|
|
||||||
await self.send_client_event(evt)
|
|
||||||
|
|
||||||
async def _send_user_video(self, frame):
|
async def _send_user_video(self, frame):
|
||||||
"""Send user video frame to Gemini Live API."""
|
"""Send user video frame to Gemini Live API."""
|
||||||
|
|||||||
Reference in New Issue
Block a user