Fix: ensure AI command model support json response_format (#365)

* ensure AI command model support json response_format

* update models list

* update tts model list
This commit is contained in:
an-lee
2024-02-28 22:32:48 +08:00
committed by GitHub
parent ff20e2beef
commit ae775e91ea
7 changed files with 50 additions and 30 deletions

View File

@@ -731,10 +731,13 @@ export const LLM_PROVIDERS: { [key: string]: any } = {
enjoyai: {
name: "EnjoyAI",
models: [
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-instruct",
"gpt-4-0125-preview",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4-vision-preview",
"gpt-4",
@@ -759,10 +762,13 @@ export const LLM_PROVIDERS: { [key: string]: any } = {
name: "OpenAI",
description: t("youNeedToSetupApiKeyBeforeUsingOpenAI"),
models: [
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-instruct",
"gpt-4-0125-preview",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4-vision-preview",
"gpt-4",
@@ -820,14 +826,14 @@ export const LLM_PROVIDERS: { [key: string]: any } = {
export const TTS_PROVIDERS: { [key: string]: any } = {
enjoyai: {
name: "EnjoyAI",
models: ["tts-1"],
models: ["tts-1", "tts-1-hd"],
voices: ["alloy", "echo", "fable", "onyx", "nova", "shimmer"],
configurable: ["voice"],
},
openai: {
name: "OpenAI",
description: t("youNeedToSetupApiKeyBeforeUsingOpenAI"),
models: ["tts-1"],
models: ["tts-1", "tts-1-hd"],
voices: ["alloy", "echo", "fable", "onyx", "nova", "shimmer"],
configurable: ["model", "voice", "baseUrl"],
},

View File

@@ -67,7 +67,7 @@ export default () => {
engine: currentEngine.name,
configuration: {
type: "gpt",
model: "gpt-4-1106-preview",
model: "gpt-4-turbo-preview",
baseUrl: "",
roleDefinition: `你是我的英语教练。
请将我的话改写成英文。
@@ -110,7 +110,7 @@ export default () => {
engine: currentEngine.name,
configuration: {
type: "gpt",
model: "gpt-4-1106-preview",
model: "gpt-4-turbo-preview",
baseUrl: "",
roleDefinition: "",
temperature: 0.2,