Merge pull request #1929 from suhipek/main

add new models
This commit is contained in:
Yifei Zhang 2023-06-14 10:29:00 +08:00 committed by GitHub
commit 2593de5872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,10 @@ export const ALL_MODELS = [
name: "gpt-4-0314",
available: ENABLE_GPT4,
},
{
name: "gpt-4-0613",
available: ENABLE_GPT4,
},
{
name: "gpt-4-32k",
available: ENABLE_GPT4,
@ -68,6 +72,10 @@ export const ALL_MODELS = [
name: "gpt-4-32k-0314",
available: ENABLE_GPT4,
},
{
name: "gpt-4-32k-0613",
available: ENABLE_GPT4,
},
{
name: "gpt-3.5-turbo",
available: true,
@ -76,6 +84,14 @@ export const ALL_MODELS = [
name: "gpt-3.5-turbo-0301",
available: true,
},
{
name: "gpt-3.5-turbo-0613",
available: true,
},
{
name: "gpt-3.5-turbo-16k",
available: true,
},
{
name: "qwen-v1", // 通义千问
available: false,
@ -116,7 +132,7 @@ export function limitNumber(
export function limitModel(name: string) {
return ALL_MODELS.some((m) => m.name === name && m.available)
? name
: ALL_MODELS[4].name;
: "gpt-3.5-turbo";
}
export const ModalConfigValidator = {