mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
修复回复内容过长时,同时回复语音的问题
This commit is contained in:
parent
4a6cad2e4e
commit
f4fccf957f
1 changed files with 7 additions and 5 deletions
12
apps/chat.js
12
apps/chat.js
|
|
@ -1302,11 +1302,13 @@ export class chatgpt extends plugin {
|
||||||
this.reply(`建议的回复:\n${chatMessage.suggestedResponses}`)
|
this.reply(`建议的回复:\n${chatMessage.suggestedResponses}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const sendable = await generateAudio(this.e, ttsResponse, emotion, emotionDegree)
|
if(ttsResponse.length <= parseInt(Config.ttsAutoFallbackThreshold)) {
|
||||||
if (sendable) {
|
const sendable = await generateAudio(this.e, ttsResponse, emotion, emotionDegree)
|
||||||
await this.reply(sendable)
|
if (sendable) {
|
||||||
} else {
|
await this.reply(sendable)
|
||||||
await this.reply('合成语音发生错误~')
|
} else {
|
||||||
|
await this.reply('合成语音发生错误~')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (userSetting.usePicture || (Config.autoUsePicture && response.length > Config.autoUsePictureThreshold)) {
|
} else if (userSetting.usePicture || (Config.autoUsePicture && response.length > Config.autoUsePictureThreshold)) {
|
||||||
// todo use next api of chatgpt to complete incomplete respoonse
|
// todo use next api of chatgpt to complete incomplete respoonse
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue