template derivation: move hash part to backend

This commit is contained in:
Karl-Johan Alm
2024-11-19 20:09:29 +09:00
parent 0e2fdf37a8
commit f25ea9f6d6
5 changed files with 13 additions and 15 deletions

View File

@@ -1250,9 +1250,9 @@ async function getStatusTextgen() {
const data = await response.json();
if (data) {
const chat_template = data.chat_template;
const { chat_template, chat_template_hash } = data;
console.log(`We have chat template ${chat_template.split('\n')[0]}...`);
const templates = await deriveTemplatesFromChatTemplate(chat_template);
const templates = await deriveTemplatesFromChatTemplate(chat_template, chat_template_hash);
if (templates) {
const { context, instruct } = templates;
selectContextPreset(context, { isAuto: true });