Skip to content

Commit 11fa180

Browse files
authored
refactor: use gemini-2.5 models for the Gemini Live quickstart (#2741)
* refactor: use gemini-2.5 models for the Gemini Live quickstart * remove the backend check
1 parent 1315f9e commit 11fa180

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

firebase-ai/app/src/main/java/com/google/firebase/quickstart/ai/FirebaseAISamples.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,6 @@ val FIREBASE_AI_SAMPLES = listOf(
275275
description = "Use bidirectional streaming to get information about" +
276276
" weather conditions for a specific US city on a specific date",
277277
navRoute = "stream",
278-
backend = GenerativeBackend.vertexAI(),
279-
modelName = "gemini-2.0-flash-live-preview-04-09",
280278
categories = listOf(Category.LIVE_API, Category.AUDIO, Category.FUNCTION_CALLING),
281279
tools = listOf(
282280
Tool.functionDeclarations(
@@ -305,8 +303,6 @@ val FIREBASE_AI_SAMPLES = listOf(
305303
description = "Use bidirectional streaming to chat with Gemini using your" +
306304
" phone's camera",
307305
navRoute = "streamVideo",
308-
backend = GenerativeBackend.vertexAI(),
309-
modelName = "gemini-2.0-flash-live-preview-04-09",
310306
categories = listOf(Category.LIVE_API, Category.VIDEO, Category.FUNCTION_CALLING),
311307
tools = listOf(
312308
Tool.functionDeclarations(

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ class BidiViewModel(savedStateHandle: SavedStateHandle) : ViewModel() {
4545
val liveModel =
4646
FirebaseAI.getInstance(Firebase.app, sample.backend)
4747
.liveModel(
48-
modelName = sample.modelName ?: "gemini-live-2.5-flash",
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",
4951
generationConfig = liveGenerationConfig,
5052
tools = sample.tools,
5153
)

0 commit comments

Comments
 (0)