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

[Vertex AI] Remove format for double() Schema #13990

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Oct 29, 2024

Removed the "double" format hint in Schema.double() since it is not enforced by the model. Developers should continue to decode the data produced into Double values to avoid losing precision where available.

Additionally, this works around a temporary backend issue where format is not accepted for numeric types. Unable to submit request because one or more response schemas specified incorrect schema type field. For schema with format, schema type should be STRING. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output (see #13977 for more details).

Note: This PR does not resolve the issue for float(); consider using double() until #13977 is resolved in the backend.

@andrewheard andrewheard added this to the 11.5.0 - M156 milestone Oct 29, 2024
@andrewheard andrewheard self-assigned this Oct 29, 2024
@andrewheard
Copy link
Contributor Author

@andrewheard andrewheard force-pushed the ah/vertex-float-workaround branch from ff258bc to 2419ec3 Compare November 5, 2024 20:56
@andrewheard andrewheard requested a review from rlazo November 5, 2024 21:16
@andrewheard andrewheard marked this pull request as ready for review November 5, 2024 21:18
@andrewheard andrewheard requested a review from ncooke3 November 5, 2024 21:41
@andrewheard
Copy link
Contributor Author

See firebase/firebase-android-sdk#6432 for the equivalent change in Kotlin.

@andrewheard andrewheard changed the title [Vertex AI] Remove format for floating-point Schema types Nov 5, 2024
@andrewheard andrewheard merged commit 1cdba8e into main Nov 5, 2024
38 checks passed
@andrewheard andrewheard deleted the ah/vertex-float-workaround branch November 5, 2024 21:43
rlazo added a commit to firebase/firebase-android-sdk that referenced this pull request Nov 6, 2024
We can omit the format for the double-precision floating point type

See firebase/firebase-ios-sdk#13990 for further
context
@firebase firebase locked and limited conversation to collaborators Dec 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants