Skip to content

Commit

Permalink
Fix Oobamode (#374)
Browse files Browse the repository at this point in the history
# PR Checklist
- [ ] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [ ] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
  • Loading branch information
kwaroran authored Apr 20, 2024
2 parents ccf2ba8 + 98aa9cb commit f9e6b11
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/lib/Setting/Pages/OobaSettings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@

<Arcodion name="Ooba Settings" styled>
{#if instructionMode}
<span class="text-textcolor">System Prefix</span>
<TextAreaInput fullwidth autocomplete="off" height={"24"} bind:value={$DataBase.ooba.formating.systemPrefix} />
<span class="text-textcolor">User Prefix</span>
<TextAreaInput fullwidth autocomplete="off" height={"24"} bind:value={$DataBase.ooba.formating.userPrefix} />
<span class="text-textcolor">Assistant Prefix</span>
<TextAreaInput fullwidth autocomplete="off" height={"24"} bind:value={$DataBase.ooba.formating.assistantPrefix} />
<span class="text-textcolor">Seperator</span>
<TextAreaInput fullwidth autocomplete="off" height={"24"} bind:value={$DataBase.ooba.formating.seperator} />
<span class="text-textcolor">Chat Formating</span>
<SelectInput bind:value={$DataBase.instructChatTemplate}>
<OptionInput value="chatml">ChatML</OptionInput>
<OptionInput value="llama3">Llama3</OptionInput>
<OptionInput value="gpt2">GPT2</OptionInput>
<OptionInput value="gemma">Gemma</OptionInput>
<OptionInput value="mistral">Mistral</OptionInput>
<OptionInput value="llama2">Llama2</OptionInput>
<OptionInput value="jinja">Custom (Jinja)</OptionInput>
</SelectInput>

{#if $DataBase.instructChatTemplate === 'jinja'}
<span class="text-textcolor">Jinja Template</span>
<TextAreaInput fullwidth autocomplete="off" height={"24"} bind:value={$DataBase.JinjaTemplate} />
{/if}
{:else}
<span class="text-textcolor">Ooba Mode</span>
<SelectInput className="mt-2 mb-4" bind:value={$DataBase.reverseProxyOobaArgs.mode}>
Expand Down
1 change: 1 addition & 0 deletions src/ts/storage/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ export function setDatabase(data:Database){
data.min_p ??= 0
data.top_a ??= 0
data.customTokenizer ??= 'tik'
data.instructChatTemplate ??= "chatml"

changeLanguage(data.language)
DataBase.set(data)
Expand Down

0 comments on commit f9e6b11

Please sign in to comment.