|
@@ -1,4 +1,8 @@
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
|
+ import { getContext } from 'svelte';
|
|
|
|
+
|
|
|
|
+ const i18n = getContext('i18n');
|
|
|
|
+
|
|
export let options = {
|
|
export let options = {
|
|
// Advanced
|
|
// Advanced
|
|
seed: 0,
|
|
seed: 0,
|
|
@@ -20,7 +24,7 @@
|
|
<div class=" space-y-3 text-xs">
|
|
<div class=" space-y-3 text-xs">
|
|
<div>
|
|
<div>
|
|
<div class=" py-0.5 flex w-full justify-between">
|
|
<div class=" py-0.5 flex w-full justify-between">
|
|
- <div class=" w-20 text-xs font-medium self-center">Seed</div>
|
|
|
|
|
|
+ <div class=" w-20 text-xs font-medium self-center">{$i18n.t('Seed')}</div>
|
|
<div class=" flex-1 self-center">
|
|
<div class=" flex-1 self-center">
|
|
<input
|
|
<input
|
|
class="w-full rounded py-1.5 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none border border-gray-100 dark:border-gray-600"
|
|
class="w-full rounded py-1.5 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none border border-gray-100 dark:border-gray-600"
|
|
@@ -36,7 +40,7 @@
|
|
|
|
|
|
<div>
|
|
<div>
|
|
<div class=" py-0.5 flex w-full justify-between">
|
|
<div class=" py-0.5 flex w-full justify-between">
|
|
- <div class=" w-20 text-xs font-medium self-center">Stop Sequence</div>
|
|
|
|
|
|
+ <div class=" w-20 text-xs font-medium self-center">{$i18n.t('Stop Sequence')}</div>
|
|
<div class=" flex-1 self-center">
|
|
<div class=" flex-1 self-center">
|
|
<input
|
|
<input
|
|
class="w-full rounded py-1.5 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none border border-gray-100 dark:border-gray-600"
|
|
class="w-full rounded py-1.5 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none border border-gray-100 dark:border-gray-600"
|
|
@@ -51,7 +55,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Temperature</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Temperature')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -61,9 +65,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.temperature === ''}
|
|
{#if options.temperature === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center"> {$i18n.t('Default')} </span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center"> {$i18n.t('Custom')} </span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -97,7 +101,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Mirostat</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Mirostat')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -107,9 +111,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.mirostat === ''}
|
|
{#if options.mirostat === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -143,7 +147,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Mirostat Eta</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Mirostat Eta')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -153,9 +157,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.mirostat_eta === ''}
|
|
{#if options.mirostat_eta === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -189,7 +193,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Mirostat Tau</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Mirostat Tau')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -199,9 +203,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.mirostat_tau === ''}
|
|
{#if options.mirostat_tau === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -235,7 +239,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Top K</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Top K')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -245,9 +249,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.top_k === ''}
|
|
{#if options.top_k === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -281,7 +285,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Top P</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Top P')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -291,9 +295,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.top_p === ''}
|
|
{#if options.top_p === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -327,7 +331,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Repeat Penalty</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Repeat Penalty')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -337,9 +341,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.repeat_penalty === ''}
|
|
{#if options.repeat_penalty === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -373,7 +377,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Repeat Last N</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Repeat Last N')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -383,9 +387,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.repeat_last_n === ''}
|
|
{#if options.repeat_last_n === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -419,7 +423,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Tfs Z</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Tfs Z')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -429,9 +433,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.tfs_z === ''}
|
|
{#if options.tfs_z === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -465,7 +469,7 @@
|
|
|
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Context Length</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Context Length')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -475,9 +479,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.num_ctx === ''}
|
|
{#if options.num_ctx === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -510,7 +514,7 @@
|
|
</div>
|
|
</div>
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class=" py-0.5 w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
<div class="flex w-full justify-between">
|
|
- <div class=" self-center text-xs font-medium">Max Tokens</div>
|
|
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Max Tokens')}</div>
|
|
|
|
|
|
<button
|
|
<button
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
class="p-1 px-3 text-xs flex rounded transition"
|
|
@@ -520,9 +524,9 @@
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
{#if options.num_predict === ''}
|
|
{#if options.num_predict === ''}
|
|
- <span class="ml-2 self-center"> Default </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Default ')}</span>
|
|
{:else}
|
|
{:else}
|
|
- <span class="ml-2 self-center"> Custom </span>
|
|
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t(' Custom ')}</span>
|
|
{/if}
|
|
{/if}
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|