@@ -20,7 +20,7 @@ import Foundation
20
20
// Avoids exposing internal FirebaseCore APIs to Swift users.
21
21
internal import FirebaseCoreExtension
22
22
23
- /// The Vertex AI for Firebase SDK provides access to Gemini models directly from your app.
23
+ /// The Firebase AI SDK provides access to Gemini models directly from your app.
24
24
@available ( iOS 15 . 0 , macOS 12 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
25
25
public final class FirebaseAI : Sendable {
26
26
// MARK: - Public APIs
@@ -95,7 +95,7 @@ public final class FirebaseAI: Sendable {
95
95
96
96
/// **[Public Preview]** Initializes an ``ImagenModel`` with the given parameters.
97
97
///
98
- /// > Warning: For Vertex AI in Firebase , image generation using Imagen 3 models is in Public
98
+ /// > Warning: For Firebase AI SDK , image generation using Imagen 3 models is in Public
99
99
/// Preview, which means that the feature is not subject to any SLA or deprecation policy and
100
100
/// could change in backwards-incompatible ways.
101
101
///
@@ -129,32 +129,23 @@ public final class FirebaseAI: Sendable {
129
129
)
130
130
}
131
131
132
- /// Class to enable VertexAI to register via the Objective-C based Firebase component system
133
- /// to include VertexAI in the userAgent.
132
+ /// Class to enable FirebaseAI to register via the Objective-C based Firebase component system
133
+ /// to include FirebaseAI in the userAgent.
134
134
@objc ( FIRVertexAIComponent) class FirebaseVertexAIComponent : NSObject { }
135
135
136
136
// MARK: - Private
137
137
138
- /// Firebase data relevant to Vertex AI.
138
+ /// Firebase data relevant to Firebase AI.
139
139
let firebaseInfo : FirebaseInfo
140
140
141
141
let apiConfig : APIConfig
142
142
143
- #if compiler(>=6)
144
- /// A map of active `VertexAI` instances keyed by the `FirebaseApp` name and the `location`, in
145
- /// the format `appName:location`.
146
- private nonisolated ( unsafe) static var instances : [ InstanceKey : FirebaseAI ] = [ : ]
143
+ /// A map of active `FirebaseAI` instances keyed by the `FirebaseApp` name and the `location`,
144
+ /// in the format `appName:location`.
145
+ private nonisolated ( unsafe) static var instances : [ InstanceKey : FirebaseAI ] = [ : ]
147
146
148
- /// Lock to manage access to the `instances` array to avoid race conditions.
149
- private nonisolated ( unsafe) static var instancesLock : os_unfair_lock = . init( )
150
- #else
151
- /// A map of active `VertexAI` instances keyed by the `FirebaseApp` name and the `location`, in
152
- /// the format `appName:location`.
153
- private static var instances : [ InstanceKey : VertexAI ] = [ : ]
154
-
155
- /// Lock to manage access to the `instances` array to avoid race conditions.
156
- private static var instancesLock : os_unfair_lock = . init( )
157
- #endif
147
+ /// Lock to manage access to the `instances` array to avoid race conditions.
148
+ private nonisolated ( unsafe) static var instancesLock : os_unfair_lock = . init( )
158
149
159
150
let location : String ?
160
151
@@ -225,7 +216,7 @@ public final class FirebaseAI: Sendable {
225
216
226
217
private func vertexAIModelResourceName( modelName: String ) -> String {
227
218
guard let location else {
228
- fatalError ( " Location must be specified for the Vertex AI service. " )
219
+ fatalError ( " Location must be specified for the Firebase AI service. " )
229
220
}
230
221
guard !location. isEmpty && location
231
222
. allSatisfy ( { !$0. isWhitespace && !$0. isNewline && $0 != " / " } ) else {
@@ -250,7 +241,7 @@ public final class FirebaseAI: Sendable {
250
241
}
251
242
}
252
243
253
- /// Identifier for a unique instance of ``VertexAI ``.
244
+ /// Identifier for a unique instance of ``FirebaseAI ``.
254
245
///
255
246
/// This type is `Hashable` so that it can be used as a key in the `instances` dictionary.
256
247
private struct InstanceKey : Sendable , Hashable {
0 commit comments