Skip to content

Commit 9754546

Browse files
authored
Remove format from double helper function (#6432)
We can omit the format for the double-precision floating point type See firebase/firebase-ios-sdk#13990 for further context
1 parent 80019ca commit 9754546

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

firebase-vertexai/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* [fixed] Improved error message when using an invalid location. (#6428)
33
* [fixed] Fixed issue where Firebase App Check error tokens were unintentionally missing from the requests. (#6409)
44
* [fixed] Clarified in the documentation that `Schema.integer` and `Schema.float` only provide hints to the model. (#6420)
5+
* [fixed] Fixed issue were `Schema.double` set the format parameter in `Schema`. (#6432)
56

67
# 16.0.1
78
* [fixed] Fixed issue where authorization headers weren't correctly formatted and were ignored by the backend. (#6400)

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ internal constructor(
105105
@JvmName("numDouble")
106106
@JvmOverloads
107107
public fun double(description: String? = null, nullable: Boolean = false): Schema =
108-
Schema(description = description, nullable = nullable, type = "NUMBER", format = "double")
108+
Schema(description = description, nullable = nullable, type = "NUMBER")
109109

110110
/**
111111
* Returns a [Schema] for a single-precision floating-point number.

firebase-vertexai/src/test/java/com/google/firebase/vertexai/SchemaTests.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ internal class SchemaTests {
6969
"coordinates": {
7070
"type": "OBJECT",
7171
"properties": {
72-
"latitude": {"type": "NUMBER", "format": "double"},
73-
"longitude": {"type": "NUMBER","format": "double"}
72+
"latitude": {"type": "NUMBER"},
73+
"longitude": {"type": "NUMBER"}
7474
},
7575
"required": ["latitude","longitude"]
7676
},
@@ -82,7 +82,7 @@ internal class SchemaTests {
8282
},
8383
"required": ["latitudinal","longitudinal"]
8484
},
85-
"elevation": {"type": "NUMBER","format": "double"},
85+
"elevation": {"type": "NUMBER"},
8686
"isCapital": {"type": "BOOLEAN"},
8787
"foundingDate": {"type": "STRING","format": "date","nullable": true}
8888
},
@@ -177,8 +177,8 @@ internal class SchemaTests {
177177
"description": "coordinates",
178178
"nullable": true,
179179
"properties": {
180-
"latitude": {"type": "NUMBER", "description": "latitude", "format": "double"},
181-
"longitude": {"type": "NUMBER", "description": "longitude", "format": "double"}
180+
"latitude": {"type": "NUMBER", "description": "latitude"},
181+
"longitude": {"type": "NUMBER", "description": "longitude"}
182182
},
183183
"required": ["latitude","longitude"]
184184
},

0 commit comments

Comments
 (0)