Skip to content

Commit 58b7824

Browse files
committed
remove the backend check
1 parent ab991ad commit 58b7824

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

  • firebase-ai/app/src/main/java/com/google/firebase/quickstart/ai/feature/live

firebase-ai/app/src/main/java/com/google/firebase/quickstart/ai/feature/live/BidiViewModel.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,13 @@ class BidiViewModel(savedStateHandle: SavedStateHandle) : ViewModel() {
4141
responseModality = ResponseModality.AUDIO
4242
}
4343

44-
val defaultModelName = if (sample.backend == GenerativeBackend.googleAI()) {
45-
"gemini-2.5-flash-native-audio-preview-09-2025"
46-
} else {
47-
"gemini-live-2.5-flash-preview-native-audio-09-2025"
48-
}
49-
5044
@OptIn(PublicPreviewAPI::class)
5145
val liveModel =
5246
FirebaseAI.getInstance(Firebase.app, sample.backend)
5347
.liveModel(
54-
modelName = sample.modelName ?: defaultModelName,
48+
// If you are using Vertex AI, change the model name to
49+
// "gemini-live-2.5-flash-preview-native-audio-09-2025"
50+
modelName = sample.modelName ?: "gemini-2.5-flash-native-audio-preview-09-2025",
5551
generationConfig = liveGenerationConfig,
5652
tools = sample.tools,
5753
)

0 commit comments

Comments
 (0)