fix: admin

This commit is contained in:
archer
2023-07-29 11:01:18 +08:00
parent 53a082278b
commit b472127d3b
2 changed files with 0 additions and 9 deletions

View File

@@ -27,19 +27,11 @@ export const useAppRoute = (app) => {
for (const modelRaw of modelsRaw) {
const app = modelRaw.toObject();
// 获取与模型关联的知识库名称
const kbNames = [];
for (const kbId of app.chat.relatedKbs) {
const kb = await Kb.findById(kbId);
kbNames.push(kb.name);
}
const orderedModel = {
id: app._id.toString(),
userId: app.userId,
name: app.name,
intro: app.intro,
relatedKbs: kbNames, // 将relatedKbs的id转换为相应的Kb名称
systemPrompt: app.chat?.systemPrompt || '',
temperature: app.chat?.temperature || 0,
'share.topNum': app.share?.topNum || 0,