Skip to content

Commit

Permalink
Update model configuration name
Browse files Browse the repository at this point in the history
  • Loading branch information
rlazo committed Jul 11, 2024
1 parent 8c76dff commit 11da79a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import com.google.ai.client.generativeai.type.generationConfig


suspend fun configureModel() {
// [START configure_model]
// [START configure_model_parameters]
val config = generationConfig {
temperature = 0.9f
topK = 16
Expand All @@ -43,7 +43,7 @@ suspend fun configureModel() {
modelName = "gemini-1.5-flash",
apiKey = BuildConfig.apiKey,
generationConfig = config)
// [END configure_model]
// [END configure_model_parameters]

// Added to silence the compiler warning about unused variable.
print(generativeModel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

class ConfigureModel {
void configureModel() {
// [START configure_model]
// [START configure_model_parameters]
GenerationConfig.Builder configBuilder = new GenerationConfig.Builder();
configBuilder.temperature = 0.9f;
configBuilder.topK = 16;
Expand All @@ -43,6 +43,6 @@ void configureModel() {
new GenerativeModel("gemini-1.5-flash", BuildConfig.apiKey, generationConfig);

GenerativeModelFutures model = GenerativeModelFutures.from(gm);
// [END configure_model]
// [END configure_model_parameters]
}
}

0 comments on commit 11da79a

Please sign in to comment.