You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the current test_gemini_chat (gemini_test.GeminiModelWrapperTest) is not compatible with response.candidates, and I got the following error in pr Gemini chat wrapper fix due to this reason.:
ERROR: test_gemini_chat (gemini_test.GeminiModelWrapperTest)
Test for chat API.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/unittest/mock.py", line 1336, in patched
return func(*newargs, **newkeywargs)
File "/home/runner/work/agentscope/agentscope/tests/gemini_test.py", line 62, in test_gemini_chat
response = model(contents="Hi!")
File "/home/runner/work/agentscope/agentscope/src/agentscope/models/model.py", line 117, in checking_wrapper
return model_call(self, *args, **kwargs)
File "/home/runner/work/agentscope/agentscope/src/agentscope/models/gemini_model.py", line 153, in __call__
if response.candidates:
AttributeError: 'DummyResponse' object has no attribute 'candidates'
However, I think response.candidates is essential for error handling in the event that response returned from API does not contain any text (see the pr Gemini chat wrapper fix for details).
The text was updated successfully, but these errors were encountered:
It seems the current test_gemini_chat (gemini_test.GeminiModelWrapperTest) is not compatible with
response.candidates
, and I got the following error in prGemini chat wrapper fix
due to this reason.:However, I think
response.candidates
is essential for error handling in the event thatresponse
returned from API does not contain any text (see the prGemini chat wrapper fix
for details).The text was updated successfully, but these errors were encountered: