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 ActionsSelector from '$lib/components/workspace/Models/ActionsSelector.svelte';
|
||||||
import Capabilities from '$lib/components/workspace/Models/Capabilities.svelte';
|
import Capabilities from '$lib/components/workspace/Models/Capabilities.svelte';
|
||||||
import Textarea from '$lib/components/common/Textarea.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');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
@ -30,6 +33,8 @@
|
|||||||
let showAdvanced = false;
|
let showAdvanced = false;
|
||||||
let showPreview = false;
|
let showPreview = false;
|
||||||
|
|
||||||
|
let loaded = false;
|
||||||
|
|
||||||
// ///////////
|
// ///////////
|
||||||
// model
|
// model
|
||||||
// ///////////
|
// ///////////
|
||||||
@ -138,6 +143,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMount(async () => {
|
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
|
// Scroll to top 'workspace-container' element
|
||||||
const workspaceContainer = document.getElementById('workspace-container');
|
const workspaceContainer = document.getElementById('workspace-container');
|
||||||
if (workspaceContainer) {
|
if (workspaceContainer) {
|
||||||
@ -215,10 +224,13 @@
|
|||||||
|
|
||||||
console.log(model);
|
console.log(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loaded = true;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full max-h-full flex justify-center">
|
{#if loaded}
|
||||||
|
<div class="w-full max-h-full flex justify-center">
|
||||||
<input
|
<input
|
||||||
bind:this={filesInputElement}
|
bind:this={filesInputElement}
|
||||||
bind:files={inputFiles}
|
bind:files={inputFiles}
|
||||||
@ -385,7 +397,8 @@
|
|||||||
}}
|
}}
|
||||||
required
|
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}
|
{#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>
|
<option value={model.id} class=" text-gray-900">{model.name}</option>
|
||||||
@ -487,7 +500,9 @@
|
|||||||
<div class="my-2">
|
<div class="my-2">
|
||||||
<div class="flex w-full justify-between items-center">
|
<div class="flex w-full justify-between items-center">
|
||||||
<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
|
<button
|
||||||
class="p-1 text-xs flex rounded transition"
|
class="p-1 text-xs flex rounded transition"
|
||||||
@ -709,4 +724,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user