mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
template derivation: explicitly skip derivation attempt if chat_template is empty
This commit is contained in:
@@ -65,6 +65,11 @@ const parse_derivation = derivation => (typeof derivation === 'string') ? {
|
|||||||
} : derivation;
|
} : derivation;
|
||||||
|
|
||||||
export async function deriveTemplatesFromChatTemplate(chat_template, hash) {
|
export async function deriveTemplatesFromChatTemplate(chat_template, hash) {
|
||||||
|
if (chat_template.trim() === '') {
|
||||||
|
console.log('Missing chat template.');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (hash in hash_derivations) {
|
if (hash in hash_derivations) {
|
||||||
return parse_derivation(hash_derivations[hash]);
|
return parse_derivation(hash_derivations[hash]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user