Add translation response size option

This commit is contained in:
Yuhwan Kim
2024-06-02 03:53:50 +09:00
parent 958217839b
commit 3f78daf563
7 changed files with 20 additions and 7 deletions

View File

@@ -5,7 +5,8 @@
import { sleep } from "src/ts/util";
import OptionInput from "src/lib/UI/GUI/OptionInput.svelte";
import SelectInput from "src/lib/UI/GUI/SelectInput.svelte";
import { alertNormal, alertSelect } from "src/ts/alert";
import NumberInput from "src/lib/UI/GUI/NumberInput.svelte";
import { alertNormal, alertSelect, alertConfirm } from "src/ts/alert";
import { downloadFile, isTauri } from "src/ts/storage/globalApi";
import { languageEnglish } from "src/lang/en";
import TextInput from "src/lib/UI/GUI/TextInput.svelte";
@@ -13,7 +14,7 @@
import Help from "src/lib/Others/Help.svelte";
let langChanged = false
</script>
</script>
<h2 class="mb-2 text-2xl font-bold mt-2">{language.language}</h2>
@@ -111,7 +112,8 @@
<TextInput bind:value={$DataBase.deeplXOptions.token} />
{/if}
<span class="text-textcolor mt-4">{language.translationPrompt}</span>
{#if $DataBase.translatorType === 'llm'}
<span class="text-textcolor mt-4">{language.translationResponseSize}</span>
<NumberInput min={0} max={2048} marginBottom={true} bind:value={$DataBase.translatorMaxResponse}/>
<TextAreaInput bind:value={$DataBase.translatorPrompt} placeholder={"You are a translator. translate the following html or text into {{slot}}. do not output anything other than the translation."}/>
{/if}
@@ -125,4 +127,4 @@
<Check bind:check={$DataBase.combineTranslation} name={language.combineTranslation}>
<Help key="combineTranslation"/>
</Check>
{/if}
</div>