mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +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,
|
||||
|
@@ -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: '提示词',
|
||||
|
Reference in New Issue
Block a user