KoboldCpp grammar fix
This commit is contained in:
parent
7c99d87238
commit
a3ec0938c5
|
@ -38,7 +38,7 @@ export const textgen_types = {
|
||||||
OPENROUTER: 'openrouter',
|
OPENROUTER: 'openrouter',
|
||||||
};
|
};
|
||||||
|
|
||||||
const { MANCER, APHRODITE, TABBY, TOGETHERAI, OOBA, OLLAMA, LLAMACPP, INFERMATICAI, DREAMGEN, OPENROUTER } = textgen_types;
|
const { MANCER, APHRODITE, TABBY, TOGETHERAI, OOBA, OLLAMA, LLAMACPP, INFERMATICAI, DREAMGEN, OPENROUTER, KOBOLDCPP } = textgen_types;
|
||||||
|
|
||||||
const LLAMACPP_DEFAULT_ORDER = [
|
const LLAMACPP_DEFAULT_ORDER = [
|
||||||
'top_k',
|
'top_k',
|
||||||
|
@ -1047,6 +1047,10 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
||||||
//'prompt_logprobs': settings.prompt_log_probs_aphrodite,
|
//'prompt_logprobs': settings.prompt_log_probs_aphrodite,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (settings.type === KOBOLDCPP) {
|
||||||
|
params.grammar = settings.grammar_string;
|
||||||
|
}
|
||||||
|
|
||||||
if (settings.type === MANCER) {
|
if (settings.type === MANCER) {
|
||||||
params.n = canMultiSwipe ? settings.n : 1;
|
params.n = canMultiSwipe ? settings.n : 1;
|
||||||
params.epsilon_cutoff /= 1000;
|
params.epsilon_cutoff /= 1000;
|
||||||
|
|
Loading…
Reference in New Issue