mirror of
https://github.com/open-webui/open-webui
synced 2025-04-20 06:20:36 +00:00
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Integration Test / Run Cypress Integration Tests (push) Waiting to run
Integration Test / Run Migration Tests (push) Waiting to run
99 lines
2.7 KiB
Svelte
99 lines
2.7 KiB
Svelte
<script lang="ts">
|
|
import { getBackendConfig } from '$lib/apis';
|
|
import { setDefaultPromptSuggestions } from '$lib/apis/configs';
|
|
import Switch from '$lib/components/common/Switch.svelte';
|
|
import { config, models, settings, user } from '$lib/stores';
|
|
import { createEventDispatcher, onMount, getContext, tick } from 'svelte';
|
|
import { toast } from 'svelte-sonner';
|
|
import ManageModal from './Personalization/ManageModal.svelte';
|
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
|
const dispatch = createEventDispatcher();
|
|
|
|
const i18n = getContext('i18n');
|
|
|
|
export let saveSettings: Function;
|
|
|
|
let showManageModal = false;
|
|
|
|
// Addons
|
|
let enableMemory = false;
|
|
|
|
onMount(async () => {
|
|
enableMemory = $settings?.memory ?? false;
|
|
});
|
|
</script>
|
|
|
|
<ManageModal bind:show={showManageModal} />
|
|
|
|
<form
|
|
class="flex flex-col h-full justify-between space-y-3 text-sm"
|
|
on:submit|preventDefault={() => {
|
|
dispatch('save');
|
|
}}
|
|
>
|
|
<div class=" pr-1.5 py-1 overflow-y-scroll">
|
|
<div>
|
|
<div class="flex items-center justify-between mb-1">
|
|
<Tooltip
|
|
content={$i18n.t(
|
|
'This is an experimental feature, it may not function as expected and is subject to change at any time.'
|
|
)}
|
|
>
|
|
<div class="text-sm font-medium">
|
|
{$i18n.t('Memory')}
|
|
|
|
<span class=" text-xs text-gray-500">({$i18n.t('Experimental')})</span>
|
|
</div>
|
|
</Tooltip>
|
|
|
|
<div class="">
|
|
<Switch
|
|
bind:state={enableMemory}
|
|
on:change={async () => {
|
|
saveSettings({ memory: enableMemory });
|
|
}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="text-xs text-gray-600 dark:text-gray-400">
|
|
<div>
|
|
{$i18n.t(
|
|
"You can personalize your interactions with LLMs by adding memories through the 'Manage' button below, making them more helpful and tailored to you."
|
|
)}
|
|
</div>
|
|
|
|
<!-- <div class="mt-3">
|
|
To understand what LLM remembers or teach it something new, just chat with it:
|
|
|
|
<div>- “Remember that I like concise responses.”</div>
|
|
<div>- “I just got a puppy!”</div>
|
|
<div>- “What do you remember about me?”</div>
|
|
<div>- “Where did we leave off on my last project?”</div>
|
|
</div> -->
|
|
</div>
|
|
|
|
<div class="mt-3 mb-1 ml-1">
|
|
<button
|
|
type="button"
|
|
class=" px-3.5 py-1.5 font-medium hover:bg-black/5 dark:hover:bg-white/5 outline outline-1 outline-gray-300 dark:outline-gray-800 rounded-3xl"
|
|
on:click={() => {
|
|
showManageModal = true;
|
|
}}
|
|
>
|
|
{$i18n.t('Manage')}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex justify-end text-sm font-medium">
|
|
<button
|
|
class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full"
|
|
type="submit"
|
|
>
|
|
{$i18n.t('Save')}
|
|
</button>
|
|
</div>
|
|
</form>
|