mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: 修复部分情况仍然返回风控的问题
This commit is contained in:
parent
211ccba00a
commit
f8385a8e37
1 changed files with 14 additions and 0 deletions
|
|
@ -449,6 +449,20 @@ export default class SydneyAIClient {
|
|||
reject('Unexpected message author.')
|
||||
return
|
||||
}
|
||||
if (messages[0].contentOrigin === 'Apology') {
|
||||
console.log('Apology found')
|
||||
stopTokenFound = true
|
||||
clearTimeout(messageTimeout)
|
||||
clearTimeout(firstTimeout)
|
||||
this.cleanupWebSocketConnection(ws)
|
||||
message.adaptiveCards[0].body[0].text = replySoFar
|
||||
message.text = replySoFar
|
||||
resolve({
|
||||
message,
|
||||
conversationExpiryTime: event?.item?.conversationExpiryTime
|
||||
})
|
||||
return
|
||||
}
|
||||
if (event.item?.result?.error) {
|
||||
if (this.debug) {
|
||||
console.debug(event.item.result.value, event.item.result.message)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue