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

Unclear finish_reason #363

Closed
akshit0201 opened this issue May 27, 2024 · 3 comments
Closed

Unclear finish_reason #363

akshit0201 opened this issue May 27, 2024 · 3 comments
Labels
component:other Questions unrelated to SDK status:awaiting user response Awaiting a response from the author status:stale Issue/PR will be closed automatically if there's no further activity type:bug Something isn't working

Comments

@akshit0201
Copy link

Description of the bug:

I'm just asking to summarize a high school textbook which I'm feeding as images, was working perfectly fine on Friday, getting the following error today:

GenerateContentResponse(
    done=True,
    iterator=None,
    result=glm.GenerateContentResponse({
      "candidates": [
        {
          "finish_reason": 4,
          "index": 0,
          "safety_ratings": [],
          "token_count": 0,
          "grounding_attributions": []
        }
      ]
    }),
)

I don't understand what finish_reason 4 means, it's not given here: https://ai.google.dev/api/rest/v1/GenerateContentResponse

Actual vs expected behavior:

Actual: "finish_reason": 4

Expected: `"finish_reason": [Should be one of https://ai.google.dev/api/rest/v1/GenerateContentResponse#finishreason]

Any other information you'd like to share?

SDK version: 0.5.4

@akshit0201 akshit0201 added component:python sdk Issue/PR related to Python SDK type:bug Something isn't working labels May 27, 2024
@singhniraj08
Copy link

@akshit0201, Thank you reporting this issue. This looks like an intermittent error and should work now.
This repository is for issues related to Python SDK client bugs or improvements and the client doesn't control the service's responses. For issues related to Gemini API, we would suggest you to use "Send Feedback" option in Gemini docs. Ref: Screenshot below. You can also post this issue on Discourse forum.

image

@singhniraj08 singhniraj08 added status:awaiting user response Awaiting a response from the author component:other Questions unrelated to SDK and removed component:python sdk Issue/PR related to Python SDK labels May 30, 2024
Copy 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.

@github-actions github-actions bot added the status:stale Issue/PR will be closed automatically if there's no further activity label Jun 14, 2024
Copy link

This issue was closed because it has been inactive for 28 days. Please post a new issue if you need further assistance. Thanks!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:other Questions unrelated to SDK status:awaiting user response Awaiting a response from the author status:stale Issue/PR will be closed automatically if there's no further activity type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants