user feedback and admin mark (#228)

* fix: csv empty data

* feat: user feedback and mark answer

* version intro

* perf: chat logs sort
This commit is contained in:
Archer
2023-08-27 23:12:06 +08:00
committed by GitHub
parent 2556c19a9a
commit 5fcdf28c5c
32 changed files with 886 additions and 67 deletions

View File

@@ -25,7 +25,10 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
await connectToDatabase();
// auth user and get kb
const [{ userId }, kb] = await Promise.all([authUser({ req }), KB.findById(kbId, 'model')]);
const [{ userId }, kb] = await Promise.all([
authUser({ req }),
KB.findById(kbId, 'vectorModel')
]);
if (!kb) {
throw new Error("Can't find database");