Remove custom header

803b7fca8941cb0bbce8c821f120f3ea3d080fa0

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

2 files changed, +1 -4Showing whitespace changes
public/script.js+1 -1
@@ -1238,7 +1238,7 @@ async function getStatusTextgen() {
12381238
1239 const wantsInstructDerivation = (power_user.instruct.enabled && power_user.instruct.derived);1239 const wantsInstructDerivation = (power_user.instruct.enabled && power_user.instruct.derived);
1240 const wantsContextDerivation = power_user.context_derived;1240 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);
1242 if (supportsChatTemplate && (wantsInstructDerivation || wantsContextDerivation)) {1242 if (supportsChatTemplate && (wantsInstructDerivation || wantsContextDerivation)) {
1243 const response = await fetch('/api/backends/text-completions/props', {1243 const response = await fetch('/api/backends/text-completions/props', {
1244 method: 'POST',1244 method: 'POST',
src/endpoints/backends/text-completions.js+0 -3
@@ -219,9 +219,6 @@ router.post('/status', jsonParser, async function (request, response) {
219 } catch (error) {219 } catch (error) {
220 console.error(`Failed to get TabbyAPI model info: ${error}`);220 console.error(`Failed to get TabbyAPI model info: ${error}`);
221 }221 }
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');
225 }222 }
226223
227 return response.send({ result, data: data.data });224 return response.send({ result, data: data.data });