File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 2
2
- [ fixed] Fixed an issue where ` VertexAI.vertexAI(app: app1) ` and
3
3
` VertexAI.vertexAI(app: app2) ` would return the same instance if their
4
4
` location ` was the same, including the default ` us-central1 ` . (#14007 )
5
+ - [ changed] Removed ` format: "double" ` in ` Schema.double() ` since
6
+ double-precision accuracy isn't enforced by the model; continue using the
7
+ Swift ` Double ` type when decoding data produced with this schema. (#13990 )
5
8
6
9
# 11.4.0
7
10
- [ feature] Vertex AI in Firebase is now Generally Available (GA) and can be
Original file line number Diff line number Diff line change @@ -184,15 +184,10 @@ public class Schema {
184
184
)
185
185
}
186
186
187
- /// Returns a `Schema` representing a double-precision floating-point number.
187
+ /// Returns a `Schema` representing a floating-point number.
188
188
///
189
- /// This schema instructs the model to produce data of type `"NUMBER"` with the `format`
190
- /// `"double"`, which is suitable for decoding into a Swift `Double` (or `Double?`, if `nullable`
191
- /// is set to `true`).
192
- ///
193
- /// > Important: This `Schema` provides a hint to the model that it should generate a
194
- /// > double-precision floating-point number, a `double`, but only guarantees that the value will
195
- /// > be a number.
189
+ /// This schema instructs the model to produce data of type `"NUMBER"`, which is suitable for
190
+ /// decoding into a Swift `Double` (or `Double?`, if `nullable` is set to `true`).
196
191
///
197
192
/// - Parameters:
198
193
/// - description: An optional description of what the number should contain or represent; may
@@ -202,7 +197,6 @@ public class Schema {
202
197
public static func double( description: String ? = nil , nullable: Bool = false ) -> Schema {
203
198
return self . init (
204
199
type: . number,
205
- format: " double " ,
206
200
description: description,
207
201
nullable: nullable
208
202
)
You can’t perform that action at this time.
0 commit comments