Skip to content

Commit 4949d67

Browse files
authored
[Vertex AI] Update samples/docs to use gemini-1.5-flash (#13099)
1 parent 1e7137e commit 4949d67

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

FirebaseVertexAI/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 10.28.0
2+
- [changed] Removed uses of the `gemini-1.5-flash-preview-0514` model in docs
3+
and samples. Developers should now use the auto-updated versions,
4+
`gemini-1.5-pro` or `gemini-1.5-flash`, or a specific stable version; see
5+
[available model names](https://firebase.google.com/docs/vertex-ai/gemini-models#available-model-names)
6+
for more details. (#13099)
7+
18
# 10.27.0
29
- [changed] Removed uses of the `gemini-1.5-pro-preview-0409` model in docs and
310
samples. Developers should now use `gemini-1.5-pro-preview-0514` or

FirebaseVertexAI/Sample/ChatSample/ViewModels/ConversationViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ConversationViewModel: ObservableObject {
3636
private var chatTask: Task<Void, Never>?
3737

3838
init() {
39-
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash-preview-0514")
39+
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash")
4040
chat = model.startChat()
4141
}
4242

FirebaseVertexAI/Sample/FunctionCallingSample/ViewModels/FunctionCallingViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class FunctionCallingViewModel: ObservableObject {
3939

4040
init() {
4141
model = VertexAI.vertexAI().generativeModel(
42-
modelName: "gemini-1.5-flash-preview-0514",
42+
modelName: "gemini-1.5-flash",
4343
tools: [Tool(functionDeclarations: [
4444
FunctionDeclaration(
4545
name: "get_exchange_rate",

FirebaseVertexAI/Sample/GenerativeAIMultimodalSample/ViewModels/PhotoReasoningViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class PhotoReasoningViewModel: ObservableObject {
4444
private var model: GenerativeModel?
4545

4646
init() {
47-
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash-preview-0514")
47+
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash")
4848
}
4949

5050
func reason() async {

FirebaseVertexAI/Sample/GenerativeAITextSample/ViewModels/SummarizeViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class SummarizeViewModel: ObservableObject {
3232
private var model: GenerativeModel?
3333

3434
init() {
35-
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash-preview-0514")
35+
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash")
3636
}
3737

3838
func summarize(inputText: String) async {

FirebaseVertexAI/Sources/VertexAI.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public class VertexAI: NSObject {
6464
/// guidance on choosing an appropriate model for your use case.
6565
///
6666
/// - Parameters:
67-
/// - modelName: The name of the model to use, for example `"gemini-1.5-flash-preview-0514"`;
68-
/// see [available model names
67+
/// - modelName: The name of the model to use, for example `"gemini-1.5-flash"`; see
68+
/// [available model names
6969
/// ](https://firebase.google.com/docs/vertex-ai/gemini-models#available-model-names) for a
7070
/// list of supported model names.
7171
/// - generationConfig: The content generation parameters your model should use.

0 commit comments

Comments
 (0)