Include additional headers for all supported Text Completion types.

This commit is contained in:
Cohee
2024-03-14 00:48:08 +02:00
parent acf36b6107
commit bd223486de
3 changed files with 19 additions and 2 deletions

View File

@ -607,7 +607,7 @@ router.post('/remote/textgenerationwebui/encode', jsonParser, async function (re
headers: { 'Content-Type': 'application/json' },
};
setAdditionalHeaders(request, args, null);
setAdditionalHeaders(request, args, baseUrl);
// Convert to string + remove trailing slash + /v1 suffix
let url = String(baseUrl).replace(/\/$/, '').replace(/\/v1$/, '');