| @@ -257,6 +257,7 @@ router.post('/chat_template', jsonParser, async function (request, response) { | ||
| 257 | 257 | if (apiType === TEXTGEN_TYPES.LLAMACPP && props['chat_template'].endsWith('\u0000')) { |
| 258 | 258 | props['chat_template'] = props['chat_template'].slice(0, -1); |
| 259 | 259 | } |
| 260 | + props['chat_template'] = props['chat_template'].trim(); | |
| 260 | 261 | props['chat_template_hash'] = createHash('sha256').update(props['chat_template']).digest('hex'); |
| 261 | 262 | console.log(`We have chat template stuff: ${JSON.stringify(props)}`); |
| 262 | 263 | return response.send(props); |