Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: function_call not handled in BaseGenerateContentResponse.text #1379

Closed
1 task done
neilp9 opened this issue Nov 7, 2024 · 2 comments
Closed
1 task done

[Bug]: function_call not handled in BaseGenerateContentResponse.text #1379

neilp9 opened this issue Nov 7, 2024 · 2 comments

Comments

@neilp9
Copy link

neilp9 commented Nov 7, 2024

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 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
@koverholt
Copy link
Member

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).

@neilp9
Copy link
Author

neilp9 commented Nov 8, 2024

Thank you , logged here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants