Skip to content

Commit

Permalink
fix google model name and add gemini 1.5 flash
Browse files Browse the repository at this point in the history
  • Loading branch information
meetpateltech committed Jun 7, 2024
1 parent ef4f8f3 commit 04c42ba
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
7 changes: 7 additions & 0 deletions lib/chat-setting-limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ export const CHAT_SETTING_LIMITS: Record<LLMID, ChatSettingLimits> = {
},

// GOOGLE MODELS

"gemini-1.5-flash": {
MIN_TEMPERATURE: 0.0,
MAX_TEMPERATURE: 1.0,
MAX_TOKEN_OUTPUT_LENGTH: 8192,
MAX_CONTEXT_LENGTH: 1040384
},
"gemini-1.5-pro-latest": {
MIN_TEMPERATURE: 0.0,
MAX_TEMPERATURE: 1.0,
Expand Down
20 changes: 15 additions & 5 deletions lib/models/llm/google-llm-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@ const GOOGLE_PLATORM_LINK = "https://ai.google.dev/"

// Google Models (UPDATED 12/22/23) -----------------------------

// Gemini Flash (UPDATED 05/28/24)
const GEMINI_FLASH: LLM = {
// Gemini 1.5 Flash
const GEMINI_1_5_FLASH: LLM = {
modelId: "gemini-1.5-flash",
modelName: "Gemini 1.5 Flash",
provider: "google",
hostedId: "gemini-1.5-flash",
platformLink: GOOGLE_PLATORM_LINK,
imageInput: true
}

// Gemini 1.5 Pro (UPDATED 05/28/24)
const GEMINI_1_5_PRO: LLM = {
modelId: "gemini-1.5-pro-latest",
modelName: "Gemini Flash",
modelName: "Gemini 1.5 Pro",
provider: "google",
hostedId: "gemini-1.5-pro-latest",
platformLink: GOOGLE_PLATORM_LINK,
imageInput: false
imageInput: true
}

// Gemini Pro (UPDATED 12/22/23)
Expand All @@ -34,4 +44,4 @@ const GEMINI_PRO_VISION: LLM = {
imageInput: true
}

export const GOOGLE_LLM_LIST: LLM[] = [GEMINI_PRO, GEMINI_PRO_VISION, GEMINI_FLASH]
export const GOOGLE_LLM_LIST: LLM[] = [GEMINI_PRO, GEMINI_PRO_VISION, GEMINI_1_5_PRO, GEMINI_1_5_FLASH]
3 changes: 2 additions & 1 deletion types/llms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export type OpenAILLMID =
export type GoogleLLMID =
| "gemini-pro" // Gemini Pro
| "gemini-pro-vision" // Gemini Pro Vision
| "gemini-1.5-pro-latest"
| "gemini-1.5-pro-latest" // Gemini 1.5 Pro
| "gemini-1.5-flash" // Gemini 1.5 Flash

// Anthropic Models
export type AnthropicLLMID =
Expand Down

0 comments on commit 04c42ba

Please sign in to comment.