1
1
package com.google.firebase.quickstart.ai
2
2
3
+ import com.google.firebase.ai.type.GenerativeBackend
3
4
import com.google.firebase.ai.type.ResponseModality
4
5
import com.google.firebase.ai.type.content
5
6
import com.google.firebase.ai.type.generationConfig
@@ -86,10 +87,11 @@ val FIREBASE_AI_SAMPLES = listOf(
86
87
}
87
88
),
88
89
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 " ,
91
92
navRoute = " chat" ,
92
93
categories = listOf (Category .AUDIO ),
94
+ backend = GenerativeBackend .vertexAI(),
93
95
initialPrompt = content {
94
96
fileData(
95
97
" https://storage.googleapis.com/cloud-samples-data/generative-ai/audio/" +
@@ -100,10 +102,11 @@ val FIREBASE_AI_SAMPLES = listOf(
100
102
}
101
103
),
102
104
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 ." ,
105
107
navRoute = " chat" ,
106
108
categories = listOf (Category .IMAGE ),
109
+ backend = GenerativeBackend .vertexAI(),
107
110
initialPrompt = content {
108
111
fileData(
109
112
" https://storage.googleapis.com/cloud-samples-data/generative-ai/image/meal-prep.jpeg" ,
@@ -145,10 +148,12 @@ val FIREBASE_AI_SAMPLES = listOf(
145
148
}
146
149
),
147
150
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" ,
150
154
navRoute = " chat" ,
151
155
categories = listOf (Category .DOCUMENT ),
156
+ backend = GenerativeBackend .vertexAI(),
152
157
initialPrompt = content {
153
158
fileData(
154
159
" https://storage.googleapis.com/cloud-samples-data/generative-ai/pdf/form_1040_2013.pdf" ,
@@ -165,10 +170,11 @@ val FIREBASE_AI_SAMPLES = listOf(
165
170
}
166
171
),
167
172
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 " ,
170
175
navRoute = " chat" ,
171
176
categories = listOf (Category .VIDEO ),
177
+ backend = GenerativeBackend .vertexAI(),
172
178
initialPrompt = content {
173
179
fileData(
174
180
" https://storage.googleapis.com/cloud-samples-data/generative-ai/video/google_home_celebrity_ad.mp4" ,
0 commit comments