mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
Merge pull request #2478 from Yanyutin753/chat-message
feat make stronger
This commit is contained in:
commit
f753db603b
@ -425,8 +425,7 @@
|
|||||||
: undefined,
|
: undefined,
|
||||||
...messages
|
...messages
|
||||||
]
|
]
|
||||||
.filter((message) => message)
|
.filter((message) => message?.content?.trim())
|
||||||
.filter((message) => message.content != '')
|
|
||||||
.map((message, idx, arr) => {
|
.map((message, idx, arr) => {
|
||||||
// Prepare the base message object
|
// Prepare the base message object
|
||||||
const baseMessage = {
|
const baseMessage = {
|
||||||
@ -686,8 +685,7 @@
|
|||||||
: undefined,
|
: undefined,
|
||||||
...messages
|
...messages
|
||||||
]
|
]
|
||||||
.filter((message) => message)
|
.filter((message) => message?.content?.trim())
|
||||||
.filter((message) => message.content != '')
|
|
||||||
.map((message, idx, arr) => ({
|
.map((message, idx, arr) => ({
|
||||||
role: message.role,
|
role: message.role,
|
||||||
...((message.files?.filter((file) => file.type === 'image').length > 0 ?? false) &&
|
...((message.files?.filter((file) => file.type === 'image').length > 0 ?? false) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user