diff --git a/firebase-vertexai/CHANGELOG.md b/firebase-vertexai/CHANGELOG.md index 427696ef532..56606cf1740 100644 --- a/firebase-vertexai/CHANGELOG.md +++ b/firebase-vertexai/CHANGELOG.md @@ -2,6 +2,7 @@ * [fixed] Improved error message when using an invalid location. (#6428) * [fixed] Fixed issue where Firebase App Check error tokens were unintentionally missing from the requests. (#6409) * [fixed] Clarified in the documentation that `Schema.integer` and `Schema.float` only provide hints to the model. (#6420) +* [fixed] Fixed issue were `Schema.double` set the format parameter in `Schema`. (#6432) # 16.0.1 * [fixed] Fixed issue where authorization headers weren't correctly formatted and were ignored by the backend. (#6400) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt index 5d4b30870aa..b6f69e51d49 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt @@ -105,7 +105,7 @@ internal constructor( @JvmName("numDouble") @JvmOverloads public fun double(description: String? = null, nullable: Boolean = false): Schema = - Schema(description = description, nullable = nullable, type = "NUMBER", format = "double") + Schema(description = description, nullable = nullable, type = "NUMBER") /** * Returns a [Schema] for a single-precision floating-point number. diff --git a/firebase-vertexai/src/test/java/com/google/firebase/vertexai/SchemaTests.kt b/firebase-vertexai/src/test/java/com/google/firebase/vertexai/SchemaTests.kt index 4de73aebcde..747f65ac168 100644 --- a/firebase-vertexai/src/test/java/com/google/firebase/vertexai/SchemaTests.kt +++ b/firebase-vertexai/src/test/java/com/google/firebase/vertexai/SchemaTests.kt @@ -69,8 +69,8 @@ internal class SchemaTests { "coordinates": { "type": "OBJECT", "properties": { - "latitude": {"type": "NUMBER", "format": "double"}, - "longitude": {"type": "NUMBER","format": "double"} + "latitude": {"type": "NUMBER"}, + "longitude": {"type": "NUMBER"} }, "required": ["latitude","longitude"] }, @@ -82,7 +82,7 @@ internal class SchemaTests { }, "required": ["latitudinal","longitudinal"] }, - "elevation": {"type": "NUMBER","format": "double"}, + "elevation": {"type": "NUMBER"}, "isCapital": {"type": "BOOLEAN"}, "foundingDate": {"type": "STRING","format": "date","nullable": true} }, @@ -177,8 +177,8 @@ internal class SchemaTests { "description": "coordinates", "nullable": true, "properties": { - "latitude": {"type": "NUMBER", "description": "latitude", "format": "double"}, - "longitude": {"type": "NUMBER", "description": "longitude", "format": "double"} + "latitude": {"type": "NUMBER", "description": "latitude"}, + "longitude": {"type": "NUMBER", "description": "longitude"} }, "required": ["latitude","longitude"] },