Remove custom header

803b7fca8941cb0bbce8c821f120f3ea3d080fa0

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +1 -4Ignore whitespace
public/script.js+1 -1
@@ -1238,7 +1238,7 @@ async function getStatusTextgen() {
12381238
12391239 const wantsInstructDerivation = (power_user.instruct.enabled && power_user.instruct.derived);
12401240 const wantsContextDerivation = power_user.context_derived;
1241- const supportsChatTemplate = response.headers.get('x-supports-chat-template') === 'true';
1241+ const supportsChatTemplate = [textgen_types.KOBOLDCPP, textgen_types.LLAMACPP].includes(textgen_settings.type);
12421242 if (supportsChatTemplate && (wantsInstructDerivation || wantsContextDerivation)) {
12431243 const response = await fetch('/api/backends/text-completions/props', {
12441244 method: 'POST',
src/endpoints/backends/text-completions.js+0 -3
@@ -219,9 +219,6 @@ router.post('/status', jsonParser, async function (request, response) {
219219 } catch (error) {
220220 console.error(`Failed to get TabbyAPI model info: ${error}`);
221221 }
222- } else if (apiType == TEXTGEN_TYPES.KOBOLDCPP || apiType == TEXTGEN_TYPES.LLAMACPP) {
223- // the /props endpoint includes chat template
224- response.setHeader('x-supports-chat-template', 'true');
225222 }
226223
227224 return response.send({ result, data: data.data });