File tree 6 files changed +12
-9
lines changed
FunctionCallingSample/ViewModels
GenerativeAIMultimodalSample/ViewModels
GenerativeAITextSample/ViewModels 6 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class ConversationViewModel: ObservableObject {
36
36
private var chatTask : Task < Void , Never > ?
37
37
38
38
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 " )
40
40
chat = model. startChat ( )
41
41
}
42
42
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class FunctionCallingViewModel: ObservableObject {
39
39
40
40
init ( ) {
41
41
model = VertexAI . vertexAI ( ) . generativeModel (
42
- modelName: " gemini-1.5-pro -preview-0409 " ,
42
+ modelName: " gemini-1.5-flash -preview-0514 " ,
43
43
tools: [ Tool ( functionDeclarations: [
44
44
FunctionDeclaration (
45
45
name: " get_exchange_rate " ,
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class PhotoReasoningViewModel: ObservableObject {
44
44
private var model : GenerativeModel ?
45
45
46
46
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 " )
48
48
}
49
49
50
50
func reason( ) async {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class SummarizeViewModel: ObservableObject {
32
32
private var model : GenerativeModel ?
33
33
34
34
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 " )
36
36
}
37
37
38
38
func summarize( inputText: String ) async {
Original file line number Diff line number Diff line change @@ -50,8 +50,7 @@ public final class GenerativeModel {
50
50
/// Initializes a new remote model with the given parameters.
51
51
///
52
52
/// - 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"`.
55
54
/// - apiKey: The API key for your project.
56
55
/// - generationConfig: The content generation parameters your model should use.
57
56
/// - safetySettings: A value describing what types of harmful content your model should allow.
Original file line number Diff line number Diff line change @@ -60,10 +60,14 @@ public class VertexAI: NSObject {
60
60
61
61
/// Initializes a generative model with the given parameters.
62
62
///
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
+ ///
63
66
/// - 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.
67
71
/// - generationConfig: The content generation parameters your model should use.
68
72
/// - safetySettings: A value describing what types of harmful content your model should allow.
69
73
/// - tools: A list of ``Tool`` objects that the model may use to generate the next response.
You can’t perform that action at this time.
0 commit comments