mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 16:51:17 +00:00
refac: responseMessage
This commit is contained in:
parent
dac9634242
commit
ce3d582e61
@ -14,7 +14,7 @@
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
import { config, settings } from '$lib/stores';
|
||||
import { config, models, settings } from '$lib/stores';
|
||||
import { synthesizeOpenAISpeech } from '$lib/apis/audio';
|
||||
import { imageGenerations } from '$lib/apis/images';
|
||||
import {
|
||||
@ -34,7 +34,6 @@
|
||||
import RateComment from './RateComment.svelte';
|
||||
import CitationsModal from '$lib/components/chat/Messages/CitationsModal.svelte';
|
||||
|
||||
export let modelfiles = [];
|
||||
export let message;
|
||||
export let siblings;
|
||||
|
||||
@ -52,6 +51,9 @@
|
||||
export let continueGeneration: Function;
|
||||
export let regenerateResponse: Function;
|
||||
|
||||
let model = null;
|
||||
$: model = $models.find((m) => m.id === message.model);
|
||||
|
||||
let edit = false;
|
||||
let editedContent = '';
|
||||
let editTextAreaElement: HTMLTextAreaElement;
|
||||
@ -338,17 +340,13 @@
|
||||
dir={$settings.chatDirection}
|
||||
>
|
||||
<ProfileImage
|
||||
src={modelfiles[message.model]?.imageUrl ??
|
||||
src={model?.info?.meta?.profile_image_url ??
|
||||
($i18n.language === 'dg-DG' ? `/doge.png` : `${WEBUI_BASE_URL}/static/favicon.png`)}
|
||||
/>
|
||||
|
||||
<div class="w-full overflow-hidden pl-1">
|
||||
<Name>
|
||||
{#if message.model in modelfiles}
|
||||
{modelfiles[message.model]?.title}
|
||||
{:else}
|
||||
{message.modelName ? ` ${message.modelName}` : message.model ? ` ${message.model}` : ''}
|
||||
{/if}
|
||||
{model.name}
|
||||
|
||||
{#if message.timestamp}
|
||||
<span
|
||||
|
Loading…
Reference in New Issue
Block a user