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() {
5050 // [START model_parameters_general]
5151 // ...
5252
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.
5455 GenerationConfig .Builder configBuilder = new GenerationConfig .Builder ();
56+ configBuilder .candidateCount = 1 ;
5557 configBuilder .maxOutputTokens = 200 ;
5658 configBuilder .stopSequences = List .of ("red" );
5759 configBuilder .temperature = 0.9f ;
Original file line number Diff line number Diff line change @@ -51,8 +51,10 @@ public void modelConfiguration_model_parameters_general() {
5151 // [START model_parameters_general]
5252 // ...
5353
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.
5556 GenerationConfig .Builder configBuilder = new GenerationConfig .Builder ();
57+ configBuilder .candidateCount = 1 ;
5658 configBuilder .maxOutputTokens = 200 ;
5759 configBuilder .stopSequences = List .of ("red" );
5860 configBuilder .temperature = 0.9f ;
Original file line number Diff line number Diff line change @@ -42,8 +42,10 @@ class GoogleAISnippets : ViewModel() {
4242 // [START model_parameters_general]
4343 // ...
4444
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.
4647 val config = generationConfig {
48+ candidateCount = 1
4749 maxOutputTokens = 200
4850 stopSequences = listOf (" red" )
4951 temperature = 0.9f
Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ class VertexAISnippets : ViewModel() {
4343 // [START model_parameters_general]
4444 // ...
4545
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.
4748 val config = generationConfig {
49+ candidateCount = 1
4850 maxOutputTokens = 200
4951 stopSequences = listOf (" red" )
5052 temperature = 0.9f
You can’t perform that action at this time.
0 commit comments