mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(gemini realtime): pop tool_call_id mapping after use to bound memory
Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
parent
abb7080496
commit
c1647f6f59
1 changed files with 3 additions and 2 deletions
|
|
@ -345,8 +345,9 @@ class GeminiRealtimeConfig(BaseRealtimeConfig):
|
|||
except json.JSONDecodeError:
|
||||
output_dict = {"result": output}
|
||||
|
||||
# Look up the function name from stored mapping
|
||||
function_name = self._tool_call_id_to_name.get(call_id)
|
||||
# Look up the function name from stored mapping and remove the
|
||||
# entry to prevent unbounded growth in long-running sessions.
|
||||
function_name = self._tool_call_id_to_name.pop(call_id, None)
|
||||
if not function_name:
|
||||
verbose_logger.warning(
|
||||
f"Gemini Realtime: Function name not found for call_id={call_id}. "
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue