Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenAI o1 and o1-mini model via API #958

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/bots/openai-o1-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/bots/openai-o1-mini-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/bots/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import OpenAIAPI4Bot from "@/bots/openai/OpenAIAPI4Bot";
import OpenAIAPI4128KBot from "@/bots/openai/OpenAIAPI4128KBot";
import OpenAIAPI4oBot from "@/bots/openai/OpenAIAPI4oBot";
import OpenAIAPI4oMiniBot from "./openai/OpenAIAPI4oMiniBot";
import OpenAIAPIo1Bot from "./openai/OpenAIAPIo1Bot";
import OpenAIAPIo1MiniBot from "./openai/OpenAIAPIo1MiniBot";
import MistralBot from "./MistralBot";
import MOSSBot from "@/bots/MOSSBot";
import WenxinQianfanBot from "@/bots/baidu/WenxinQianfanBot";
Expand Down Expand Up @@ -134,6 +136,8 @@ const all = [
OpenAIAPI4128KBot.getInstance(),
OpenAIAPI4oBot.getInstance(),
OpenAIAPI4oMiniBot.getInstance(),
OpenAIAPIo1Bot.getInstance(),
OpenAIAPIo1MiniBot.getInstance(),
ChatGPT432kPoeBot.getInstance(),
GradioAppBot.getInstance(),
Gemma7bGroqAPIBot.getInstance(),
Expand Down Expand Up @@ -289,6 +293,8 @@ export const botTags = {
bots.getBotByClassName("OpenAIAPI4128KBot"),
bots.getBotByClassName("OpenAIAPI4oBot"),
bots.getBotByClassName("OpenAIAPI4oMiniBot"),
bots.getBotByClassName("OpenAIAPIo1Bot"),
bots.getBotByClassName("OpenAIAPIo1MiniBot"),
bots.getBotByClassName("WenxinQianfanBot"),
bots.getBotByClassName("WenxinQianfanTurboBot"),
bots.getBotByClassName("WenxinQianfan4Bot"),
Expand Down
18 changes: 18 additions & 0 deletions src/bots/openai/OpenAIAPIo1Bot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import OpenAIAPIBot from "./OpenAIAPIBot";

export default class OpenAIAPIo1Bot extends OpenAIAPIBot {
static _className = "OpenAIAPIo1Bot"; // Class name of the bot
static _logoFilename = "openai-o1-logo.png"; // Place it in public/bots/
static _isDarkLogo = true; // The main color of logo is dark
static _model = "o1";

constructor() {
super();
}

_setupModel() {
const chatModel = super._setupModel();
chatModel.streaming = false;
return chatModel;
}
}
12 changes: 12 additions & 0 deletions src/bots/openai/OpenAIAPIo1MiniBot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import OpenAIAPIBot from "./OpenAIAPIBot";

export default class OpenAIAPIo1MiniBot extends OpenAIAPIBot {
static _className = "OpenAIAPIo1MiniBot"; // Class name of the bot
static _logoFilename = "openai-o1-mini-logo.png"; // Place it in public/bots/
static _isDarkLogo = true; // The main color of logo is dark
static _model = "o1-mini";

constructor() {
super();
}
}
2 changes: 2 additions & 0 deletions src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "Temperatur",
"temperaturePrompt": "Je höher die Temperatur, desto kreativer der Text, aber desto wahrscheinlicher ist es, dass er inkohärent ist",
"temperature0": "Stärker deterministisch",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "Temperature",
"temperaturePrompt": "The higher the temperature, the more creative the text, but the more likely it is to be incoherent",
"temperature0": "More deterministic",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "Temperatura",
"temperaturePrompt": "Cuanto mayor sea la temperatura, más creativo será el texto, pero más probable es que sea incoherente.",
"temperature0": "Más determinístico",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "Température",
"temperaturePrompt": "Une température plus élevée favorise la créativité du texte généré, mais le risque d'incohérence augmente également.",
"temperature0": "Plus déterministe",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "Temperatura",
"temperaturePrompt": "Più alta è la temperatura, più creativo è il testo, ma maggiore è la probabilità che sia incoerente",
"temperature0": "Più deterministico",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "温度",
"temperaturePrompt": "温度が高いほど、テキストは創造的ですが、一貫性がない可能性が高いです。",
"temperature0": "より決定論的な",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "온도",
"temperaturePrompt": "온도가 높을수록 텍스트는 창의적이지만 일관성이 없을 가능성이 높습니다",
"temperature0": "더 결정론적인",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "Температура",
"temperaturePrompt": "Чем выше температура, тем креативнее текст, но тем больше вероятность того, что он будет бессвязным",
"temperature0": "Более определенный",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "Temperature",
"temperaturePrompt": "Temperature càng cao, văn bản càng sáng tạo nhưng càng có khả năng trở nên rời rạc",
"temperature0": "Cụ thể hơn",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "Temperature",
"temperaturePrompt": "Temperature 越高,生成的文本越有创造性,但也越没条理",
"temperature0": "更具确定性",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/zhtw.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
"gpt-4-turbo": "gpt-4-turbo",
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"o1": "o1",
"o1-mini": "o1-mini",
"temperature": "Temperature",
"temperaturePrompt": "Temperature 越高,生成的文字越有創造性,但也越可能無法理解",
"temperature0": "更具確定性",
Expand Down