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,

View File

@@ -37,7 +37,6 @@ export const AppFields = [
createTextField('share.topNum', { label: '置顶等级', list: { sort: true } }),
createTextField('share.isShare', { label: '是否分享(true,false)' }),
createTextField('intro', { label: '介绍', list: { width: 400 } }),
createTextField('relatedKbs', { label: '引用的知识库', list: { hidden: true } }),
createTextField('temperature', { label: '温度' }),
createTextField('systemPrompt', {
label: '提示词',