Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
72e9cecb
Commit
72e9cecb
authored
Jul 16, 2024
by
Timothy J. Baek
Browse files
fix: allow boolean values in params
parent
27e74948
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte
...b/components/chat/Settings/Advanced/AdvancedParams.svelte
+27
-2
No files found.
src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte
View file @
72e9cecb
<script lang="ts">
<script lang="ts">
import Switch from '$lib/components/common/Switch.svelte';
import { getContext, createEventDispatcher } from 'svelte';
import { getContext, createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher();
...
@@ -720,10 +721,22 @@
...
@@ -720,10 +721,22 @@
{#if (params?.use_mmap ?? null) === null}
{#if (params?.use_mmap ?? null) === null}
<span class="ml-2 self-center">{$i18n.t('Default')}</span>
<span class="ml-2 self-center">{$i18n.t('Default')}</span>
{:else}
{:else}
<span class="ml-2 self-center">{$i18n.t('
On
')}</span>
<span class="ml-2 self-center">{$i18n.t('
Custom
')}</span>
{/if}
{/if}
</button>
</button>
</div>
</div>
{#if (params?.use_mmap ?? null) !== null}
<div class="flex justify-between items-center mt-1">
<div class="text-xs text-gray-500">
{params.use_mmap ? 'Enabled' : 'Disabled'}
</div>
<div class=" pr-2">
<Switch bind:state={params.use_mmap} />
</div>
</div>
{/if}
</div>
</div>
<div class=" py-0.5 w-full justify-between">
<div class=" py-0.5 w-full justify-between">
...
@@ -740,10 +753,22 @@
...
@@ -740,10 +753,22 @@
{#if (params?.use_mlock ?? null) === null}
{#if (params?.use_mlock ?? null) === null}
<span class="ml-2 self-center">{$i18n.t('Default')}</span>
<span class="ml-2 self-center">{$i18n.t('Default')}</span>
{:else}
{:else}
<span class="ml-2 self-center">{$i18n.t('
On
')}</span>
<span class="ml-2 self-center">{$i18n.t('
Custom
')}</span>
{/if}
{/if}
</button>
</button>
</div>
</div>
{#if (params?.use_mlock ?? null) !== null}
<div class="flex justify-between items-center mt-1">
<div class="text-xs text-gray-500">
{params.use_mlock ? 'Enabled' : 'Disabled'}
</div>
<div class=" pr-2">
<Switch bind:state={params.use_mlock} />
</div>
</div>
{/if}
</div>
</div>
<div class=" py-0.5 w-full justify-between">
<div class=" py-0.5 w-full justify-between">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment