fixing google llm service error

This commit is contained in:
Vaibhav159
2025-02-12 22:22:04 +05:30
parent 80e1325621
commit 687b3d9d4c
2 changed files with 7 additions and 3 deletions

View File

@@ -61,6 +61,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed an issue[#1192] in 11labs where we are trying to reconnect/disconnect the
websocket connection even when the connection is already closed.
- Fixed an issue where `has_regular_messages` condition was always been true in
`GoogleLLMContext` due to `Part` having `function_call` & `function_response` with
`None` values.
## [0.0.56] - 2025-02-06
### Changed

View File

@@ -604,9 +604,9 @@ class GoogleLLMContext(OpenAILLMContext):
# Check if we only have function-related messages (no regular text)
has_regular_messages = any(
len(msg.parts) == 1
and hasattr(msg.parts[0], "text")
and not hasattr(msg.parts[0], "function_call")
and not hasattr(msg.parts[0], "function_response")
and not getattr(msg.parts[0], "text", None)
and getattr(msg.parts[0], "function_call", None)
and getattr(msg.parts[0], "function_response", None)
for msg in self._messages
)