Skip to content
Snippets Groups Projects
Unverified Commit 3b7736f7 authored by Parham Saidi's avatar Parham Saidi Committed by GitHub
Browse files

feat: added gemini 002 support (#1336)

parent a7a7afe6
No related branches found
No related tags found
No related merge requests found
---
"llamaindex": patch
---
feat: added gemini 002 support
......@@ -44,12 +44,15 @@ import {
export const GEMINI_MODEL_INFO_MAP: Record<GEMINI_MODEL, GeminiModelInfo> = {
[GEMINI_MODEL.GEMINI_PRO]: { contextWindow: 30720 },
[GEMINI_MODEL.GEMINI_PRO_VISION]: { contextWindow: 12288 },
[GEMINI_MODEL.GEMINI_PRO_LATEST]: { contextWindow: 10 ** 6 },
// multi-modal/multi turn
[GEMINI_MODEL.GEMINI_PRO_LATEST]: { contextWindow: 10 ** 6 },
[GEMINI_MODEL.GEMINI_PRO_FLASH_LATEST]: { contextWindow: 10 ** 6 },
[GEMINI_MODEL.GEMINI_PRO_1_5_PRO_PREVIEW]: { contextWindow: 10 ** 6 },
[GEMINI_MODEL.GEMINI_PRO_1_5_FLASH_PREVIEW]: { contextWindow: 10 ** 6 },
[GEMINI_MODEL.GEMINI_PRO_1_5]: { contextWindow: 2 * 10 ** 6 },
[GEMINI_MODEL.GEMINI_PRO_1_5_FLASH]: { contextWindow: 10 ** 6 },
[GEMINI_MODEL.GEMINI_PRO_1_5_LATEST]: { contextWindow: 2 * 10 ** 6 },
[GEMINI_MODEL.GEMINI_PRO_1_5_FLASH_LATEST]: { contextWindow: 10 ** 6 },
};
const SUPPORT_TOOL_CALL_MODELS: GEMINI_MODEL[] = [
......@@ -59,6 +62,10 @@ const SUPPORT_TOOL_CALL_MODELS: GEMINI_MODEL[] = [
GEMINI_MODEL.GEMINI_PRO_1_5_FLASH_PREVIEW,
GEMINI_MODEL.GEMINI_PRO_1_5,
GEMINI_MODEL.GEMINI_PRO_1_5_FLASH,
GEMINI_MODEL.GEMINI_PRO_LATEST,
GEMINI_MODEL.GEMINI_PRO_FLASH_LATEST,
GEMINI_MODEL.GEMINI_PRO_1_5_LATEST,
GEMINI_MODEL.GEMINI_PRO_1_5_FLASH_LATEST,
];
const DEFAULT_GEMINI_PARAMS = {
......
......@@ -56,10 +56,14 @@ export enum GEMINI_MODEL {
GEMINI_PRO = "gemini-pro",
GEMINI_PRO_VISION = "gemini-pro-vision",
GEMINI_PRO_LATEST = "gemini-1.5-pro-latest",
GEMINI_PRO_FLASH_LATEST = "gemini-1.5-flash-latest",
GEMINI_PRO_1_5_PRO_PREVIEW = "gemini-1.5-pro-preview-0514",
GEMINI_PRO_1_5_FLASH_PREVIEW = "gemini-1.5-flash-preview-0514",
GEMINI_PRO_1_5 = "gemini-1.5-pro-001",
GEMINI_PRO_1_5_FLASH = "gemini-1.5-flash-001",
// Note: should be switched to -latest suffix when google supports it
GEMINI_PRO_1_5_LATEST = "gemini-1.5-pro-002",
GEMINI_PRO_1_5_FLASH_LATEST = "gemini-1.5-flash-002",
}
export interface GeminiModelInfo {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment