Skip to content

Commit

Permalink
Add Google Gemini 1.5 Flash (Preview) support via API
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDaveHello authored and sunner committed Jun 1, 2024
1 parent a4e79f9 commit 583b89f
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 0 deletions.
Binary file added public/bots/gemini-1.5-flash-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/bots/google/Gemini15FlashAPIBot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import GeminiAPIBot from "./GeminiAPIBot";

export default class Gemini15FlashAPIBot extends GeminiAPIBot {
static _className = "Gemini15FlashAPIBot";
static _logoFilename = "gemini-1.5-flash-logo.png";
static _model = "gemini-1.5-flash-latest";

constructor() {
super();
}
}
3 changes: 3 additions & 0 deletions src/bots/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Bots
import GeminiAPIBot from "@/bots/google/GeminiAPIBot";
import Gemini15ProAPIBot from "@/bots/google/Gemini15ProAPIBot";
import Gemini15FlashAPIBot from "@/bots/google/Gemini15FlashAPIBot";
import ChatGPT35Bot from "@/bots/openai/ChatGPT35Bot";
import ChatGPT4Bot from "@/bots/openai/ChatGPT4Bot";
import CohereAPICommandBot from "@/bots/cohere/CohereAPICommandBot";
Expand Down Expand Up @@ -125,6 +126,7 @@ const all = [
GeminiAdvBot.getInstance(),
GeminiAPIBot.getInstance(),
Gemini15ProAPIBot.getInstance(),
Gemini15FlashAPIBot.getInstance(),
Gemma2bItBot.getInstance(),
Gemma7bItBot.getInstance(),
AzureOpenAIAPIBot.getInstance(),
Expand Down Expand Up @@ -289,6 +291,7 @@ export const botTags = {
api: [
bots.getBotByClassName("GeminiAPIBot"),
bots.getBotByClassName("Gemini15ProAPIBot"),
bots.getBotByClassName("Gemini15FlashAPIBot"),
bots.getBotByClassName("AzureOpenAIAPIBot"),
bots.getBotByClassName("OpenAIAPI35Bot"),
bots.getBotByClassName("OpenAIAPI3516KBot"),
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "Ein topK von 1 bedeutet, dass das ausgewählte Token das wahrscheinlichste unter allen Token im Vokabular des Modells ist (auch gieriges Decodieren genannt).",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "A topK of 1 means the selected token is the most probable among all the tokens in the model's vocabulary (also called greedy decoding)",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "Un topK de 1 significa que el token seleccionado es el más probable entre todos los tokens en el vocabulario del modelo (también llamado decodificación voraz).",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "Un topK de 1 signifie que le jeton sélectionné est le plus probable parmi tous les jetons dans le vocabulaire du modèle (également appelé décodage gourmand).",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "Un topK di 1 significa che il token selezionato è il più probabile tra tutti i token nel vocabolario del modello (chiamato anche decodifica avida).",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "topKの1は、モデルの語彙の中で選択されたトークンが最も確からしいことを意味します(貪欲デコードとも呼ばれます)",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "topK가 1이라는 것은 선택된 토큰이 모델의 어휘 중에서 가장 가능성이 높은 것을 의미합니다 (탐욕스러운 디코딩이라고도 함).",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "topK, равный 1, означает, что выбранный токен является наиболее вероятным среди всех токенов в словаре модели (это также называется жадным декодированием).",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "Một topK của 1 có nghĩa là token được chọn là có khả năng cao nhất trong tất cả các token trong từ vựng của mô hình (còn được gọi là giải mã tham lam)",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "topK为1意味着选定的标记在模型词汇中所有标记里是最有可能的(也称为贪婪解码)",
"topP": "topP",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/zhtw.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"name": "Gemini API",
"gemini-pro": "Gemini-Pro",
"gemini-15-pro-latest": "Gemini 1.5 Pro",
"gemini-15-flash-latest": "Gemini 1.5 Flash",
"topK": "topK",
"topKPrompt": "topK 為 1 表示選定的 token 是模型詞彙中所有 token 中最可能的(也稱為貪婪解碼)",
"topP": "topP",
Expand Down

0 comments on commit 583b89f

Please sign in to comment.