mirror of
https://github.com/open-webui/open-webui
synced 2024-11-25 05:18:15 +00:00
fix
This commit is contained in:
parent
81f497c6e3
commit
faf3e81bf0
@ -14,6 +14,9 @@
|
||||
import ActionsSelector from '$lib/components/workspace/Models/ActionsSelector.svelte';
|
||||
import Capabilities from '$lib/components/workspace/Models/Capabilities.svelte';
|
||||
import Textarea from '$lib/components/common/Textarea.svelte';
|
||||
import { getTools } from '$lib/apis/tools';
|
||||
import { getFunctions } from '$lib/apis/functions';
|
||||
import { getKnowledgeItems } from '$lib/apis/knowledge';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@ -30,6 +33,8 @@
|
||||
let showAdvanced = false;
|
||||
let showPreview = false;
|
||||
|
||||
let loaded = false;
|
||||
|
||||
// ///////////
|
||||
// model
|
||||
// ///////////
|
||||
@ -138,6 +143,10 @@
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
await tools.set(await getTools(localStorage.token));
|
||||
await functions.set(await getFunctions(localStorage.token));
|
||||
await knowledgeCollections.set(await getKnowledgeItems(localStorage.token));
|
||||
|
||||
// Scroll to top 'workspace-container' element
|
||||
const workspaceContainer = document.getElementById('workspace-container');
|
||||
if (workspaceContainer) {
|
||||
@ -215,10 +224,13 @@
|
||||
|
||||
console.log(model);
|
||||
}
|
||||
|
||||
loaded = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="w-full max-h-full flex justify-center">
|
||||
{#if loaded}
|
||||
<div class="w-full max-h-full flex justify-center">
|
||||
<input
|
||||
bind:this={filesInputElement}
|
||||
bind:files={inputFiles}
|
||||
@ -385,7 +397,8 @@
|
||||
}}
|
||||
required
|
||||
>
|
||||
<option value={null} class=" text-gray-900">{$i18n.t('Select a base model')}</option
|
||||
<option value={null} class=" text-gray-900"
|
||||
>{$i18n.t('Select a base model')}</option
|
||||
>
|
||||
{#each $models.filter((m) => (model ? m.id !== model.id : true) && !m?.preset && m?.owned_by !== 'arena') as model}
|
||||
<option value={model.id} class=" text-gray-900">{model.name}</option>
|
||||
@ -487,7 +500,9 @@
|
||||
<div class="my-2">
|
||||
<div class="flex w-full justify-between items-center">
|
||||
<div class="flex w-full justify-between items-center">
|
||||
<div class=" self-center text-sm font-semibold">{$i18n.t('Prompt suggestions')}</div>
|
||||
<div class=" self-center text-sm font-semibold">
|
||||
{$i18n.t('Prompt suggestions')}
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="p-1 text-xs flex rounded transition"
|
||||
@ -709,4 +724,5 @@
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user