feat make stronger

This commit is contained in:
Yanyutin753 2024-05-22 09:35:59 +08:00
parent 0cc4366f70
commit bf614068c0

View File

@ -425,8 +425,7 @@
: undefined,
...messages
]
.filter((message) => message)
.filter((message) => message.content != '')
.filter((message) => message?.content?.trim())
.map((message, idx, arr) => {
// Prepare the base message object
const baseMessage = {
@ -686,8 +685,7 @@
: undefined,
...messages
]
.filter((message) => message)
.filter((message) => message.content != '')
.filter((message) => message?.content?.trim())
.map((message, idx, arr) => ({
role: message.role,
...((message.files?.filter((file) => file.type === 'image').length > 0 ?? false) &&