mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
fix formatting
This commit is contained in:
parent
6046e52c76
commit
b78d28e5cc
1 changed files with 9 additions and 7 deletions
|
|
@ -1882,14 +1882,16 @@
|
|||
let toolCallIndex = 0;
|
||||
|
||||
for (const processedMessage of processedMessages) {
|
||||
|
||||
if (typeof processedMessage == "string") {
|
||||
if (typeof processedMessage == 'string') {
|
||||
nonToolMesssage = {
|
||||
role: message?.role,
|
||||
content: message?.role === 'user' ? processedMessage : processedMessage.trim()
|
||||
};
|
||||
|
||||
if (message?.role === 'user' && (message.files?.filter((file) => file.type === 'image').length > 0 ?? false)) {
|
||||
if (
|
||||
message?.role === 'user' &&
|
||||
(message.files?.filter((file) => file.type === 'image').length > 0 ?? false)
|
||||
) {
|
||||
nonToolMesssage = {
|
||||
...nonToolMesssage,
|
||||
...message.files
|
||||
|
|
@ -1900,7 +1902,7 @@
|
|||
url: file.url
|
||||
}
|
||||
}))
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
messages.push(nonToolMesssage);
|
||||
|
|
|
|||
Loading…
Reference in a new issue