添加微软gpt-4o

This commit is contained in:
sijinhui 2024-05-23 13:29:32 +08:00
parent 941f40afb5
commit 4b1fcdac0d
3 changed files with 17 additions and 30 deletions

View File

@ -215,18 +215,19 @@ export const DEFAULT_MODELS = [
providerType: "openai", providerType: "openai",
}, },
}, },
// {
// name: "gpt-4-turbo",
// available: true,
// provider: {
// id: "openai",
// providerName: "OpenAI",
// providerType: "openai",
// },
// },
{ {
name: "gpt-4-turbo-2024-04-09", name: "gpt-4o",
describe: "GPT-4,最新版,推荐", describe: "GPT-4o,最新版,全能,快速,推荐",
available: true,
provider: {
id: "openai",
providerName: "OpenAI",
providerType: "openai",
},
},
{
name: "gpt-4-turbo-2024-04-09",
describe: "GPT-4,标准版",
available: true, available: true,
provider: { provider: {
id: "openai", id: "openai",
@ -234,11 +235,6 @@ export const DEFAULT_MODELS = [
providerType: "openai", providerType: "openai",
}, },
}, },
// {
// name: "gpt-4",
// describe: "GPT-4,聪明,贵,慢",
// available: false,
// },
{ {
name: "gpt-35-turbo-0125", name: "gpt-35-turbo-0125",
describe: "GPT-3,微软,备用", describe: "GPT-3,微软,备用",
@ -249,16 +245,6 @@ export const DEFAULT_MODELS = [
providerType: "openai", providerType: "openai",
}, },
}, },
{
name: "gpt-4-1106-preview",
describe: "GPT-4,旧版,备用",
available: true,
provider: {
id: "openai",
providerName: "OpenAI",
providerType: "openai",
},
},
{ {
name: "claude-3-opus-20240229", name: "claude-3-opus-20240229",
describe: "claude第三代模型最强版", describe: "claude第三代模型最强版",
@ -290,7 +276,7 @@ export const DEFAULT_MODELS = [
}, },
}, },
{ {
name: "gpt-4o", name: "gpt-4o-2024-05-13",
describe: "GPT-4,最新版,省着点用", describe: "GPT-4,最新版,省着点用",
available: true, available: true,
provider: { provider: {
@ -334,6 +320,7 @@ export const DEFAULT_MODELS = [
export const AZURE_MODELS: string[] = [ export const AZURE_MODELS: string[] = [
"gpt-35-turbo-0125", "gpt-35-turbo-0125",
"gpt-4-turbo-2024-04-09", "gpt-4-turbo-2024-04-09",
"gpt-4o",
]; ];
// export const AZURE_PATH = AZURE_MODELS.map((m) => { m: `openai/deployments/${m}/chat/completions`}); // export const AZURE_PATH = AZURE_MODELS.map((m) => { m: `openai/deployments/${m}/chat/completions`});
// export const AZURE_PATH = AZURE_MODELS.map((m) => ({ m: `openai/deployments/${m}/chat/completions`} )); // export const AZURE_PATH = AZURE_MODELS.map((m) => ({ m: `openai/deployments/${m}/chat/completions`} ));

View File

@ -14,7 +14,7 @@ export const EN_MASKS: BuiltinMask[] = [
}, },
], ],
modelConfig: { modelConfig: {
model: "gpt-4-1106-preview", model: "gpt-4o",
temperature: 0.3, temperature: 0.3,
max_tokens: 2000, max_tokens: 2000,
presence_penalty: 0, presence_penalty: 0,

View File

@ -138,7 +138,7 @@ export const useAppConfig = createPersistStore(
}), }),
{ {
name: StoreKey.Config, name: StoreKey.Config,
version: 3.91, version: 3.92,
migrate(persistedState, version) { migrate(persistedState, version) {
const state = persistedState as ChatConfig; const state = persistedState as ChatConfig;
@ -174,7 +174,7 @@ export const useAppConfig = createPersistStore(
// return { ...DEFAULT_CONFIG }; // return { ...DEFAULT_CONFIG };
// } // }
if (version < 3.91) { if (version < 3.92) {
state.modelConfig = DEFAULT_CONFIG.modelConfig; state.modelConfig = DEFAULT_CONFIG.modelConfig;
// state.modelConfig.template = // state.modelConfig.template =
// state.modelConfig.template !== DEFAULT_INPUT_TEMPLATE // state.modelConfig.template !== DEFAULT_INPUT_TEMPLATE