mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 05:17:10 +00:00
fix: max token
This commit is contained in:
parent
dcc1a4ebd6
commit
8249acaf08
3 changed files with 12 additions and 5 deletions
|
|
@ -142,9 +142,15 @@ export function supportGuoba () {
|
|||
{
|
||||
field: 'model',
|
||||
label: 'OpenAI 模型',
|
||||
bottomHelpMessage: 'gpt-4, gpt-4-0613, gpt-4-1106, gpt-4-32k, gpt-4-32k-0613, gpt-3.5-turbo, gpt-3.5-turbo-0613, gpt-3.5-turbo-1106, gpt-3.5-turbo-16k-0613。默认为gpt-3.5-turbo,gpt-4需账户支持',
|
||||
bottomHelpMessage: '填写OpenAI模型或OpenAI API兼容的其他模型。',
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
field: 'apiMaxToken',
|
||||
label: 'max token',
|
||||
bottomHelpMessage: '默认4096',
|
||||
component: 'InputNumber'
|
||||
},
|
||||
{
|
||||
field: 'smartMode',
|
||||
label: '智能模式',
|
||||
|
|
@ -154,13 +160,13 @@ export function supportGuoba () {
|
|||
{
|
||||
field: 'forwardReasoning',
|
||||
label: '是否转发思考过程',
|
||||
bottomHelpMessage: 'OpenAI的o系列、deepseek的r系列等思考模型的思考过程是否以转发形式发出。默认开启',
|
||||
bottomHelpMessage: 'OpenAI的o系列、deepseek的r系列等思考模型的思考过程是否以转发形式发出。仅适配reasoning_content。默认开启。',
|
||||
component: 'Switch'
|
||||
},
|
||||
{
|
||||
field: 'openAiBaseUrl',
|
||||
label: 'OpenAI API服务器地址',
|
||||
bottomHelpMessage: 'OpenAI的API服务器地址。注意要带上/v1。默认为https://api.openai.com/v1',
|
||||
bottomHelpMessage: 'OpenAI兼容API服务器地址。注意要带上/v1。默认为https://api.openai.com/v1',
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -646,7 +646,8 @@ class Core {
|
|||
completionParams,
|
||||
assistantLabel: Config.assistantLabel,
|
||||
fetch: newFetch,
|
||||
maxModelTokens
|
||||
maxModelTokens,
|
||||
maxResponseTokens: Config.apiMaxToken
|
||||
}
|
||||
let openAIAccessible = (Config.proxy || !(await isCN())) // 配了代理或者服务器在国外,默认认为不需要反代
|
||||
if (opts.apiBaseUrl !== defaultOpenAIAPI && openAIAccessible && !Config.openAiForceUseReverse) {
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ const defaultConfig = {
|
|||
bingAiOid: '',
|
||||
_2captchaKey: '',
|
||||
bingReasoning: false, // 是否深度思考
|
||||
|
||||
apiMaxToken: 4096,
|
||||
version: 'v2.8.3'
|
||||
}
|
||||
const _path = process.cwd()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue