Safe sequence breakers parse
This commit is contained in:
parent
ef3cb73477
commit
542f77aeb8
|
@ -1307,12 +1307,13 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
|||
: [];
|
||||
const tokenBans = toIntArray(banned_tokens);
|
||||
logitBiasArray.push(...tokenBans.map(x => [Number(x), false]));
|
||||
const sequenceBreakers = (() => { try { return JSON.parse(params.dry_sequence_breakers); } catch { return undefined; } })();
|
||||
const llamaCppParams = {
|
||||
'logit_bias': logitBiasArray,
|
||||
// Conflicts with ooba's grammar_string
|
||||
'grammar': settings.grammar_string,
|
||||
'cache_prompt': true,
|
||||
'dry_sequence_breakers': JSON.parse(params.dry_sequence_breakers),
|
||||
'dry_sequence_breakers': sequenceBreakers,
|
||||
};
|
||||
params = Object.assign(params, llamaCppParams);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue