Skip to content

Commit 6f7575d

Browse files
committed
Use configured location in websocket
1 parent 2ce2724 commit 6f7575d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

FirebaseAI/Sources/Types/Internal/Live/LiveSessionService.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,9 @@ actor LiveSessionService {
309309
/// Will apply the required app check and auth headers, as the backend expects them.
310310
private nonisolated func createWebsocket() async throws -> AsyncWebSocket {
311311
let host = apiConfig.service.endpoint.rawValue.withoutPrefix("https://")
312-
// TODO: (b/448722577) Set a location based on the api config
313312
let urlString = switch apiConfig.service {
314313
case .vertexAI:
315-
"wss://\(host)/ws/google.firebase.vertexai.v1beta.LlmBidiService/BidiGenerateContent/locations/us-central1"
314+
"wss://\(host)/ws/google.firebase.vertexai.v1beta.LlmBidiService/BidiGenerateContent/locations/\(apiConfig.location ?? "us-central1")"
316315
case .googleAI:
317316
"wss://\(host)/ws/google.firebase.vertexai.v1beta.GenerativeService/BidiGenerateContent"
318317
}

0 commit comments

Comments
 (0)