-
Notifications
You must be signed in to change notification settings - Fork 318
Add UsageMetadata to GenerateContentResponse #127
Conversation
Added comments to the fields of GenerateContentResponse and UsageMetadata.
hsubox76
left a comment
There was a problem hiding this 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.
packages/main/types/responses.ts
Outdated
| /** Candidate responses from the model. */ | ||
| candidates?: GenerateContentCandidate[]; | ||
| /** | ||
| * A set of the feedback metadata the prompt specified in |
There was a problem hiding this comment.
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
hsubox76
left a comment
There was a problem hiding this 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)?
|
Whoops, yep! |
Adds the UsageMetadata payload to GenerateContentResponse.