-
Notifications
You must be signed in to change notification settings - Fork 467
Closed
Labels
component:python sdkIssue/PR related to Python SDKIssue/PR related to Python SDKtype:bugSomething isn't workingSomething isn't working
Description
Description of the bug:
During regular use, some requests to Gemini are returning this error instead of the response (Python project running in Docker):
chat-app-1 | 2024-09-17 14:34:44.282 Uncaught app exception
chat-app-1 | Traceback (most recent call last):
chat-app-1 | File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
chat-app-1 | result = func()
chat-app-1 | File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec
chat-app-1 | exec(code, module.__dict__)
chat-app-1 | File "/app/chat.py", line 135, in <module>
chat-app-1 | if item.text:
chat-app-1 | File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 454, in text
chat-app-1 | if candidate.finish_message:
chat-app-1 | File "/usr/local/lib/python3.10/site-packages/proto/message.py", line 906, in __getattr__
chat-app-1 | raise AttributeError(
chat-app-1 | AttributeError: Unknown field for Candidate: finish_message
Actual vs expected behavior:
By reading the code from #527, I assume the expected behaviour would be to raise another error with the intended message
Any other information you'd like to share?
No response
alexeyw, lingxiao216 and ta-toshio
Metadata
Metadata
Assignees
Labels
component:python sdkIssue/PR related to Python SDKIssue/PR related to Python SDKtype:bugSomething isn't workingSomething isn't working