generative-ai-python icon indicating copy to clipboard operation
generative-ai-python copied to clipboard

Gemini version 0.5.* generate_content doesn't provide usageMetadata if stream=True

Open Mersanko opened this issue 1 year ago • 1 comments

Description of the bug:

I believe this is related to https://github.com/google/generative-ai-go/issues/97

Actual vs expected behavior:

As far as I remember, it worked earlier this week. I tried all version 0.5.* but the same issue. The issue was fixed when I utilized version 0.4.0 issue97

Any other information you'd like to share?

No response

Mersanko avatar May 03 '24 16:05 Mersanko

@Mersanko, I tried replicating the issue on our end and model.generate_content works with stream=True parameter. Ref: Screenshot below. Package version used: google.generativeai==0.5.2

Can you please share a colab gist with replicated issue so we can reproduce the issue on our end. Thank you.

image

singhniraj08 avatar May 06 '24 04:05 singhniraj08

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[bot] avatar May 21 '24 01:05 github-actions[bot]

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[bot] avatar Jun 04 '24 01:06 github-actions[bot]