diff --git a/src/pipecat/services/gemini_multimodal_live/events.py b/src/pipecat/services/gemini_multimodal_live/events.py index c8530b7ee..0b4059830 100644 --- a/src/pipecat/services/gemini_multimodal_live/events.py +++ b/src/pipecat/services/gemini_multimodal_live/events.py @@ -487,13 +487,13 @@ def parse_server_event(str): ServerEvent instance if parsing succeeds, None otherwise. """ try: - evt_dict = json.loads(message_str) + evt_dict = json.loads(str) evt = ServerEvent.model_validate(evt_dict) return evt except Exception as e: logger.error(f"Error parsing server event: {e}") # Truncate raw message to avoid logging potentially sensitive or overly long data - truncated_message = message_str[:200] + "..." if len(message_str) > 200 else message_str + truncated_message = str[:200] + "..." if len(str) > 200 else str logger.error(f"Raw message (truncated): {truncated_message}") return None