feat: support fast chatgpt mobile models

This commit is contained in:
Yifei Zhang 2023-05-19 18:34:48 +08:00 committed by GitHub
parent b0b078c0fb
commit 7f13a8d2bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,14 @@ export const ALL_MODELS = [
name: "gpt-4-32k-0314", name: "gpt-4-32k-0314",
available: ENABLE_GPT4, available: ENABLE_GPT4,
}, },
{
name: "gpt-4-mobile",
available: ENABLE_GPT4,
},
{
name: "ext-davinci-002-render-sha-mobile",
available: true,
},
{ {
name: "gpt-3.5-turbo", name: "gpt-3.5-turbo",
available: true, available: true,
@ -98,13 +106,13 @@ export const ALL_MODELS = [
}, },
] as const; ] as const;
export type ModelType = (typeof ALL_MODELS)[number]["name"]; export type ModelType = typeof ALL_MODELS[number]["name"];
export function limitNumber( export function limitNumber(
x: number, x: number,
min: number, min: number,
max: number, max: number,
defaultValue: number, defaultValue: number
) { ) {
if (typeof x !== "number" || isNaN(x)) { if (typeof x !== "number" || isNaN(x)) {
return defaultValue; return defaultValue;
@ -163,6 +171,6 @@ export const useAppConfig = create<ChatConfigStore>()(
return state; return state;
}, },
}, }
), )
); );