Skip to content

Commit

Permalink
Address compilation issues
Browse files Browse the repository at this point in the history
There were warnings about unused variables, and errors due to missing imports.
  • Loading branch information
rlazo committed Jun 27, 2024
1 parent 58e0bd8 commit 2bfe9e3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,7 @@ suspend fun configureModel() {
apiKey = BuildConfig.apiKey,
generationConfig = config)
// [END configure_model]

// Added to silence the compiler warning about unused variable.
print(generativeModel)
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ suspend fun safetySettings() {
apiKey = BuildConfig.apiKey,
safetySettings = listOf(SafetySetting(HarmCategory.HARASSMENT, BlockThreshold.ONLY_HIGH)))
// [END safety_settings]

// Added to silence the compiler warning about unused variable.
print(generativeModel)
}

suspend fun SafetySettingsMulti() {
Expand All @@ -53,4 +56,7 @@ suspend fun SafetySettingsMulti() {
apiKey = BuildConfig.apiKey,
safetySettings = listOf(harassmentSafety, hateSpeechSafety))
// [END safety_settings_multi]

// Added to silence the compiler warning about unused variable.
print(generativeModel)
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@

package com.google.ai.client.generative.samples

import android.content.Context
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import com.google.ai.client.generativeai.GenerativeModel
import com.google.ai.client.generativeai.type.content
import com.google.ai.sample.R

// Set up your API Key
// ====================
Expand Down

0 comments on commit 2bfe9e3

Please sign in to comment.