bug-fix: adhere to chat template hash bound settings when a new model appears using the same hash as a bound one (#4393)
* bug-fix: adhere to chat template hash bound settings when a new model appears using the same hash as a bound one * chore: Improve readability --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
This commit is contained in:
@@ -743,7 +743,10 @@ async function getStatusTextgen() {
|
||||
}
|
||||
}
|
||||
console.log(`We have chat template ${chat_template.split('\n')[0]}...`);
|
||||
const { context, instruct } = await deriveTemplatesFromChatTemplate(chat_template, chat_template_hash);
|
||||
const savedTemplate = power_user.model_templates_mappings[chat_template_hash];
|
||||
const derivedTemplate = await deriveTemplatesFromChatTemplate(chat_template, chat_template_hash);
|
||||
const { context, instruct } = savedTemplate ?? derivedTemplate;
|
||||
|
||||
if (wantsContextDerivation && context) {
|
||||
selectContextPreset(context, { isAuto: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user