Remove custom header

This commit is contained in:
Cohee 2024-11-23 17:50:32 +02:00
parent 3c2e802547
commit 803b7fca89
2 changed files with 1 additions and 4 deletions

View File

@ -1238,7 +1238,7 @@ async function getStatusTextgen() {
const wantsInstructDerivation = (power_user.instruct.enabled && power_user.instruct.derived);
const wantsContextDerivation = power_user.context_derived;
const supportsChatTemplate = response.headers.get('x-supports-chat-template') === 'true';
const supportsChatTemplate = [textgen_types.KOBOLDCPP, textgen_types.LLAMACPP].includes(textgen_settings.type);
if (supportsChatTemplate && (wantsInstructDerivation || wantsContextDerivation)) {
const response = await fetch('/api/backends/text-completions/props', {
method: 'POST',

View File

@ -219,9 +219,6 @@ router.post('/status', jsonParser, async function (request, response) {
} catch (error) {
console.error(`Failed to get TabbyAPI model info: ${error}`);
}
} else if (apiType == TEXTGEN_TYPES.KOBOLDCPP || apiType == TEXTGEN_TYPES.LLAMACPP) {
// the /props endpoint includes chat template
response.setHeader('x-supports-chat-template', 'true');
}
return response.send({ result, data: data.data });