Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vertex-ai] more accurate location error message #12948

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading