Merge pull request #3111 from kallewoof/202411-avoid-missing-ct Template derivation: explicitly skip empty templates
Signed| @@ -65,6 +65,11 @@ const parse_derivation = derivation => (typeof derivation === 'string') ? { | ||
| 65 | 65 | } : derivation; |
| 66 | 66 | |
| 67 | 67 | export async function deriveTemplatesFromChatTemplate(chat_template, hash) { |
| 68 | + if (chat_template.trim() === '') { | |
| 69 | + console.log('Missing chat template.'); | |
| 70 | + return null; | |
| 71 | + } | |
| 72 | + | |
| 68 | 73 | if (hash in hash_derivations) { |
| 69 | 74 | return parse_derivation(hash_derivations[hash]); |
| 70 | 75 | } |