forked from open-webui/open-webui
fix
This commit is contained in:
parent
ee22e641ff
commit
af388dfe62
1 changed files with 1 additions and 12 deletions
|
@ -539,23 +539,12 @@
|
||||||
stream: true,
|
stream: true,
|
||||||
messages: [
|
messages: [
|
||||||
$settings.system
|
$settings.system
|
||||||
? {
|
|
||||||
role: 'system',
|
|
||||||
content: $settings.system
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
...messages.filter((message) => !message.deleted)
|
|
||||||
]
|
|
||||||
.filter((message) => message)
|
|
||||||
.map((message, idx, arr) => ({
|
|
||||||
role: message.role,
|
|
||||||
...(message.files?.filter((file) => file.type === 'image').length > 0 ?? false
|
|
||||||
? {
|
? {
|
||||||
role: 'system',
|
role: 'system',
|
||||||
content: $settings.system
|
content: $settings.system
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
...messages
|
...messages.filter((message) => !message.deleted)
|
||||||
]
|
]
|
||||||
.filter((message) => message)
|
.filter((message) => message)
|
||||||
.map((message, idx, arr) => ({
|
.map((message, idx, arr) => ({
|
||||||
|
|
Loading…
Reference in a new issue