File tree Expand file tree Collapse file tree 4 files changed +12
-4
lines changed
firebase-ai/app/src/main/java/com/google/firebase/example/ailogic Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,10 @@ public void modelConfiguration_model_parameters_general() {
50
50
// [START model_parameters_general]
51
51
// ...
52
52
53
- // Set parameter values in a `GenerationConfig` (example values shown here)
53
+ // Set parameter values in a `GenerationConfig`.
54
+ // IMPORTANT: Example values shown here. Make sure to update for your use case.
54
55
GenerationConfig .Builder configBuilder = new GenerationConfig .Builder ();
56
+ configBuilder .candidateCount = 1 ;
55
57
configBuilder .maxOutputTokens = 200 ;
56
58
configBuilder .stopSequences = List .of ("red" );
57
59
configBuilder .temperature = 0.9f ;
Original file line number Diff line number Diff line change @@ -51,8 +51,10 @@ public void modelConfiguration_model_parameters_general() {
51
51
// [START model_parameters_general]
52
52
// ...
53
53
54
- // Set parameter values in a `GenerationConfig` (example values shown here)
54
+ // Set parameter values in a `GenerationConfig`.
55
+ // IMPORTANT: Example values shown here. Make sure to update for your use case.
55
56
GenerationConfig .Builder configBuilder = new GenerationConfig .Builder ();
57
+ configBuilder .candidateCount = 1 ;
56
58
configBuilder .maxOutputTokens = 200 ;
57
59
configBuilder .stopSequences = List .of ("red" );
58
60
configBuilder .temperature = 0.9f ;
Original file line number Diff line number Diff line change @@ -42,8 +42,10 @@ class GoogleAISnippets : ViewModel() {
42
42
// [START model_parameters_general]
43
43
// ...
44
44
45
- // Set parameter values in a `GenerationConfig` (example values shown here)
45
+ // Set parameter values in a `GenerationConfig`.
46
+ // IMPORTANT: Example values shown here. Make sure to update for your use case.
46
47
val config = generationConfig {
48
+ candidateCount = 1
47
49
maxOutputTokens = 200
48
50
stopSequences = listOf (" red" )
49
51
temperature = 0.9f
Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ class VertexAISnippets : ViewModel() {
43
43
// [START model_parameters_general]
44
44
// ...
45
45
46
- // Set parameter values in a `GenerationConfig` (example values shown here)
46
+ // Set parameter values in a `GenerationConfig`.
47
+ // IMPORTANT: Example values shown here. Make sure to update for your use case.
47
48
val config = generationConfig {
49
+ candidateCount = 1
48
50
maxOutputTokens = 200
49
51
stopSequences = listOf (" red" )
50
52
temperature = 0.9f
You can’t perform that action at this time.
0 commit comments