Remove custom header
This commit is contained in:
parent
3c2e802547
commit
803b7fca89
|
@ -1238,7 +1238,7 @@ async function getStatusTextgen() {
|
||||||
|
|
||||||
const wantsInstructDerivation = (power_user.instruct.enabled && power_user.instruct.derived);
|
const wantsInstructDerivation = (power_user.instruct.enabled && power_user.instruct.derived);
|
||||||
const wantsContextDerivation = power_user.context_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)) {
|
if (supportsChatTemplate && (wantsInstructDerivation || wantsContextDerivation)) {
|
||||||
const response = await fetch('/api/backends/text-completions/props', {
|
const response = await fetch('/api/backends/text-completions/props', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
@ -219,9 +219,6 @@ router.post('/status', jsonParser, async function (request, response) {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Failed to get TabbyAPI model info: ${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 });
|
return response.send({ result, data: data.data });
|
||||||
|
|
Loading…
Reference in New Issue