mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +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 groupContextTip = Config.groupContextTip
|
||||
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 += `the group name is ${opt.groupName}, group id is ${opt.groupId}。`
|
||||
if (opt.botName) {
|
||||
|
|
@ -558,7 +558,7 @@ class Core {
|
|||
assistantLabel: Config.assistantLabel,
|
||||
fetch: newFetch
|
||||
}
|
||||
opts.systemMessage = await handleSystem(e, opts.systemMessage)
|
||||
|
||||
|
||||
let option = {
|
||||
timeoutMs: 600000,
|
||||
|
|
@ -583,6 +583,7 @@ class Core {
|
|||
option.completionParams = {}
|
||||
}
|
||||
promptAddition && (prompt += promptAddition)
|
||||
option.systemMessage = await handleSystem(e, option.systemMessage)
|
||||
systemAddition && (option.systemMessage += systemAddition)
|
||||
opts.completionParams.parameters.tools = Object.keys(funcMap)
|
||||
.map(k => funcMap[k].function)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue