mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 09:03:53 +00:00
fix: admin
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user