@@ -20,7 +20,7 @@ import Foundation
2020// Avoids exposing internal FirebaseCore APIs to Swift users.
2121internal import FirebaseCoreExtension
2222
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.
2424@available ( iOS 15 . 0 , macOS 12 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
2525public final class FirebaseAI : Sendable {
2626 // MARK: - Public APIs
@@ -95,7 +95,7 @@ public final class FirebaseAI: Sendable {
9595
9696 /// **[Public Preview]** Initializes an ``ImagenModel`` with the given parameters.
9797 ///
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
9999 /// Preview, which means that the feature is not subject to any SLA or deprecation policy and
100100 /// could change in backwards-incompatible ways.
101101 ///
@@ -129,32 +129,23 @@ public final class FirebaseAI: Sendable {
129129 )
130130 }
131131
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.
134134 @objc ( FIRVertexAIComponent) class FirebaseVertexAIComponent : NSObject { }
135135
136136 // MARK: - Private
137137
138- /// Firebase data relevant to Vertex AI.
138+ /// Firebase data relevant to Firebase AI.
139139 let firebaseInfo : FirebaseInfo
140140
141141 let apiConfig : APIConfig
142142
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 ] = [ : ]
147146
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( )
158149
159150 let location : String ?
160151
@@ -225,7 +216,7 @@ public final class FirebaseAI: Sendable {
225216
226217 private func vertexAIModelResourceName( modelName: String ) -> String {
227218 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. " )
229220 }
230221 guard !location. isEmpty && location
231222 . allSatisfy ( { !$0. isWhitespace && !$0. isNewline && $0 != " / " } ) else {
@@ -250,7 +241,7 @@ public final class FirebaseAI: Sendable {
250241 }
251242 }
252243
253- /// Identifier for a unique instance of ``VertexAI ``.
244+ /// Identifier for a unique instance of ``FirebaseAI ``.
254245 ///
255246 /// This type is `Hashable` so that it can be used as a key in the `instances` dictionary.
256247 private struct InstanceKey : Sendable , Hashable {
0 commit comments