11package com.google.firebase.quickstart.ai
22
3+ import com.google.firebase.ai.type.GenerativeBackend
34import com.google.firebase.ai.type.ResponseModality
45import com.google.firebase.ai.type.content
56import com.google.firebase.ai.type.generationConfig
@@ -86,10 +87,11 @@ val FIREBASE_AI_SAMPLES = listOf(
8687 }
8788 ),
8889 Sample (
89- title = " Translation from audio" ,
90- description = " Translate an audio file" ,
90+ title = " Translation from audio (Vertex AI) " ,
91+ description = " Translate an audio file stored in Cloud Storage " ,
9192 navRoute = " chat" ,
9293 categories = listOf (Category .AUDIO ),
94+ backend = GenerativeBackend .vertexAI(),
9395 initialPrompt = content {
9496 fileData(
9597 " https://storage.googleapis.com/cloud-samples-data/generative-ai/audio/" +
@@ -100,10 +102,11 @@ val FIREBASE_AI_SAMPLES = listOf(
100102 }
101103 ),
102104 Sample (
103- title = " Blog post creator" ,
104- description = " Create a blog post from an image file." ,
105+ title = " Blog post creator (Vertex AI) " ,
106+ description = " Create a blog post from an image file stored in Cloud Storage ." ,
105107 navRoute = " chat" ,
106108 categories = listOf (Category .IMAGE ),
109+ backend = GenerativeBackend .vertexAI(),
107110 initialPrompt = content {
108111 fileData(
109112 " https://storage.googleapis.com/cloud-samples-data/generative-ai/image/meal-prep.jpeg" ,
@@ -145,10 +148,12 @@ val FIREBASE_AI_SAMPLES = listOf(
145148 }
146149 ),
147150 Sample (
148- title = " Document comparison" ,
149- description = " Compare the contents of 2 documents" ,
151+ title = " Document comparison (Vertex AI)" ,
152+ description = " Compare the contents of 2 documents." +
153+ " Only supported by the Vertex AI Gemini API because the documents are stored in Cloud Storage" ,
150154 navRoute = " chat" ,
151155 categories = listOf (Category .DOCUMENT ),
156+ backend = GenerativeBackend .vertexAI(),
152157 initialPrompt = content {
153158 fileData(
154159 " https://storage.googleapis.com/cloud-samples-data/generative-ai/pdf/form_1040_2013.pdf" ,
@@ -165,10 +170,11 @@ val FIREBASE_AI_SAMPLES = listOf(
165170 }
166171 ),
167172 Sample (
168- title = " Hashtags for a video" ,
169- description = " Generate hashtags for a video ad" ,
173+ title = " Hashtags for a video (Vertex AI) " ,
174+ description = " Generate hashtags for a video ad stored in Cloud Storage " ,
170175 navRoute = " chat" ,
171176 categories = listOf (Category .VIDEO ),
177+ backend = GenerativeBackend .vertexAI(),
172178 initialPrompt = content {
173179 fileData(
174180 " https://storage.googleapis.com/cloud-samples-data/generative-ai/video/google_home_celebrity_ad.mp4" ,
0 commit comments