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 #127

Merged
merged 6 commits into from
May 3, 2024

Conversation

DellaBitta
Copy link
Collaborator

@DellaBitta DellaBitta commented May 3, 2024

Adds the UsageMetadata payload to GenerateContentResponse.

  • Tests pass locally.
  • Tests pass
  • Appropriate changes to documentation are included in the PR

@DellaBitta DellaBitta marked this pull request as ready for review May 3, 2024 14:24
@DellaBitta DellaBitta requested a review from hsubox76 May 3, 2024 16:43
Copy link
Collaborator

@hsubox76 hsubox76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for remembering to do the docs, forgot to check that on the last PR!
Can you also add a changeset? Minor since it changes the API.

candidates?: GenerateContentCandidate[];
/**
* A set of the feedback metadata the prompt specified in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is from the proto, but it's kind of garbled, maybe try using the proto comment next to the property which I think is more clear: https://source.corp.google.com/piper///depot/google3/google/ai/generativelanguage/v1main/generative_service.proto;l=444

@DellaBitta DellaBitta requested a review from hsubox76 May 3, 2024 17:56
Copy link
Collaborator

@hsubox76 hsubox76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, can you just add a changeset (minor)?

@DellaBitta
Copy link
Collaborator Author

Whoops, yep!

@DellaBitta DellaBitta requested a review from hsubox76 May 3, 2024 18:08
@DellaBitta DellaBitta merged commit 657799a into main May 3, 2024
4 checks passed
@DellaBitta DellaBitta deleted the ddb-response-usagemetadata branch May 3, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants