mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-11-29 18:28:09 +08:00
fix: message length error
This commit is contained in:
parent
59a3c84b52
commit
f46019ef78
@ -151,7 +151,7 @@ export class ChatgptRobotComponent implements OnInit {
|
|||||||
|
|
||||||
//Get message by messageNumber,filter out the error message/official message
|
//Get message by messageNumber,filter out the error message/official message
|
||||||
const result = this.messages
|
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);
|
.slice(-messageNumber);
|
||||||
|
|
||||||
//If last question is too long, we need to split it
|
//If last question is too long, we need to split it
|
||||||
|
Loading…
Reference in New Issue
Block a user