Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ public void modelConfiguration_model_parameters_general() {
// [START model_parameters_general]
// ...

// Set parameter values in a `GenerationConfig` (example values shown here)
// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
GenerationConfig.Builder configBuilder = new GenerationConfig.Builder();
configBuilder.candidateCount = 1;
configBuilder.maxOutputTokens = 200;
configBuilder.stopSequences = List.of("red");
configBuilder.temperature = 0.9f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ public void modelConfiguration_model_parameters_general() {
// [START model_parameters_general]
// ...

// Set parameter values in a `GenerationConfig` (example values shown here)
// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
GenerationConfig.Builder configBuilder = new GenerationConfig.Builder();
configBuilder.candidateCount = 1;
configBuilder.maxOutputTokens = 200;
configBuilder.stopSequences = List.of("red");
configBuilder.temperature = 0.9f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ class GoogleAISnippets : ViewModel() {
// [START model_parameters_general]
// ...

// Set parameter values in a `GenerationConfig` (example values shown here)
// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
val config = generationConfig {
candidateCount = 1
maxOutputTokens = 200
stopSequences = listOf("red")
temperature = 0.9f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ class VertexAISnippets : ViewModel() {
// [START model_parameters_general]
// ...

// Set parameter values in a `GenerationConfig` (example values shown here)
// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
val config = generationConfig {
candidateCount = 1
maxOutputTokens = 200
stopSequences = listOf("red")
temperature = 0.9f
Expand Down