Skip to content

Commit 61c10bc

Browse files
authored
[Vertex AI] Update samples/docs to use gemini-1.5-flash-preview-0514 (#12979)
1 parent 1c8db0b commit 61c10bc

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

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-pro-preview-0409")
39+
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash-preview-0514")
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-pro-preview-0409",
42+
modelName: "gemini-1.5-flash-preview-0514",
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-pro-preview-0409")
47+
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash-preview-0514")
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-pro-preview-0409")
35+
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash-preview-0514")
3636
}
3737

3838
func summarize(inputText: String) async {

FirebaseVertexAI/Sources/GenerativeModel.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ public final class GenerativeModel {
5050
/// Initializes a new remote model with the given parameters.
5151
///
5252
/// - Parameters:
53-
/// - name: The name of the model to use, for example `"gemini-1.0-pro"`; see
54-
/// [Gemini models](https://ai.google.dev/models/gemini) for a list of supported model names.
53+
/// - name: The name of the model to use, for example `"gemini-1.0-pro"`.
5554
/// - apiKey: The API key for your project.
5655
/// - generationConfig: The content generation parameters your model should use.
5756
/// - safetySettings: A value describing what types of harmful content your model should allow.

FirebaseVertexAI/Sources/VertexAI.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,14 @@ public class VertexAI: NSObject {
6060

6161
/// Initializes a generative model with the given parameters.
6262
///
63+
/// - Note: Refer to [Gemini models](https://firebase.google.com/docs/vertex-ai/gemini-models) for
64+
/// guidance on choosing an appropriate model for your use case.
65+
///
6366
/// - Parameters:
64-
/// - modelName: The name of the model to use, for example `"gemini-1.0-pro"`; see
65-
/// [Gemini models](https://firebase.google.com/docs/vertex-ai/gemini-model#available-models)
66-
/// for a list of supported model names.
67+
/// - modelName: The name of the model to use, for example `"gemini-1.5-flash-preview-0514"`;
68+
/// see [available model names
69+
/// ](https://firebase.google.com/docs/vertex-ai/gemini-models#available-model-names) for a
70+
/// list of supported model names.
6771
/// - generationConfig: The content generation parameters your model should use.
6872
/// - safetySettings: A value describing what types of harmful content your model should allow.
6973
/// - tools: A list of ``Tool`` objects that the model may use to generate the next response.

0 commit comments

Comments
 (0)