forked from open-webui/open-webui
		
	feat: sponsor custom name support
This commit is contained in:
		
							parent
							
								
									fc330a1e8b
								
							
						
					
					
						commit
						62f67bed29
					
				
					 17 changed files with 94 additions and 44 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
<script lang="ts">
 | 
			
		||||
	import { WEBUI_BASE_URL } from '$lib/constants';
 | 
			
		||||
	import { onMount } from 'svelte';
 | 
			
		||||
 | 
			
		||||
	export let models = [];
 | 
			
		||||
| 
						 | 
				
			
			@ -27,14 +28,16 @@
 | 
			
		|||
					>
 | 
			
		||||
						{#if model in modelfiles}
 | 
			
		||||
							<img
 | 
			
		||||
								src={modelfiles[model]?.imageUrl ?? './favicon.png'}
 | 
			
		||||
								src={modelfiles[model]?.imageUrl ?? `${WEBUI_BASE_URL}/static/favicon.png`}
 | 
			
		||||
								alt="modelfile"
 | 
			
		||||
								class=" w-14 rounded-full border-[1px] border-gray-200 dark:border-none"
 | 
			
		||||
								draggable="false"
 | 
			
		||||
							/>
 | 
			
		||||
						{:else}
 | 
			
		||||
							<img
 | 
			
		||||
								src={models.length === 1 ? '/favicon.png' : '/favicon.png'}
 | 
			
		||||
								src={models.length === 1
 | 
			
		||||
									? `${WEBUI_BASE_URL}/static/favicon.png`
 | 
			
		||||
									: `${WEBUI_BASE_URL}/static/favicon.png`}
 | 
			
		||||
								class=" w-14 rounded-full border-[1px] border-gray-200 dark:border-none"
 | 
			
		||||
								alt="logo"
 | 
			
		||||
								draggable="false"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -298,7 +298,9 @@
 | 
			
		|||
 | 
			
		||||
{#key message.id}
 | 
			
		||||
	<div class=" flex w-full message-{message.id}">
 | 
			
		||||
		<ProfileImage src={modelfiles[message.model]?.imageUrl ?? '/favicon.png'} />
 | 
			
		||||
		<ProfileImage
 | 
			
		||||
			src={modelfiles[message.model]?.imageUrl ?? `${WEBUI_BASE_URL}/static/favicon.png`}
 | 
			
		||||
		/>
 | 
			
		||||
 | 
			
		||||
		<div class="w-full overflow-hidden">
 | 
			
		||||
			<Name>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
<script lang="ts">
 | 
			
		||||
	import { getOllamaVersion } from '$lib/apis/ollama';
 | 
			
		||||
	import { WEBUI_NAME, WEB_UI_VERSION } from '$lib/constants';
 | 
			
		||||
	import { config, showChangelog } from '$lib/stores';
 | 
			
		||||
	import { WEBUI_VERSION } from '$lib/constants';
 | 
			
		||||
	import { WEBUI_NAME, config, showChangelog } from '$lib/stores';
 | 
			
		||||
	import { onMount } from 'svelte';
 | 
			
		||||
 | 
			
		||||
	let ollamaVersion = '';
 | 
			
		||||
| 
						 | 
				
			
			@ -17,13 +17,13 @@
 | 
			
		|||
		<div>
 | 
			
		||||
			<div class=" mb-2.5 text-sm font-medium flex space-x-2 items-center">
 | 
			
		||||
				<div>
 | 
			
		||||
					{WEBUI_NAME} Version
 | 
			
		||||
					{$WEBUI_NAME} Version
 | 
			
		||||
				</div>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div class="flex w-full">
 | 
			
		||||
				<div class="flex-1 text-xs text-gray-700 dark:text-gray-200 flex space-x-1.5 items-center">
 | 
			
		||||
					<div>
 | 
			
		||||
						v{WEB_UI_VERSION}
 | 
			
		||||
						v{WEBUI_VERSION}
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<button
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,8 +3,8 @@
 | 
			
		|||
	import toast from 'svelte-french-toast';
 | 
			
		||||
 | 
			
		||||
	import { createModel, deleteModel, pullModel } from '$lib/apis/ollama';
 | 
			
		||||
	import { WEBUI_API_BASE_URL, WEBUI_NAME } from '$lib/constants';
 | 
			
		||||
	import { models, user } from '$lib/stores';
 | 
			
		||||
	import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
 | 
			
		||||
	import { WEBUI_NAME, models, user } from '$lib/stores';
 | 
			
		||||
	import { splitStream } from '$lib/utils';
 | 
			
		||||
 | 
			
		||||
	export let getModels: Function;
 | 
			
		||||
| 
						 | 
				
			
			@ -59,9 +59,9 @@
 | 
			
		|||
				} else {
 | 
			
		||||
					toast.success(`Model '${modelName}' has been successfully downloaded.`);
 | 
			
		||||
 | 
			
		||||
					const notification = new Notification(WEBUI_NAME, {
 | 
			
		||||
					const notification = new Notification($WEBUI_NAME, {
 | 
			
		||||
						body: `Model '${modelName}' has been successfully downloaded.`,
 | 
			
		||||
						icon: '/favicon.png'
 | 
			
		||||
						icon: `${WEBUI_BASE_URL}/static/favicon.png`
 | 
			
		||||
					});
 | 
			
		||||
 | 
			
		||||
					models.set(await getModels());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue