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

Responses without candidates throwing IndexError #113

Closed
markmcd opened this issue Dec 13, 2023 · 3 comments
Closed

Responses without candidates throwing IndexError #113

markmcd opened this issue Dec 13, 2023 · 3 comments
Assignees
Labels
component:python sdk Issue/PR related to Python SDK type:bug Something isn't working

Comments

@markmcd
Copy link
Member

markmcd commented Dec 13, 2023

Description of the bug:

e.g.
image

I think ideally this would error with a relevant error message.

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

@markmcd markmcd added type:bug Something isn't working component:python sdk Issue/PR related to Python SDK labels Dec 13, 2023
@markmcd markmcd changed the title Responses without text throwing IndexError Responses without candidates throwing IndexError Dec 13, 2023
@MarkDaoust MarkDaoust self-assigned this Dec 14, 2023
@persianopencart
Copy link

@markmcd
Hi, is there any update for this issue?

@MarkDaoust
Copy link
Collaborator

I think this is fixed by #138.

I don't see another way this code can throw an index error.

https://github.com/google/generative-ai-python/blob/main/google/generativeai/types/generation_types.py#L286-L335

@MarkDaoust
Copy link
Collaborator

But LMK if I'm wrong, please send code to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:python sdk Issue/PR related to Python SDK type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants