mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
fix: qwen contect
This commit is contained in:
parent
b221098c37
commit
20a1a7dcdf
1 changed files with 3 additions and 2 deletions
|
|
@ -89,7 +89,7 @@ async function handleSystem (e, system) {
|
||||||
const defaultBotName = 'ChatGPT'
|
const defaultBotName = 'ChatGPT'
|
||||||
const groupContextTip = Config.groupContextTip
|
const groupContextTip = Config.groupContextTip
|
||||||
system = system.replaceAll(namePlaceholder, opt.botName || defaultBotName) +
|
system = system.replaceAll(namePlaceholder, opt.botName || defaultBotName) +
|
||||||
((Config.enableGroupContext && opt.groupId) ? groupContextTip : '')
|
((opt.groupId) ? groupContextTip : '')
|
||||||
system += 'Attention, you are currently chatting in a qq group, then one who asks you now is' + `${opt.nickname}(${opt.qq})。`
|
system += 'Attention, you are currently chatting in a qq group, then one who asks you now is' + `${opt.nickname}(${opt.qq})。`
|
||||||
system += `the group name is ${opt.groupName}, group id is ${opt.groupId}。`
|
system += `the group name is ${opt.groupName}, group id is ${opt.groupId}。`
|
||||||
if (opt.botName) {
|
if (opt.botName) {
|
||||||
|
|
@ -558,7 +558,7 @@ class Core {
|
||||||
assistantLabel: Config.assistantLabel,
|
assistantLabel: Config.assistantLabel,
|
||||||
fetch: newFetch
|
fetch: newFetch
|
||||||
}
|
}
|
||||||
opts.systemMessage = await handleSystem(e, opts.systemMessage)
|
|
||||||
|
|
||||||
let option = {
|
let option = {
|
||||||
timeoutMs: 600000,
|
timeoutMs: 600000,
|
||||||
|
|
@ -583,6 +583,7 @@ class Core {
|
||||||
option.completionParams = {}
|
option.completionParams = {}
|
||||||
}
|
}
|
||||||
promptAddition && (prompt += promptAddition)
|
promptAddition && (prompt += promptAddition)
|
||||||
|
option.systemMessage = await handleSystem(e, option.systemMessage)
|
||||||
systemAddition && (option.systemMessage += systemAddition)
|
systemAddition && (option.systemMessage += systemAddition)
|
||||||
opts.completionParams.parameters.tools = Object.keys(funcMap)
|
opts.completionParams.parameters.tools = Object.keys(funcMap)
|
||||||
.map(k => funcMap[k].function)
|
.map(k => funcMap[k].function)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue