Change Non-streaming Handler

This commit is contained in:
NWilson 2024-02-22 15:51:11 -06:00
parent f569424f3e
commit f82740a238
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ router.post('/generate', jsonParser, async function (request, response) {
}
// Map InfermaticAI response to OAI completions format
if (request.body.api_type === TEXTGEN_TYPES.INFERMATICAI) {
if (completionsReply.url.includes('https://api.totalgpt.ai')) {
data['choices'] = (data?.choices || []).map(choice => ({ text: choice.message.content }));
}