Skip to content

Commit

Permalink
Add Gemini 1.5 Flash as a model (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
HackyRoot committed May 22, 2024
1 parent b57b48a commit fee942e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ export type ModelName =
// Gemini
| "gemini-pro"
| "gemini-1.5-pro-latest"
| "gemini-1.5-flash-latest"
// Mistral
| "mistral-tiny"
| "mistral-small"
Expand Down
1 change: 1 addition & 0 deletions core/llm/autodetect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const MODEL_SUPPORTS_IMAGES: string[] = [
"claude-3",
"gemini-ultra",
"gemini-1.5-pro",
"gemini-1.5-flash",
"sonnet",
"opus",
"haiku",
Expand Down
4 changes: 3 additions & 1 deletion extensions/vscode/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@
"enum": [
"chat-bison-001",
"gemini-pro",
"gemini-1.5-pro-latest"
"gemini-1.5-pro-latest",
"gemini-1.5-flash-latest"
]
}
}
Expand Down Expand Up @@ -985,6 +986,7 @@
"chat-bison-001",
"gemini-pro",
"gemini-1.5-pro-latest",
"gemini-1.5-flash-latest",
"mistral-tiny",
"mistral-small",
"mistral-medium",
Expand Down
15 changes: 14 additions & 1 deletion gui/src/util/modelData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,18 @@ const gemini15Pro: ModelPackage = {
icon: "gemini.png",
providerOptions: ["gemini", "freetrial"],
};
const gemini15Flash: ModelPackage = {
title: "Gemini 1.5 Flash",
description: "Fast and versatile multimodal model for scaling across diverse tasks",
params: {
title: "Gemini 1.5 Flash",
model: "gemini-1.5-flash-latest",
contextLength: 1_000_000,
apiKey: "<API_KEY>",
},
icon: "gemini.png",
providerOptions: ["gemini"],
};

const deepseek: ModelPackage = {
title: "DeepSeek-Coder",
Expand Down Expand Up @@ -660,6 +672,7 @@ export const MODEL_INFO: (ModelPackage | string)[] = [
"Gemini",
gemini15Pro,
geminiPro,
gemini15Flash,
"Open Source",
llama3Chat,
deepseek,
Expand Down Expand Up @@ -863,7 +876,7 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
required: true,
},
],
packages: [gemini15Pro, geminiPro],
packages: [gemini15Pro, geminiPro, gemini15Flash],
},
mistral: {
title: "Mistral API",
Expand Down

0 comments on commit fee942e

Please sign in to comment.