From 1704cf31dee6a02929bdcc5cf476969c7b3106af Mon Sep 17 00:00:00 2001 From: archer <545436317@qq.com> Date: Sat, 29 Jul 2023 10:41:39 +0800 Subject: [PATCH] fix: table and message --- client/src/pages/api/openapi/v1/chat/completions.ts | 2 +- client/src/service/models/app.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/pages/api/openapi/v1/chat/completions.ts b/client/src/pages/api/openapi/v1/chat/completions.ts index f82b5300c..3c89a8a91 100644 --- a/client/src/pages/api/openapi/v1/chat/completions.ts +++ b/client/src/pages/api/openapi/v1/chat/completions.ts @@ -195,7 +195,7 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 1 }, choices: [ { - message: [{ role: 'assistant', content: answerText }], + message: { role: 'assistant', content: answerText }, finish_reason: 'stop', index: 0 } diff --git a/client/src/service/models/app.ts b/client/src/service/models/app.ts index fdfb8a491..b32e352f3 100644 --- a/client/src/service/models/app.ts +++ b/client/src/service/models/app.ts @@ -102,4 +102,4 @@ try { console.log(error); } -export const App: Model = models['model'] || model('model', AppSchema); +export const App: Model = models['app'] || model('app', AppSchema);