| 743 | } | 743 | } |
| 744 | } | 744 | } |
| 745 | console.log(`We have chat template ${chat_template.split('\n')[0]}...`); | 745 | console.log(`We have chat template ${chat_template.split('\n')[0]}...`); |
| 746 | const { context, instruct } = await deriveTemplatesFromChatTemplate(chat_template, chat_template_hash); | 746 | const savedTemplate = power_user.model_templates_mappings[chat_template_hash]; |
| | 747 | const derivedTemplate = await deriveTemplatesFromChatTemplate(chat_template, chat_template_hash); |
| | 748 | const { context, instruct } = savedTemplate ?? derivedTemplate; |
| | 749 | |
| 747 | if (wantsContextDerivation && context) { | 750 | if (wantsContextDerivation && context) { |
| 748 | selectContextPreset(context, { isAuto: true }); | 751 | selectContextPreset(context, { isAuto: true }); |
| 749 | } | 752 | } |