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

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.

/** Candidate responses from the model. */
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
@DellaBitta DellaBitta deleted the ddb-response-usagemetadata branch May 3, 2024 18:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants