Change Non-streaming Handler
This commit is contained in:
parent
f569424f3e
commit
f82740a238
|
@ -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 }));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue