Slide 15
Slide 15 text
val model = GenerativeModel(
modelName = "gemini-1.5-pro",
apiKey = BuildConfig.apiKey,
generationConfig = generationConfig {
temperature = 1f
topK = 64
topP = 0.95f
maxOutputTokens = 8192
},
safetySettings = listOf(
SafetySetting(HarmCategory.DANGEROUS_CONTENT, BlockThreshold.MEDIUM_AND_ABOVE),
)
)
https://ai.google.dev/gemini-api/docs/safety-settings
https://github.com/google/secrets-gradle-plugin