mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add grammar for ooba llama.cpp
This commit is contained in:
@ -1612,6 +1612,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
<div id="grammar_block_ooba">
|
||||||
|
<h4 data-i18n="Grammar">Grammar</h4>
|
||||||
|
<div class="range-block">
|
||||||
|
<textarea id="grammar_file_textgenerationwebui" rows="2" class="text_pole textarea_compact monospace"></textarea>
|
||||||
|
<div class="toggle-description justifyLeft">
|
||||||
|
<span data-i18n="Type in the desired custom grammar (GBNF).">
|
||||||
|
Type in the desired custom grammar (<a href="https://github.com/ggerganov/llama.cpp/blob/master/grammars/README.md" target="_blank">GBNF</a>).
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
<div class="range-block">
|
<div class="range-block">
|
||||||
<div class="range-block-title" data-i18n="Seed">
|
<div class="range-block-title" data-i18n="Seed">
|
||||||
Seed
|
Seed
|
||||||
|
@ -50,6 +50,7 @@ const textgenerationwebui_settings = {
|
|||||||
mirostat_eta: 0.1,
|
mirostat_eta: 0.1,
|
||||||
guidance_scale: 1,
|
guidance_scale: 1,
|
||||||
negative_prompt: '',
|
negative_prompt: '',
|
||||||
|
grammar_file: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
export let textgenerationwebui_presets = [];
|
export let textgenerationwebui_presets = [];
|
||||||
@ -85,6 +86,7 @@ const setting_names = [
|
|||||||
"mirostat_eta",
|
"mirostat_eta",
|
||||||
"guidance_scale",
|
"guidance_scale",
|
||||||
"negative_prompt",
|
"negative_prompt",
|
||||||
|
"grammar_file",
|
||||||
];
|
];
|
||||||
|
|
||||||
function selectPreset(name) {
|
function selectPreset(name) {
|
||||||
@ -266,5 +268,6 @@ export function getTextGenGenerationData(finalPrompt, this_amount_gen, isImperso
|
|||||||
'mirostat_mode': textgenerationwebui_settings.mirostat_mode,
|
'mirostat_mode': textgenerationwebui_settings.mirostat_mode,
|
||||||
'mirostat_tau': textgenerationwebui_settings.mirostat_tau,
|
'mirostat_tau': textgenerationwebui_settings.mirostat_tau,
|
||||||
'mirostat_eta': textgenerationwebui_settings.mirostat_eta,
|
'mirostat_eta': textgenerationwebui_settings.mirostat_eta,
|
||||||
|
'grammar_file': textgenerationwebui_settings.grammar_file,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user