mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 05:17:10 +00:00
fix: system
This commit is contained in:
parent
a3c74f82db
commit
185f163c9c
1 changed files with 2 additions and 10 deletions
12
apps/chat.js
12
apps/chat.js
|
|
@ -17,10 +17,6 @@ export class Chat extends plugin {
|
|||
reg: '^[^#][sS]*',
|
||||
fnc: 'chat',
|
||||
log: false
|
||||
},
|
||||
{
|
||||
reg: '#hi',
|
||||
fnc: 'history'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
|
@ -69,7 +65,8 @@ export class Chat extends plugin {
|
|||
})
|
||||
sendMessageOptions.conversationId = state?.current?.conversationId
|
||||
sendMessageOptions.parentMessageId = state?.current?.messageId || state?.conversations.find(c => c.id === sendMessageOptions.conversationId)?.lastMessageId
|
||||
if (Config.llm.enableGroupContext && e.isGroup) {
|
||||
const enableGroupContext = (preset.groupContext === 'use_system' || !preset.groupContext) ? Config.llm.enableGroupContext : (preset.groupContext === 'enabled')
|
||||
if (enableGroupContext && e.isGroup) {
|
||||
const contextPrompt = await getGroupContextPrompt(e, Config.llm.groupContextLength)
|
||||
sendMessageOptions.systemOverride = sendMessageOptions.systemOverride ? sendMessageOptions.systemOverride + '\n' + contextPrompt : (preset.sendMessageOption.systemOverride + contextPrompt)
|
||||
}
|
||||
|
|
@ -99,9 +96,4 @@ export class Chat extends plugin {
|
|||
this.reply(forwardElement)
|
||||
}
|
||||
}
|
||||
|
||||
async history (e) {
|
||||
const history = await getGroupHistory(e, 10)
|
||||
e.reply(JSON.stringify(history))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue