Skip to content

Commit

Permalink
[vertex-ai] more accurate location error message (#12948)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 authored and andrewheard committed May 13, 2024
1 parent bbd8a6e commit 2a07be6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions FirebaseVertexAI/Sources/VertexAI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public class VertexAI: NSObject {
/// - Parameters:
/// - app: The custom `FirebaseApp` used for initialization.
/// - location: The region identifier, defaulting to `us-central1`; see
/// [Vertex AI locations](https://firebase.google.com/docs/vertex-ai/locations?platform=ios)
/// [Vertex AI locations]
/// (https://firebase.google.com/docs/vertex-ai/locations?platform=ios#available-locations)
/// for a list of supported locations.
/// - Returns: A `VertexAI` instance, configured with the custom `FirebaseApp`.
public static func vertexAI(app: FirebaseApp, location: String = "us-central1") -> VertexAI {
Expand Down Expand Up @@ -132,8 +133,8 @@ public class VertexAI: NSObject {
.allSatisfy({ !$0.isWhitespace && !$0.isNewline && $0 != "/" }) else {
fatalError("""
Invalid location "\(location)" specified; see \
https://firebase.google.com/docs/vertex-ai/locations?platform=ios for a list of available \
locations.
https://firebase.google.com/docs/vertex-ai/locations?platform=ios#available-locations \
for a list of available locations.
""")
}

Expand Down

0 comments on commit 2a07be6

Please sign in to comment.