mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
feat: 自定义后处理器
This commit is contained in:
parent
f0a17dc422
commit
d08e9e4102
3 changed files with 37 additions and 2 deletions
|
|
@ -823,6 +823,15 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
}
|
||||
let response = chatMessage?.text?.replace('\n\n\n', '\n')
|
||||
if (handler.has('chatgpt.response.post')) {
|
||||
handler.call('chatgpt.response.post', this.e, {
|
||||
content: response,
|
||||
use,
|
||||
prompt
|
||||
}, true).catch(err => {
|
||||
logger.error('后处理器出错', err)
|
||||
})
|
||||
}
|
||||
let mood = 'blandness'
|
||||
if (!response) {
|
||||
await this.reply('没有任何回复', true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue