Fix a bug in GeminiLiveLLMService where in some circumstances it wouldn't respond after a tool call
This commit is contained in:
@@ -76,6 +76,9 @@ reason")`.
|
|||||||
arbitrary request data from client due to camelCase typing. This fixes data
|
arbitrary request data from client due to camelCase typing. This fixes data
|
||||||
passthrough for JS clients where `APIRequest` is used.
|
passthrough for JS clients where `APIRequest` is used.
|
||||||
|
|
||||||
|
- Fixed a bug in `GeminiLiveLLMService` where in some circumstances it wouldn't
|
||||||
|
respond after a tool call.
|
||||||
|
|
||||||
- Fixed `GeminiLiveLLMService` session resumption after a connection timeout.
|
- Fixed `GeminiLiveLLMService` session resumption after a connection timeout.
|
||||||
|
|
||||||
- `GeminiLiveLLMService` now properly supports context-provided system
|
- `GeminiLiveLLMService` now properly supports context-provided system
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ voice transcription, streaming responses, and tool usage.
|
|||||||
|
|
||||||
import base64
|
import base64
|
||||||
import io
|
import io
|
||||||
import json
|
|
||||||
import random
|
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
import warnings
|
import warnings
|
||||||
@@ -1012,7 +1010,13 @@ class GeminiLiveLLMService(LLMService):
|
|||||||
if part.function_response:
|
if part.function_response:
|
||||||
tool_call_id = part.function_response.id
|
tool_call_id = part.function_response.id
|
||||||
tool_name = part.function_response.name
|
tool_name = part.function_response.name
|
||||||
if tool_call_id and tool_call_id not in self._completed_tool_calls:
|
response = part.function_response.response
|
||||||
|
if (
|
||||||
|
tool_call_id
|
||||||
|
and tool_call_id not in self._completed_tool_calls
|
||||||
|
and response
|
||||||
|
and response.get("value") != "IN_PROGRESS"
|
||||||
|
):
|
||||||
# Found a newly-completed function call - send the result to the service
|
# Found a newly-completed function call - send the result to the service
|
||||||
if send_new_results:
|
if send_new_results:
|
||||||
await self._tool_result(
|
await self._tool_result(
|
||||||
|
|||||||
Reference in New Issue
Block a user