diff --git a/guoba.support.js b/guoba.support.js index 4e016fe..d8fe68c 100644 --- a/guoba.support.js +++ b/guoba.support.js @@ -313,6 +313,12 @@ export function supportGuoba () { bottomHelpMessage: '即使配置了proxy,依然使用ChatGPT反代', component: 'Switch' }, + { + field: 'useGPT4', + label: '使用GPT-4', + bottomHelpMessage: '使用GPT-4,注意试用配额较低,如果用不了就关掉', + component: 'Switch' + }, { label: '以下为浏览器方式的配置.(Deprecated)', component: 'Divider' diff --git a/utils/config.js b/utils/config.js index 9696ad7..b585371 100644 --- a/utils/config.js +++ b/utils/config.js @@ -37,6 +37,7 @@ const defaultConfig = { apiBaseUrl: 'https://pimon.d201.cn/backend-api', apiForceUseReverse: false, plus: false, + useGPT4: false, promptPrefixOverride: 'Your answer shouldn\'t be too verbose. Prefer to answer in Chinese.', assistantLabel: 'ChatGPT', thinkingTips: true, diff --git a/utils/message.js b/utils/message.js index 2435d18..31fd59d 100644 --- a/utils/message.js +++ b/utils/message.js @@ -65,7 +65,7 @@ export class OfficialChatGPTClient { } } ], - model: Config.plus ? 'text-davinci-002-render-sha' : 'text-davinci-002-render-sha', + model: Config.useGPT4 ? 'gpt-4' : 'text-davinci-002-render-sha', parent_message_id: parentMessageId } if (conversationId) {