Commit 65cab349 by archer

fix: unstream response type

parent ca814dca
......@@ -169,7 +169,7 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
model: model.chat.chatModel,
usage: { prompt_tokens: 0, completion_tokens: 0, total_tokens: 0 },
choices: [
{ message: [{ role: 'assistant', content: response }], finish_reason: 'stop', index: 0 }
{ message: { role: 'assistant', content: response }, finish_reason: 'stop', index: 0 }
]
});
}
......@@ -298,7 +298,7 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
model: model.chat.chatModel,
usage: { prompt_tokens: 0, completion_tokens: 0, total_tokens: tokens },
choices: [
{ message: [{ role: 'assistant', content: answer }], finish_reason: 'stop', index: 0 }
{ message: { role: 'assistant', content: answer }, finish_reason: 'stop', index: 0 }
]
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment