Files
qhmes/web-dist/js/AiKnowledgeBase.data-BH8AJIsn.js
2026-06-16 18:19:57 +08:00

2 lines
5.6 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const t=[{label:"id",field:"id",component:"Input",show:!1},{label:"知识库名称",field:"name",required:!0,componentProps:{placeholder:"请输入知识库名称",showCount:!0,maxlength:64},component:"Input"},{label:"知识库描述",field:"descr",component:"InputTextArea",componentProps:{placeholder:"描述知识库的内容详尽的描述将帮助AI能深入理解该知识库的内容能更准确的检索到内容提高该知识库的命中率。",showCount:!0,maxlength:256}},{label:"向量模型",field:"embedId",required:!0,component:"JDictSelectTag",componentProps:{dictCode:"airag_model where model_type = 'EMBED' and activate_flag = 1,name,id"}},{label:"状态",field:"status",required:!0,component:"JDictSelectTag",componentProps:{options:[{label:"启用",value:"enable"},{label:"禁用",value:"disable"}],type:"radioButton"},defaultValue:"enable"},{label:"类型",field:"type",required:!0,component:"JDictSelectTag",componentProps:{options:[{label:"知识库",value:"knowledge"},{label:"记忆库",value:"memory"}],type:"radioButton"},defaultValue:"knowledge"},{label:"分段策略",field:"enableSegment",component:"Switch",defaultValue:!1,ifShow:({values:e})=>e.type!=="memory",componentProps:{checkedChildren:"开启",unCheckedChildren:"关闭"},helpMessage:"开启后,知识库里面的文档默认使用该分段策略;文档也可单独配置自己的分段策略"},{label:"分段模式",field:"segmentStrategy",component:"RadioGroup",defaultValue:"auto",ifShow:({values:e})=>e.type!=="memory"&&e.enableSegment===!0,componentProps:{options:[{label:"自动分段与清洗",value:"auto"},{label:"自定义",value:"custom"}]}},{label:"分段标识符",field:"separator",component:"Select",defaultValue:"\\n",required:!0,ifShow:({values:e})=>e.type!=="memory"&&e.enableSegment===!0&&e.segmentStrategy==="custom",componentProps:{getPopupContainer:()=>document.body,options:[{label:"换行",value:"\\n"},{label:"2个换行",value:"\\n\\n"},{label:"中文句号",value:""},{label:"中文叹号",value:""},{label:"中文问号",value:""},{label:"英文句号",value:"."},{label:"英文叹号",value:"!"},{label:"英文问号",value:"?"},{label:"自定义",value:"custom"}]}},{label:"自定义分隔符",field:"customSeparator",component:"Input",required:!0,ifShow:({values:e})=>e.type!=="memory"&&e.enableSegment===!0&&e.separator==="custom"&&e.segmentStrategy!=="auto"},{label:"分段最大长度",field:"maxSegment",component:"InputNumber",defaultValue:800,required:!0,ifShow:({values:e})=>e.type!=="memory"&&e.enableSegment===!0,componentProps:{min:100,max:5e3}},{label:"分段重叠度%",field:"overlap",component:"InputNumber",defaultValue:10,required:!0,ifShow:({values:e})=>e.type!=="memory"&&e.enableSegment===!0,componentProps:{min:0,max:90}},{label:"文本预处理规则",field:"textRules",component:"CheckboxGroup",defaultValue:[],ifShow:({values:e})=>e.type!=="memory"&&e.enableSegment===!0&&e.segmentStrategy==="custom",componentProps:{options:[{label:"替换掉连续的空格、换行符和制表符",value:"cleanSpaces"},{label:"删除所有 URL 和电子邮箱地址",value:"removeUrlsEmails"}]}}],l=[{label:"id",field:"id",component:"Input",show:!1},{label:"知识库id",field:"knowledgeId",show:!1,component:"Input"},{label:"标题",field:"title",required:!0,component:"Input"},{label:"类型",field:"type",required:!0,component:"Input",show:!1},{label:"内容",field:"content",rules:[{required:!0,message:"请输入内容"}],component:"JMarkdownEditor",componentProps:{placeholder:"请输入内容",preview:{mode:"view",action:[]}},ifShow:({values:e})=>e.type==="text"},{label:"文件",field:"filePath",rules:[{required:!0,message:"请上传文件"}],component:"JUpload",helpMessage:"支持txt、markdown、pdf、docx、xlsx、pptx",componentProps:{fileType:"file",maxCount:1,multiple:!1,text:"上传文档"},ifShow:({values:e})=>e.type==="file"},{label:"网页地址",field:"website",rules:[{required:!0,message:"请输入网页URL"},{pattern:/^https?:\/\//,message:"请输入正确的网页地址以http://或https://开头"}],component:"Input",componentProps:{placeholder:"请输入网页URL例如https://help.jeecg.com/"},ifShow:({values:e})=>e.type==="web"}],o=[{label:"分段策略",field:"segmentStrategy",component:"RadioGroup",defaultValue:"auto",componentProps:{options:[{label:"自动分段与清洗",value:"auto"},{label:"自定义",value:"custom"}]}},{label:"分段标识符",field:"separator",component:"Select",defaultValue:"\\n",required:!0,ifShow:({values:e})=>e.segmentStrategy==="custom",componentProps:{getPopupContainer:()=>document.body,options:[{label:"换行",value:"\\n"},{label:"2个换行",value:"\\n\\n"},{label:"中文句号",value:"。"},{label:"中文叹号",value:""},{label:"中文问号",value:""},{label:"英文句号",value:"."},{label:"英文叹号",value:"!"},{label:"英文问号",value:"?"},{label:"自定义",value:"custom"}]}},{label:"",field:"customSeparator",component:"Input",required:!0,ifShow:({values:e})=>e.separator==="custom"&&e.segmentStrategy!=="auto"},{label:"分段最大长度",field:"maxSegment",component:"InputNumber",defaultValue:800,required:!0,componentProps:{min:100,max:5e3}},{label:"分段重叠度%",field:"overlap",component:"InputNumber",defaultValue:10,componentProps:{min:0,max:90},required:!0},{label:"文本预处理规则",field:"textRules",component:"CheckboxGroup",defaultValue:[],ifShow:({values:e})=>e.segmentStrategy==="custom",componentProps:{options:[{label:"替换掉连续的空格、换行符和制表符",value:"cleanSpaces"},{label:"删除所有 URL 和电子邮箱地址",value:"removeUrlsEmails"}]}}];export{o as a,l as d,t as f};