Skip to content

Commit 784b49d

Browse files
committed
add gemini-2.0-flash-exp ModelVariant
1 parent f01b9c1 commit 784b49d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

gemini-api/src/main/java/swiss/ameri/gemini/api/ModelVariant.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
* @see <a href="https://ai.google.dev/gemini-api/docs/models/gemini">Gemini Models</a>
77
*/
88
public enum ModelVariant {
9+
/**
10+
* Next generation features, speed, and multimodal generation for a diverse variety of tasks.
11+
* <ul>
12+
* <li>Input: Audio, images, videos, and text</li>
13+
* <li>Output: Text, images (coming soon), and audio (coming soon)</li>
14+
* </ul>
15+
*/
16+
GEMINI_2_0_FLASH_EXP("gemini-2.0-flash-exp"),
917
/**
1018
* Complex reasoning tasks such as code and text generation, text editing, problem-solving, data extraction and generation.
1119
*/
@@ -20,7 +28,10 @@ public enum ModelVariant {
2028
GEMINI_1_5_FLASH_8B("gemini-1.5-flash-8b"),
2129
/**
2230
* Natural language tasks, multi-turn text and code chat, and code generation.
31+
*
32+
* @deprecated on 2/15/2025
2333
*/
34+
@Deprecated
2435
GEMINI_1_0_PRO("gemini-1.0-pro"),
2536
/**
2637
* Measuring the relatedness of text strings.

gemini-tester/src/main/java/swiss/ameri/gemini/tester/GeminiTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private static GenerativeModel createResponseSchemaModel() {
197197

198198
private static GenerativeModel createStoryModel() {
199199
return GenerativeModel.builder()
200-
.modelName(ModelVariant.GEMINI_1_5_PRO)
200+
.modelName(ModelVariant.GEMINI_2_0_FLASH_EXP)
201201
.addContent(Content.textContent(
202202
Content.Role.USER,
203203
"Write a 50 word story about a magic backpack."

0 commit comments

Comments
 (0)