mirror of
https://github.com/open-webui/open-webui
synced 2025-04-04 21:03:18 +00:00
fix: merged response should be used in messages payload
This commit is contained in:
parent
badbe4ea06
commit
f03629de61
@ -1070,7 +1070,7 @@
|
||||
// Prepare the base message object
|
||||
const baseMessage = {
|
||||
role: message.role,
|
||||
content: message.content
|
||||
content: message?.merged?.content ?? message.content
|
||||
};
|
||||
|
||||
// Extract and format image URLs if any exist
|
||||
@ -1535,10 +1535,7 @@
|
||||
content: [
|
||||
{
|
||||
type: 'text',
|
||||
text:
|
||||
arr.length - 1 !== idx
|
||||
? message.content
|
||||
: (message?.raContent ?? message.content)
|
||||
text: message?.merged?.content ?? message.content
|
||||
},
|
||||
...message.files
|
||||
.filter((file) => file.type === 'image')
|
||||
@ -1551,10 +1548,7 @@
|
||||
]
|
||||
}
|
||||
: {
|
||||
content:
|
||||
arr.length - 1 !== idx
|
||||
? message.content
|
||||
: (message?.raContent ?? message.content)
|
||||
content: message?.merged?.content ?? message.content
|
||||
})
|
||||
})),
|
||||
seed: params?.seed ?? $settings?.params?.seed ?? undefined,
|
||||
|
@ -16,7 +16,6 @@
|
||||
import Markdown from './Markdown.svelte';
|
||||
import Name from './Name.svelte';
|
||||
import Skeleton from './Skeleton.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
export let chatId;
|
||||
@ -155,7 +154,6 @@
|
||||
await tick();
|
||||
|
||||
const messageElement = document.getElementById(`message-${messageId}`);
|
||||
console.log(messageElement);
|
||||
if (messageElement) {
|
||||
messageElement.scrollIntoView({ block: 'start' });
|
||||
}
|
||||
@ -237,7 +235,7 @@
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
{#if !readOnly && isLastMessage}
|
||||
{#if !readOnly}
|
||||
{#if !Object.keys(groupedMessageIds).find((modelIdx) => {
|
||||
const { messageIds } = groupedMessageIds[modelIdx];
|
||||
const _messageId = messageIds[groupedMessageIdsIdx[modelIdx]];
|
||||
@ -272,6 +270,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if isLastMessage}
|
||||
<div class=" flex-shrink-0 text-gray-600 dark:text-gray-500 mt-1">
|
||||
<Tooltip content={$i18n.t('Merge Responses')} placement="bottom">
|
||||
<button
|
||||
@ -288,6 +287,7 @@
|
||||
</button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user