{$i18n.t('Functions')} | {$WEBUI_NAME}
{$i18n.t('Functions')}
{filteredItems.length}
{#each filteredItems as func}
{func.type}
{#if func?.meta?.manifest?.version}
v{func?.meta?.manifest?.version ?? ''}
{/if}
{func.name}
{func.id}
{func.meta.description}
{#if shiftKey} {:else} {#if func?.meta?.manifest?.funding_url ?? false} {/if} { goto(`/workspace/functions/edit?id=${encodeURIComponent(func.id)}`); }} shareHandler={() => { shareHandler(func); }} cloneHandler={() => { cloneHandler(func); }} exportHandler={() => { exportHandler(func); }} deleteHandler={async () => { selectedFunction = func; showDeleteConfirm = true; }} toggleGlobalHandler={() => { if (['filter', 'action'].includes(func.type)) { toggleGlobalHandler(func); } }} onClose={() => {}} > {/if}
{ toggleFunctionById(localStorage.token, func.id); models.set(await getModels(localStorage.token)); }} />
{/each}
{ console.log(importFiles); showConfirm = true; }} />
{#if $config?.features.enable_community_sharing}
{$i18n.t('Made by OpenWebUI Community')}
{$i18n.t('Discover a function')}
{$i18n.t('Discover, download, and explore custom functions')}
{/if} { deleteHandler(selectedFunction); }} >
{$i18n.t('This will delete')} {selectedFunction.name}.
{ await tick(); models.set(await getModels(localStorage.token)); }} /> { const reader = new FileReader(); reader.onload = async (event) => { const _functions = JSON.parse(event.target.result); console.log(_functions); for (const func of _functions) { const res = await createNewFunction(localStorage.token, func).catch((error) => { toast.error(error); return null; }); } toast.success($i18n.t('Functions imported successfully')); functions.set(await getFunctions(localStorage.token)); models.set(await getModels(localStorage.token)); }; reader.readAsText(importFiles[0]); }} >
Please carefully review the following warnings:
  • {$i18n.t('Functions allow arbitrary code execution.')}
  • {$i18n.t('Do not install functions from sources you do not fully trust.')}
{$i18n.t( 'I acknowledge that I have read and I understand the implications of my action. I am aware of the risks associated with executing arbitrary code and I have verified the trustworthiness of the source.' )}