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