Skip to content

Commit a2292e4

Browse files
committed
[Vertex AI] Make Constants file internal and fix typos (#12916)
1 parent 334be7c commit a2292e4

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

FirebaseVertexAI/Sources/GenerativeAISwift.swift renamed to FirebaseVertexAI/Sources/Constants.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import Foundation
1818
#warning("Only iOS, macOS, and Catalyst targets are currently fully supported.")
1919
#endif
2020

21-
/// Constants associated with the GenerativeAISwift SDK.
21+
/// Constants associated with the Vertex AI for Firebase SDK.
2222
@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *)
23-
public enum GenerativeAISwift {
23+
enum Constants {
2424
/// The Vertex AI backend endpoint URL.
2525
static let baseURL = "https://firebaseml.googleapis.com"
2626
}

FirebaseVertexAI/Sources/CountTokensRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extension CountTokensRequest: GenerativeAIRequest {
2626
typealias Response = CountTokensResponse
2727

2828
var url: URL {
29-
URL(string: "\(GenerativeAISwift.baseURL)/\(options.apiVersion)/\(model):countTokens")!
29+
URL(string: "\(Constants.baseURL)/\(options.apiVersion)/\(model):countTokens")!
3030
}
3131
}
3232

FirebaseVertexAI/Sources/GenerateContentRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extension GenerateContentRequest: GenerativeAIRequest {
4545
typealias Response = GenerateContentResponse
4646

4747
var url: URL {
48-
let modelURL = "\(GenerativeAISwift.baseURL)/\(options.apiVersion)/\(model)"
48+
let modelURL = "\(Constants.baseURL)/\(options.apiVersion)/\(model)"
4949
if isStreaming {
5050
return URL(string: "\(modelURL):streamGenerateContent?alt=sse")!
5151
} else {

FirebaseVertexAI/Sources/ModelContent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import Foundation
1919
/// may comprise multiple heterogeneous ``ModelContent/Part``s.
2020
@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *)
2121
public struct ModelContent: Equatable {
22-
/// A discrete piece of data in a media format intepretable by an AI model. Within a single value
22+
/// A discrete piece of data in a media format interpretable by an AI model. Within a single value
2323
/// of ``Part``, different data types may not mix.
2424
public enum Part: Equatable {
2525
/// Text value.

FirebaseVertexAI/Sources/Safety.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ public struct SafetyRating: Equatable, Hashable {
2424
public let category: SafetySetting.HarmCategory
2525

2626
/// The model-generated probability that a given piece of content falls under the harm category
27-
/// described in ``category``. This does not
28-
/// indiciate the severity of harm for a piece of content. See ``HarmProbability`` for a list of
29-
/// possible values.
27+
/// described in ``SafetySetting/HarmCategory``. This does not indicate the severity of harm for a
28+
/// piece of content. See ``HarmProbability`` for a list of possible values.
3029
public let probability: HarmProbability
3130

3231
/// Initializes a new `SafetyRating` instance with the given category and probability.

FirebaseVertexAI/Sources/VertexAI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Foundation
2020
// Avoids exposing internal FirebaseCore APIs to Swift users.
2121
@_implementationOnly import FirebaseCoreExtension
2222

23-
/// The Vertex AI service for Firebase.
23+
/// The Vertex AI for Firebase SDK provides access to Gemini models directly from your app.
2424
@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *)
2525
public class VertexAI: NSObject {
2626
// MARK: - Public APIs

0 commit comments

Comments
 (0)