Skip to content

Commit

Permalink
fix: message length error
Browse files Browse the repository at this point in the history
  • Loading branch information
scarqin committed Mar 22, 2023
1 parent 59a3c84 commit f46019e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class ChatgptRobotComponent implements OnInit {

//Get message by messageNumber,filter out the error message/official message
const result = this.messages
.filter(val => !val.reply || (val.reply && (!val.text.includes('ChatGPT Error:') || val.user?.name === this.appName)))
.filter(val => !val.reply || (val.reply && (!val.text?.includes('ChatGPT Error') || val.user?.name === this.appName)))
.slice(-messageNumber);

//If last question is too long, we need to split it
Expand Down

0 comments on commit f46019e

Please sign in to comment.