Add Gemini 2.0 Pro Experimental (#1707)

This commit is contained in:
Peter Goldstein
2025-03-05 23:04:56 -05:00
committed by GitHub
parent 0111f5c8b0
commit 7ee4968b06
3 changed files with 8 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@llamaindex/google": patch
---
Add Gemini 2.0 Pro Experimental
+2
View File
@@ -57,6 +57,7 @@ export const GEMINI_MODEL_INFO_MAP: Record<GEMINI_MODEL, GeminiModelInfo> = {
[GEMINI_MODEL.GEMINI_2_0_FLASH]: { contextWindow: 10 ** 6 },
[GEMINI_MODEL.GEMINI_2_0_FLASH_LITE_PREVIEW]: { contextWindow: 10 ** 6 },
[GEMINI_MODEL.GEMINI_2_0_FLASH_THINKING_EXP]: { contextWindow: 32768 },
[GEMINI_MODEL.GEMINI_2_0_PRO_EXPERIMENTAL]: { contextWindow: 2 * 10 ** 6 },
};
const SUPPORT_TOOL_CALL_MODELS: GEMINI_MODEL[] = [
@@ -72,6 +73,7 @@ const SUPPORT_TOOL_CALL_MODELS: GEMINI_MODEL[] = [
GEMINI_MODEL.GEMINI_PRO_1_5_FLASH_LATEST,
GEMINI_MODEL.GEMINI_2_0_FLASH_EXPERIMENTAL,
GEMINI_MODEL.GEMINI_2_0_FLASH,
GEMINI_MODEL.GEMINI_2_0_PRO_EXPERIMENTAL,
];
const DEFAULT_GEMINI_PARAMS = {
+1
View File
@@ -68,6 +68,7 @@ export enum GEMINI_MODEL {
GEMINI_2_0_FLASH = "gemini-2.0-flash-001",
GEMINI_2_0_FLASH_LITE_PREVIEW = "gemini-2.0-flash-lite-preview-02-05",
GEMINI_2_0_FLASH_THINKING_EXP = "gemini-2.0-flash-thinking-exp-01-21",
GEMINI_2_0_PRO_EXPERIMENTAL = "gemini-2.0-pro-exp-02-05",
}
export interface GeminiModelInfo {