Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

google_generative_ai-v0.3.3: Add usageMetadata to GenerateContentResponse (#143)

Choose a tag to compare

@natebosch natebosch released this 07 May 00:49
· 46 commits to main since this release
c3d87ab
Add `UsageMetadata` and relevante parsing. Add a `usageMetadata` field
on `GenerateContentResponse`.

Add usage of the new field to the advanced text sample.

Refactor the `GenerateContentResponse` parse method to handled each
field individually at the top level. There is a behavior change for an
error case, but it is not visible through the message formats that are
returned from the backend in practice.

Prepare to publish.