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

Add usageMetadata to GenerateContentResponse #159

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

andrewheard
Copy link
Collaborator

Added usageMetadata to GenerateContentResponse. This is a port of firebase/firebase-ios-sdk#12777.

Notes:

  • Removed promptFeedback checks from testGenerateContent_success_basicReplyShort since it is no longer populated by the backend in this scenario.
  • Will re-run the prompts when promptTokenCount and totalTokenCount are added to the responses.
    • They are intentionally parsed as 0 when omitted.

@andrewheard andrewheard requested a review from paulb777 May 2, 2024 22:35
@github-actions github-actions bot added component:swift sdk Issue/PR related to Swift SDK status:awaiting review PR awaiting review from a maintainer labels May 2, 2024
@andrewheard andrewheard merged commit f94bdba into main May 3, 2024
9 checks passed
@andrewheard andrewheard deleted the ah/usage-metadata branch May 3, 2024 14:36
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:swift sdk Issue/PR related to Swift SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants