From f82740a2385dc7c6525eaf90db84397c4f609583 Mon Sep 17 00:00:00 2001 From: NWilson Date: Thu, 22 Feb 2024 15:51:11 -0600 Subject: [PATCH] Change Non-streaming Handler --- src/endpoints/backends/text-completions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/endpoints/backends/text-completions.js b/src/endpoints/backends/text-completions.js index 443e743aa..6c17883e5 100644 --- a/src/endpoints/backends/text-completions.js +++ b/src/endpoints/backends/text-completions.js @@ -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 })); }