Closed JeremyEastham closed 1 month ago
Hi @JeremyEastham , Since you haven't set the parameter 'enable_automatic_function_calling=True', you will need to manually call the function by yourself to get the generated text response. For reference please check the link.
Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.
This issue was closed because it has been inactive for 28 days. Please post a new issue if you need further assistance. Thanks!
Description of the bug:
The
GenerateContentResponse.text
property sometimes raises an exception when no text is returned from the API. The documentation states that this property is equivalent toresponse.candidates[0].content.parts[0].text
, but accessing that property does not always raise an exception whenresponse.text
does. One of these cases is when the model responds by calling a function without any text, which leads to an error when parsing theparts
list.Actual vs expected behavior:
Minimal example:
Any other information you'd like to share?
Related Issues:
231
196
170