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
calling session.send_message returns a GenerateContentResponse object, and when this response includes a function call, response.text should still work. Also, there should ideally be a convenience accessor for response.function_call
Instead, response.text throws an error when a function call is present
Relevant log output
File ".../.virtualenvs/cai/lib/python3.11/site-packages/google/generativeai/types/generation_types.py", line 538, in text
part_type = protos.Part.pb(part).whichOneof("data")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: whichOneof
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Thanks for the info. This repository is for Generative AI with Vertex AI on Google Cloud, not the Google AI Studio Gemini API. For issues with the Google AI Gemini API, you can report them in the appropriate repository in the google-gemini GitHub organization (https://github.com/google-gemini/generative-ai-python) or post a message on their developer forums (https://discuss.ai.google.dev/c/gemini-api/4).
File Name
google/generativeai/types/generation_types.py
What happened?
calling session.send_message returns a
GenerateContentResponse
object, and when this response includes a function call,response.text
should still work. Also, there should ideally be a convenience accessor forresponse.function_call
Instead, response.text throws an error when a function call is present
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: