From 3f86cb274884658be48d230ac6b6b02f225e546c Mon Sep 17 00:00:00 2001 From: chouchou Date: Fri, 19 Jul 2024 23:20:07 +0800 Subject: [PATCH] feat: update default model to gpt-4o-mini --- src/config.ts | 4 ++-- src/hooks/useAskAi.ts | 2 +- src/io.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config.ts b/src/config.ts index dd44304..9073baa 100644 --- a/src/config.ts +++ b/src/config.ts @@ -84,7 +84,7 @@ export const defaultConfig = { ], /* Model type, for now use open ai template */ model: { - model: 'gpt-3.5-turbo', + model: 'gpt-4o-mini', temperature: 1, top_p: 0.9, frequency_penalty: 0, @@ -106,7 +106,7 @@ export const SUPER_BUTTON_STATUS = { export const WEBPILOT_OPENAI = { AUTH_KEY: 'KEY_PLACEHOLDER', HOST_URL: 'https://api.webpilotai.com/api/webpilot', - MODEL: 'gpt-3.5-turbo', + MODEL: 'gpt-4o-mini', } export const LAST_PROMPT_STORAGE_KEY = { diff --git a/src/hooks/useAskAi.ts b/src/hooks/useAskAi.ts index 0d3b136..40e8c51 100644 --- a/src/hooks/useAskAi.ts +++ b/src/hooks/useAskAi.ts @@ -157,7 +157,7 @@ export default function useAskAi() { } if (isAskPage) { // Global popup,use 0125 as default` - model.model = 'gpt-3.5-turbo-0125' + model.model = 'gpt-4o-mini' } let storeAuthKey = currentConfig.authKey diff --git a/src/io.ts b/src/io.ts index b28e91b..0bb9d80 100644 --- a/src/io.ts +++ b/src/io.ts @@ -67,7 +67,7 @@ export async function askOpenAI({authKey, model, message, baseURL = null, apiOri // Reassemble model and process long content request const requestModel = {...model} requestModel.messages = - requestModel.model === 'gpt-3.5-turbo-0125' ? getNewCutMessages(message) : message + requestModel.model === 'gpt-4o-mini' ? getNewCutMessages(message) : message requestModel.stream = true // Assemble url