diff --git a/FirebaseVertexAI/CHANGELOG.md b/FirebaseVertexAI/CHANGELOG.md index 870f0c53788..b4a67aff89f 100644 --- a/FirebaseVertexAI/CHANGELOG.md +++ b/FirebaseVertexAI/CHANGELOG.md @@ -2,6 +2,9 @@ - [fixed] Fixed an issue where `VertexAI.vertexAI(app: app1)` and `VertexAI.vertexAI(app: app2)` would return the same instance if their `location` was the same, including the default `us-central1`. (#14007) +- [changed] Removed `format: "double"` in `Schema.double()` since + double-precision accuracy isn't enforced by the model; continue using the + Swift `Double` type when decoding data produced with this schema. (#13990) # 11.4.0 - [feature] Vertex AI in Firebase is now Generally Available (GA) and can be diff --git a/FirebaseVertexAI/Sources/Types/Public/Schema.swift b/FirebaseVertexAI/Sources/Types/Public/Schema.swift index 93cf4f55127..a5fd2cdd0fb 100644 --- a/FirebaseVertexAI/Sources/Types/Public/Schema.swift +++ b/FirebaseVertexAI/Sources/Types/Public/Schema.swift @@ -184,15 +184,10 @@ public class Schema { ) } - /// Returns a `Schema` representing a double-precision floating-point number. + /// Returns a `Schema` representing a floating-point number. /// - /// This schema instructs the model to produce data of type `"NUMBER"` with the `format` - /// `"double"`, which is suitable for decoding into a Swift `Double` (or `Double?`, if `nullable` - /// is set to `true`). - /// - /// > Important: This `Schema` provides a hint to the model that it should generate a - /// > double-precision floating-point number, a `double`, but only guarantees that the value will - /// > be a number. + /// This schema instructs the model to produce data of type `"NUMBER"`, which is suitable for + /// decoding into a Swift `Double` (or `Double?`, if `nullable` is set to `true`). /// /// - Parameters: /// - description: An optional description of what the number should contain or represent; may @@ -202,7 +197,6 @@ public class Schema { public static func double(description: String? = nil, nullable: Bool = false) -> Schema { return self.init( type: .number, - format: "double", description: description, nullable: nullable )