mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: toLowerCase 报错
This commit is contained in:
parent
8f296fa39e
commit
c5976439cb
2 changed files with 7 additions and 5 deletions
10
apps/chat.js
10
apps/chat.js
|
|
@ -603,10 +603,12 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
let response = chatMessage?.text
|
||||
// 检索是否有屏蔽词
|
||||
const blockWord = Config.blockWords.find(word => response.toLowerCase().includes(word.toLowerCase()))
|
||||
if (blockWord) {
|
||||
await this.reply('返回内容存在敏感词,我不想回答你', true)
|
||||
return false
|
||||
if (response) {
|
||||
const blockWord = Config.blockWords.find(word => response.toLowerCase().includes(word.toLowerCase()))
|
||||
if (blockWord) {
|
||||
await this.reply('返回内容存在敏感词,我不想回答你', true)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
let quotemessage = []
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ export default class SydneyAIClient {
|
|||
// adaptiveCardsSoFar || (message.adaptiveCards[0].body[0].text = replySoFar)
|
||||
console.log({ replySoFar, message })
|
||||
message.adaptiveCards = adaptiveCardsSoFar
|
||||
message.text = replySoFar
|
||||
message.text = replySoFar || message.spokenText
|
||||
resolve({
|
||||
message,
|
||||
conversationExpiryTime: event?.item?.conversationExpiryTime
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue