Updated filter to filter null message objects as well.

This commit is contained in:
Aly Mobarak 2024-05-21 13:30:21 +03:00
parent 8116b04338
commit a07b89da6f
No known key found for this signature in database
GPG Key ID: C937AAF860FB652D

View File

@ -619,6 +619,7 @@
: undefined, : undefined,
...messages ...messages
] ]
.filter((message) => message)
.filter((message) => message.content != "") .filter((message) => message.content != "")
.map((message, idx, arr) => ({ .map((message, idx, arr) => ({
role: message.role, role: message.role,