Skip to content

Handle totalBillableCharacters optional decoding in Vertex AI #12715

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

Merged
merged 3 commits into from
Apr 10, 2024

Conversation

andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Apr 5, 2024

CountTokensResponse omits totalBillableCharacters on image-only prompts (no characters). Set totalBillableCharacters to 0 during decoding if the field is omitted from the JSON payload.

#no-changelog

@andrewheard andrewheard changed the title Make totalBillableCharacters optional in Vertex AI Handle totalBillableCharacters optional decoding in Vertex AI Apr 5, 2024
@andrewheard andrewheard requested a review from ncooke3 April 5, 2024 20:58
@andrewheard andrewheard requested a review from rlazo April 10, 2024 15:56
@andrewheard andrewheard merged commit 110f391 into vertex-ai Apr 10, 2024
42 checks passed
@andrewheard andrewheard deleted the ah/vertex-ai-billable-characters branch April 10, 2024 18:27
@firebase firebase locked and limited conversation to collaborators May 11, 2024
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.

3 participants