From a1d87cdd6d7cab9ad12f0e02e3c561493e0db4ae Mon Sep 17 00:00:00 2001 From: aries_ckt <916701291@qq.com> Date: Fri, 20 Oct 2023 15:33:40 +0800 Subject: [PATCH] fix:web knowledge sync bug --- pilot/server/static/404.html | 2 +- pilot/server/static/404/index.html | 2 +- .../chunks/{604.e31c3e76149a6ff7.js => 604.0b6534ada5e802bc.js} | 2 +- pilot/server/static/_next/static/chunks/747-6c8367d757926558.js | 1 - pilot/server/static/_next/static/chunks/747-ec60adab93bb6758.js | 1 + .../{_app-0e8330de38c03c5c.js => _app-e86697c1b3c2f440.js} | 0 ...{webpack-2e50ecf954b8023b.js => webpack-d3a85272b0e75370.js} | 2 +- .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 pilot/server/static/agent/index.html | 2 +- pilot/server/static/chat/[scene]/[id]/index.html | 2 +- pilot/server/static/chat/index.html | 2 +- pilot/server/static/database/index.html | 2 +- pilot/server/static/index.html | 2 +- pilot/server/static/knowledge/[knowledgeName]/[id]/index.html | 2 +- pilot/server/static/knowledge/index.html | 2 +- pilot/server/static/models/index.html | 2 +- pilot/server/static/prompt/index.html | 2 +- 18 files changed, 15 insertions(+), 15 deletions(-) rename pilot/server/static/_next/static/chunks/{604.e31c3e76149a6ff7.js => 604.0b6534ada5e802bc.js} (82%) delete mode 100644 pilot/server/static/_next/static/chunks/747-6c8367d757926558.js create mode 100644 pilot/server/static/_next/static/chunks/747-ec60adab93bb6758.js rename pilot/server/static/_next/static/chunks/pages/{_app-0e8330de38c03c5c.js => _app-e86697c1b3c2f440.js} (100%) rename pilot/server/static/_next/static/chunks/{webpack-2e50ecf954b8023b.js => webpack-d3a85272b0e75370.js} (74%) rename pilot/server/static/_next/static/{s-WL9w3N8oSbGEOi5ysVt => ip766cXopjZ_vl18rrSLK}/_buildManifest.js (96%) rename pilot/server/static/_next/static/{s-WL9w3N8oSbGEOi5ysVt => ip766cXopjZ_vl18rrSLK}/_ssgManifest.js (100%) diff --git a/pilot/server/static/404.html b/pilot/server/static/404.html index df2d3a147..1a5fba1f0 100644 --- a/pilot/server/static/404.html +++ b/pilot/server/static/404.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/pilot/server/static/404/index.html b/pilot/server/static/404/index.html index df2d3a147..1a5fba1f0 100644 --- a/pilot/server/static/404/index.html +++ b/pilot/server/static/404/index.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/604.e31c3e76149a6ff7.js b/pilot/server/static/_next/static/chunks/604.0b6534ada5e802bc.js similarity index 82% rename from pilot/server/static/_next/static/chunks/604.e31c3e76149a6ff7.js rename to pilot/server/static/_next/static/chunks/604.0b6534ada5e802bc.js index 551dde58b..42a2d2f68 100644 --- a/pilot/server/static/_next/static/chunks/604.e31c3e76149a6ff7.js +++ b/pilot/server/static/_next/static/chunks/604.0b6534ada5e802bc.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[604],{24093:function(e,l,t){t.r(l),t.d(l,{default:function(){return ev}});var r=t(85893),a=t(67294),s=t(2093),n=t(1375),o=t(2453),i=t(58989),c=t(83454),d=e=>{let{queryAgentURL:l="/api/v1/chat/completions"}=e,t=(0,a.useMemo)(()=>new AbortController,[]),r=(0,a.useCallback)(async e=>{let{context:r,data:a,chatId:s,onMessage:d,onClose:u,onDone:x,onError:m}=e;if(!r){o.ZP.warning(i.Z.t("NoContextTip"));return}let h={...a,conv_uid:s,user_input:r};if(!h.conv_uid){o.ZP.error("conv_uid 不存在,请刷新后重试");return}try{var p;await (0,n.L)("".concat(null!==(p=c.env.API_BASE_URL)&&void 0!==p?p:"").concat(l),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:t.signal,openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===n.a)return},onclose(){t.abort(),null==u||u()},onerror(e){throw Error(e)},onmessage:e=>{var l;let t=null===(l=e.data)||void 0===l?void 0:l.replaceAll("\\n","\n");"[DONE]"===t?null==x||x():(null==t?void 0:t.startsWith("[ERROR]"))?null==m||m(null==t?void 0:t.replace("[ERROR]","")):null==d||d(t)}})}catch(e){t.abort(),null==m||m("Sorry, We meet some error, please try agin later.",e)}},[l]);return(0,a.useEffect)(()=>()=>{t.abort()},[]),r},u=t(39332),x=t(99513),m=t(24019),h=t(50888),p=t(97937),g=t(63606),v=t(50228),f=t(87547),b=t(89035),j=t(33035),y=t(12767),w=t(94184),Z=t.n(w),_=t(66309),N=t(81799),k=t(41468),C=t(57132),S=t(29158),P=t(98165),R=t(79166),E=t(93179),O=t(71577),D=t(38426),M=t(20640),I=t.n(M);let L={code(e){var l;let{inline:t,node:a,className:s,children:n,style:i,...c}=e,d=/language-(\w+)/.exec(s||"");return!t&&d?(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(O.ZP,{className:"absolute right-3 top-2 text-gray-300 hover:!text-gray-200 bg-gray-700",type:"text",icon:(0,r.jsx)(C.Z,{}),onClick:()=>{let e=I()(n);o.ZP[e?"success":"error"](e?"Copy success":"Copy failed")}}),(0,r.jsx)(E.Z,{language:null!==(l=null==d?void 0:d[1])&&void 0!==l?l:"javascript",style:R.Z,children:n})]}):(0,r.jsx)("code",{...c,style:i,className:"px-[6px] py-[2px] rounded bg-gray-700 text-gray-100 dark:bg-gray-100 dark:text-gray-800 text-sm",children:n})},ul(e){let{children:l}=e;return(0,r.jsx)("ul",{className:"py-1",children:l})},ol(e){let{children:l}=e;return(0,r.jsx)("ol",{className:"py-1",children:l})},li(e){let{children:l,ordered:t}=e;return(0,r.jsx)("li",{className:"text-sm leading-7 ml-5 pl-2 text-gray-600 dark:text-gray-300 ".concat(t?"list-decimal":"list-disc"),children:l})},table(e){let{children:l}=e;return(0,r.jsx)("table",{className:"my-2 rounded-tl-md rounded-tr-md max-w-full bg-white dark:bg-gray-900 text-sm rounded-lg overflow-hidden",children:l})},thead(e){let{children:l}=e;return(0,r.jsx)("thead",{className:"bg-[#fafafa] dark:bg-black font-semibold",children:l})},th(e){let{children:l}=e;return(0,r.jsx)("th",{className:"!text-left p-4",children:l})},td(e){let{children:l}=e;return(0,r.jsx)("td",{className:"p-4 border-t border-[#f0f0f0] dark:border-gray-700",children:l})},h1(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-2xl font-bold my-4 border-b border-slate-300 pb-4",children:l})},h2(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-xl font-bold my-3",children:l})},h3(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-lg font-semibold my-2",children:l})},h4(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-base font-semibold my-1",children:l})},a(e){let{children:l,href:t}=e;return(0,r.jsxs)("div",{className:"inline-block text-blue-600 dark:text-blue-400",children:[(0,r.jsx)(S.Z,{className:"mr-1"}),(0,r.jsx)("a",{href:t,target:"_blank",children:l})]})},img(e){let{src:l,alt:t}=e;return(0,r.jsx)("div",{children:(0,r.jsx)(D.Z,{className:"min-h-[1rem] max-w-full max-h-full border rounded",src:l,alt:t,placeholder:(0,r.jsx)(_.Z,{icon:(0,r.jsx)(P.Z,{spin:!0}),color:"processing",children:"Image Loading..."}),fallback:"/images/fallback.png"})})},blockquote(e){let{children:l}=e;return(0,r.jsx)("blockquote",{className:"py-4 px-6 border-l-4 border-blue-600 rounded bg-white my-2 text-gray-500 dark:bg-slate-800 dark:text-gray-200 dark:border-white shadow-sm",children:l})}},A={todo:{bgClass:"bg-gray-500",icon:(0,r.jsx)(m.Z,{className:"ml-2"})},runing:{bgClass:"bg-blue-500",icon:(0,r.jsx)(h.Z,{className:"ml-2"})},failed:{bgClass:"bg-red-500",icon:(0,r.jsx)(p.Z,{className:"ml-2"})},completed:{bgClass:"bg-green-500",icon:(0,r.jsx)(g.Z,{className:"ml-2"})}};function T(e){return e.replaceAll("\\n","\n").replace(/]+)>/gi,"").replace(/]+)>/gi,"")}var F=(0,a.memo)(function(e){let{children:l,content:t,isChartChat:s,onLinkClick:n}=e,{scene:o}=(0,a.useContext)(k.p),{context:i,model_name:c,role:d}=t,u="view"===d,{relations:x,value:m,cachePlguinContext:h}=(0,a.useMemo)(()=>{if("string"!=typeof i)return{relations:[],value:"",cachePlguinContext:[]};let[e,l]=i.split(" relations:"),t=l?l.split(","):[],r=[],a=0,s=e.replace(/]*>[^<]*<\/dbgpt-view>/gi,e=>{try{var l;console.log(e);let t=e.replaceAll("\n","\\n").replace(/<[^>]*>|<\/[^>]*>/gm,""),s=JSON.parse(t),n="".concat(a,"");return r.push({...s,result:T(null!==(l=s.result)&&void 0!==l?l:"")}),a++,n}catch(l){return console.log(l.message,l),e}});return{relations:t,cachePlguinContext:r,value:s}},[i]),p=(0,a.useMemo)(()=>({"custom-view"(e){var l;let{children:t}=e,a=+t.toString();if(!h[a])return t;let{name:s,status:n,err_msg:o,result:i}=h[a],{bgClass:c,icon:d}=null!==(l=A[n])&&void 0!==l?l:{};return(0,r.jsxs)("div",{className:"bg-white dark:bg-[#212121] rounded-lg overflow-hidden my-2 flex flex-col lg:max-w-[80%]",children:[(0,r.jsxs)("div",{className:Z()("flex px-4 md:px-6 py-2 items-center text-white text-sm",c),children:[s,d]}),i?(0,r.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:(0,r.jsx)(j.D,{components:L,rehypePlugins:[y.Z],children:null!=i?i:""})}):(0,r.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:o})]})}}),[i,h]);return(0,r.jsxs)("div",{className:Z()("relative flex flex-wrap w-full px-2 sm:px-4 py-2 sm:py-6 rounded-xl break-words",{"bg-slate-100 dark:bg-[#353539]":u,"lg:w-full xl:w-full pl-0":["chat_with_db_execute","chat_dashboard"].includes(o)}),children:[(0,r.jsx)("div",{className:"mr-2 flex flex-shrink-0 items-center justify-center h-7 w-7 rounded-full text-lg sm:mr-4",children:u?(0,N.A)(c)||(0,r.jsx)(v.Z,{}):(0,r.jsx)(f.Z,{})}),(0,r.jsxs)("div",{className:"flex-1 overflow-hidden items-center text-md leading-8",children:[!u&&"string"==typeof i&&i,u&&s&&"object"==typeof i&&(0,r.jsxs)("div",{children:["[".concat(i.template_name,"]: "),(0,r.jsxs)("span",{className:"text-[#1677ff] cursor-pointer",onClick:n,children:[(0,r.jsx)(b.Z,{className:"mr-1"}),i.template_introduce||"More Details"]})]}),u&&"string"==typeof i&&(0,r.jsx)(j.D,{components:{...L,...p},rehypePlugins:[y.Z],children:T(m)}),!!(null==x?void 0:x.length)&&(0,r.jsx)("div",{className:"flex flex-wrap mt-2",children:null==x?void 0:x.map((e,l)=>(0,r.jsx)(_.Z,{color:"#108ee9",children:e},e+l))})]}),l]})}),H=t(59301),V=t(41132),$=t(74312),q=t(3414),z=t(72868),J=t(59562),W=t(14553),G=t(25359),B=t(7203),K=t(48665),Q=t(26047),U=t(99056),X=t(57814),Y=t(63955),ee=t(33028),el=t(40911),et=t(66478),er=t(83062),ea=t(50489),es=t(67421),en=e=>{var l;let{conv_index:t,question:s,knowledge_space:n}=e,{t:i}=(0,es.$G)(),{chatId:c}=(0,a.useContext)(k.p),[d,u]=(0,a.useState)(""),[x,m]=(0,a.useState)(4),[h,p]=(0,a.useState)(""),g=(0,a.useRef)(null),[v,f]=o.ZP.useMessage(),[b,j]=(0,a.useState)({});(0,a.useEffect)(()=>{(0,ea.Vx)((0,ea.Lu)()).then(e=>{var l;console.log(e),j(null!==(l=e[1])&&void 0!==l?l:{})}).catch(e=>{console.log(e)})},[]);let y=(0,a.useCallback)((e,l)=>{l?(0,ea.Vx)((0,ea.Eb)(c,t)).then(e=>{var l,t,r,a;let s=null!==(l=e[1])&&void 0!==l?l:{};u(null!==(t=s.ques_type)&&void 0!==t?t:""),m(parseInt(null!==(r=s.score)&&void 0!==r?r:"4")),p(null!==(a=s.messages)&&void 0!==a?a:"")}).catch(e=>{console.log(e)}):(u(""),m(4),p(""))},[c,t]),w=(0,$.Z)(q.Z)(e=>{let{theme:l}=e;return{backgroundColor:"dark"===l.palette.mode?"#FBFCFD":"#0E0E10",...l.typography["body-sm"],padding:l.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,width:"100%",height:"100%"}});return(0,r.jsxs)(z.L,{onOpenChange:y,children:[f,(0,r.jsx)(er.Z,{title:i("Rating"),children:(0,r.jsx)(J.Z,{slots:{root:W.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,r.jsx)(H.Z,{})})}),(0,r.jsxs)(G.Z,{children:[(0,r.jsx)(B.Z,{disabled:!0,sx:{minHeight:0}}),(0,r.jsx)(K.Z,{sx:{width:"100%",maxWidth:350,display:"grid",gap:3,padding:1},children:(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault();let l={conv_uid:c,conv_index:t,question:s,knowledge_space:n,score:x,ques_type:d,messages:h};console.log(l),(0,ea.Vx)((0,ea.VC)({data:l})).then(e=>{v.open({type:"success",content:"save success"})}).catch(e=>{v.open({type:"error",content:"save error"})})},children:(0,r.jsxs)(Q.Z,{container:!0,spacing:.5,columns:13,sx:{flexGrow:1},children:[(0,r.jsx)(Q.Z,{xs:3,children:(0,r.jsx)(w,{children:i("Q_A_Category")})}),(0,r.jsx)(Q.Z,{xs:10,children:(0,r.jsx)(U.Z,{action:g,value:d,placeholder:"Choose one…",onChange:(e,l)=>u(null!=l?l:""),...d&&{endDecorator:(0,r.jsx)(W.ZP,{size:"sm",variant:"plain",color:"neutral",onMouseDown:e=>{e.stopPropagation()},onClick:()=>{var e;u(""),null===(e=g.current)||void 0===e||e.focusVisible()},children:(0,r.jsx)(V.Z,{})}),indicator:null},sx:{width:"100%"},children:null===(l=Object.keys(b))||void 0===l?void 0:l.map(e=>(0,r.jsx)(X.Z,{value:e,children:b[e]},e))})}),(0,r.jsx)(Q.Z,{xs:3,children:(0,r.jsx)(w,{children:(0,r.jsx)(er.Z,{title:(0,r.jsx)(K.Z,{children:(0,r.jsx)("div",{children:i("feed_back_desc")})}),variant:"solid",placement:"left",children:i("Q_A_Rating")})})}),(0,r.jsx)(Q.Z,{xs:10,sx:{pl:0,ml:0},children:(0,r.jsx)(Y.Z,{"aria-label":"Custom",step:1,min:0,max:5,valueLabelFormat:function(e){return({0:i("Lowest"),1:i("Missed"),2:i("Lost"),3:i("Incorrect"),4:i("Verbose"),5:i("Best")})[e]},valueLabelDisplay:"on",marks:[{value:0,label:"0"},{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"}],sx:{width:"90%",pt:3,m:2,ml:1},onChange:e=>{var l;return m(null===(l=e.target)||void 0===l?void 0:l.value)},value:x})}),(0,r.jsx)(Q.Z,{xs:13,children:(0,r.jsx)(ee.Z,{placeholder:i("Please_input_the_text"),value:h,onChange:e=>p(e.target.value),minRows:2,maxRows:4,endDecorator:(0,r.jsx)(el.ZP,{level:"body-xs",sx:{ml:"auto"},children:i("input_count")+h.length+i("input_unit")}),sx:{width:"100%",fontSize:14}})}),(0,r.jsx)(Q.Z,{xs:13,children:(0,r.jsx)(et.Z,{type:"submit",variant:"outlined",sx:{width:"100%",height:"100%"},children:i("submit")})})]})})})]})]})},eo=t(32983),ei=t(12069),ec=t(96486),ed=t.n(ec),eu=t(38954),ex=t(98399),em=e=>{var l;let{messages:t,onSubmit:n}=e,{dbParam:i,currentDialogue:c,scene:d,model:m,refreshDialogList:h,chatId:p,agentList:g}=(0,a.useContext)(k.p),{t:v}=(0,es.$G)(),f=(0,u.useSearchParams)(),b=null!==(l=f&&f.get("spaceNameOriginal"))&&void 0!==l?l:"",[j,y]=(0,a.useState)(!1),[w,_]=(0,a.useState)(!1),[S,P]=(0,a.useState)(t),[R,E]=(0,a.useState)(""),O=(0,a.useRef)(null),D=(0,a.useMemo)(()=>"chat_dashboard"===d,[d]),M=(0,a.useMemo)(()=>{switch(d){case"chat_agent":return g.join(",");case"chat_excel":return null==c?void 0:c.select_param;default:return b||i}},[d,g,c,i,b]),L=async e=>{if(!j&&e.trim())try{y(!0),await n(e,{select_param:null!=M?M:""})}finally{y(!1)}},A=e=>{try{return JSON.parse(e)}catch(l){return e}},[T,H]=o.ZP.useMessage(),V=async e=>{let l=null==e?void 0:e.replace(/\trelations:.*/g,""),t=I()(l);t?l?T.open({type:"success",content:v("Copy_success")}):T.open({type:"warning",content:v("Copy_nothing")}):T.open({type:"error",content:v("Copry_error")})};return(0,s.Z)(async()=>{let e=(0,ex.a_)();e&&e.id===p&&(await L(e.message),h(),localStorage.removeItem(ex.rU))},[p]),(0,a.useEffect)(()=>{let e=t;D&&(e=ed().cloneDeep(t).map(e=>((null==e?void 0:e.role)==="view"&&"string"==typeof(null==e?void 0:e.context)&&(e.context=A(null==e?void 0:e.context)),e))),P(e.filter(e=>["view","human"].includes(e.role)))},[D,t]),(0,a.useEffect)(()=>{setTimeout(()=>{var e;null===(e=O.current)||void 0===e||e.scrollTo(0,O.current.scrollHeight)},50)},[t]),(0,r.jsxs)(r.Fragment,{children:[H,(0,r.jsx)("div",{ref:O,className:"flex flex-1 overflow-y-auto pb-8 w-full flex-col",children:(0,r.jsx)("div",{className:"flex items-center flex-1 flex-col text-sm leading-6 text-slate-900 dark:text-slate-300 sm:text-base sm:leading-7",children:S.length?S.map((e,l)=>{var t;return(0,r.jsx)(F,{content:e,isChartChat:D,onLinkClick:()=>{_(!0),E(JSON.stringify(null==e?void 0:e.context,null,2))},children:"view"===e.role&&(0,r.jsxs)("div",{className:"flex w-full flex-row-reverse pt-2 md:pt-4 border-t border-gray-200 mt-2 md:mt-4",children:[(0,r.jsx)(en,{conv_index:Math.ceil((l+1)/2),question:null===(t=null==S?void 0:S.filter(l=>(null==l?void 0:l.role)==="human"&&(null==l?void 0:l.order)===e.order)[0])||void 0===t?void 0:t.context,knowledge_space:b||i||""}),(0,r.jsx)(er.Z,{title:v("Copy"),children:(0,r.jsx)(et.Z,{onClick:()=>V(null==e?void 0:e.context),slots:{root:W.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,r.jsx)(C.Z,{})})})]})},l)}):(0,r.jsx)(eo.Z,{image:"/empty.png",imageStyle:{width:320,height:320,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:"flex items-center justify-center flex-col h-full w-full",description:"Start a conversation"})})}),(0,r.jsx)("div",{className:Z()("relative after:absolute after:-top-8 after:h-8 after:w-full after:bg-gradient-to-t after:from-white after:to-transparent dark:after:from-[#212121]",{"cursor-not-allowed":"chat_excel"===d&&!(null==c?void 0:c.select_param)}),children:(0,r.jsxs)("div",{className:"flex flex-wrap w-full py-2 sm:pt-6 sm:pb-10",children:[m&&(0,r.jsx)("div",{className:"mr-2 flex items-center h-10",children:(0,N.A)(m)}),(0,r.jsx)(eu.Z,{loading:j,onSubmit:L})]})}),(0,r.jsx)(ei.default,{title:"JSON Editor",open:w,width:"60%",cancelButtonProps:{hidden:!0},onOk:()=>{_(!1)},onCancel:()=>{_(!1)},children:(0,r.jsx)(x.Z,{className:"w-full h-[500px]",language:"json",value:R})})]})},eh=t(70803),ep=t(39156),eg=t(45247),ev=()=>{var e;let l=(0,u.useSearchParams)(),{scene:t,chatId:n,model:o,setModel:i}=(0,a.useContext)(k.p),c=d({}),x=null!==(e=l&&l.get("initMessage"))&&void 0!==e?e:"",[m,h]=(0,a.useState)(!1),[p,g]=(0,a.useState)(),[v,f]=(0,a.useState)([]),b=async()=>{h(!0);let[,e]=await (0,ea.Vx)((0,ea.$i)(n));f(null!=e?e:[]),h(!1)},j=e=>{var l;let t=null===(l=e[e.length-1])||void 0===l?void 0:l.context;if(t)try{let e=JSON.parse(t);g((null==e?void 0:e.template_name)==="report"?null==e?void 0:e.charts:void 0)}catch(e){g(void 0)}};(0,s.Z)(async()=>{let e=(0,ex.a_)();e&&e.id===n||await b()},[x,n]),(0,a.useEffect)(()=>{var e,l;if(!v.length)return;let t=null===(e=null===(l=v.filter(e=>"view"===e.role))||void 0===l?void 0:l.slice(-1))||void 0===e?void 0:e[0];(null==t?void 0:t.model_name)&&i(t.model_name),j(v)},[v.length]);let y=(0,a.useCallback)((e,l)=>new Promise(r=>{let a=[...v,{role:"human",context:e,model_name:o,order:0,time_stamp:0},{role:"view",context:"",model_name:o,order:0,time_stamp:0}],s=a.length-1;f([...a]),c({context:e,data:{...l,chat_mode:t||"chat_normal",model_name:o},chatId:n,onMessage:e=>{a[s].context=e,f([...a])},onDone:()=>{j(a),r()},onClose:()=>{j(a),r()},onError:e=>{a[s].context=e,f([...a]),r()}})}),[v,c]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eg.Z,{visible:m}),(0,r.jsx)(eh.Z,{refreshHistory:b,modelChange:e=>{i(e)}}),(0,r.jsxs)("div",{className:"px-4 flex flex-1 flex-wrap overflow-hidden relative",children:[!!(null==p?void 0:p.length)&&(0,r.jsx)("div",{className:"w-full xl:w-3/4 h-3/5 xl:pr-4 xl:h-full overflow-y-auto",children:(0,r.jsx)(ep.Z,{chartsData:p})}),!(null==p?void 0:p.length)&&"chat_dashboard"===t&&(0,r.jsx)(eo.Z,{image:"/empty.png",imageStyle:{width:320,height:320,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:"w-full xl:w-3/4 h-3/5 xl:h-full pt-0 md:pt-10"}),(0,r.jsx)("div",{className:Z()("flex flex-1 flex-col overflow-hidden",{"px-0 xl:pl-4 h-2/5 xl:h-full border-t xl:border-t-0 xl:border-l":"chat_dashboard"===t,"h-full lg:px-8":"chat_dashboard"!==t}),children:(0,r.jsx)(em,{messages:v,onSubmit:y})})]})]})}},38954:function(e,l,t){t.d(l,{Z:function(){return j}});var r=t(85893),a=t(27496),s=t(59566),n=t(71577),o=t(67294),i=t(2487),c=t(83062),d=t(2453),u=t(74627),x=t(39479),m=t(51009),h=t(58299),p=t(577),g=t(30119),v=t(67421);let f=e=>{let{data:l,loading:t,submit:a,close:s}=e,{t:n}=(0,v.$G)(),o=e=>()=>{a(e),s()};return(0,r.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,r.jsx)(i.Z,{dataSource:null==l?void 0:l.data,loading:t,rowKey:e=>e.prompt_name,renderItem:e=>(0,r.jsx)(i.Z.Item,{onClick:o(e.content),children:(0,r.jsx)(c.Z,{title:e.content,children:(0,r.jsx)(i.Z.Item.Meta,{style:{cursor:"copy"},title:e.prompt_name,description:n("Prompt_Info_Scene")+":".concat(e.chat_scene,",")+n("Prompt_Info_Sub_Scene")+":".concat(e.sub_chat_scene)})})},e.prompt_name)})})};var b=e=>{let{submit:l}=e,{t}=(0,v.$G)(),[a,s]=(0,o.useState)(!1),[n,i]=(0,o.useState)("common"),{data:b,loading:j}=(0,p.Z)(()=>(0,g.PR)("/prompt/list",{prompt_type:n}),{refreshDeps:[n],onError:e=>{d.ZP.error(null==e?void 0:e.message)}});return(0,r.jsx)(u.Z,{title:(0,r.jsx)(x.Z.Item,{label:"Prompt "+t("Type"),children:(0,r.jsx)(m.default,{style:{width:130},value:n,onChange:e=>{i(e)},options:[{label:t("Public")+" Prompts",value:"common"},{label:t("Private")+" Prompts",value:"private"}]})}),content:(0,r.jsx)(f,{data:b,loading:j,submit:l,close:()=>{s(!1)}}),placement:"topRight",trigger:"click",open:a,onOpenChange:e=>{s(e)},children:(0,r.jsx)(c.Z,{title:t("Click_Select")+" Prompt",children:(0,r.jsx)(h.Z,{className:"bottom-32"})})})},j=function(e){let{children:l,loading:t,onSubmit:i,...c}=e,[d,u]=(0,o.useState)("");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.default.TextArea,{className:"flex-1",size:"large",value:d,autoSize:{minRows:1,maxRows:4},...c,onPressEnter:e=>{if(d.trim()&&13===e.keyCode){if(e.shiftKey){u(e=>e+"\n");return}i(d),setTimeout(()=>{u("")},0)}},onChange:e=>{if("number"==typeof c.maxLength){u(e.target.value.substring(0,c.maxLength));return}u(e.target.value)}}),(0,r.jsx)(n.ZP,{className:"ml-2 flex items-center justify-center",size:"large",type:"text",loading:t,icon:(0,r.jsx)(a.Z,{}),onClick:()=>{i(d)}}),(0,r.jsx)(b,{submit:e=>{u(d+e)}}),l]})}},45247:function(e,l,t){var r=t(85893),a=t(50888);l.Z=function(e){let{visible:l}=e;return l?(0,r.jsx)("div",{className:"absolute w-full h-full top-0 left-0 flex justify-center items-center z-10 bg-white dark:bg-black bg-opacity-50 dark:bg-opacity-50 backdrop-blur-sm text-3xl animate-fade animate-duration-200",children:(0,r.jsx)(a.Z,{})}):null}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[604],{24093:function(e,l,t){t.r(l),t.d(l,{default:function(){return ev}});var r=t(85893),a=t(67294),s=t(2093),n=t(1375),o=t(2453),i=t(58989),c=t(83454),d=e=>{let{queryAgentURL:l="/api/v1/chat/completions"}=e,t=(0,a.useMemo)(()=>new AbortController,[]),r=(0,a.useCallback)(async e=>{let{context:r,data:a,chatId:s,onMessage:d,onClose:u,onDone:x,onError:m}=e;if(!r){o.ZP.warning(i.Z.t("NoContextTip"));return}let h={...a,conv_uid:s,user_input:r};if(!h.conv_uid){o.ZP.error("conv_uid 不存在,请刷新后重试");return}try{var p;await (0,n.L)("".concat(null!==(p=c.env.API_BASE_URL)&&void 0!==p?p:"").concat(l),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:t.signal,openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===n.a)return},onclose(){t.abort(),null==u||u()},onerror(e){throw Error(e)},onmessage:e=>{var l;let t=null===(l=e.data)||void 0===l?void 0:l.replaceAll("\\n","\n");"[DONE]"===t?null==x||x():(null==t?void 0:t.startsWith("[ERROR]"))?null==m||m(null==t?void 0:t.replace("[ERROR]","")):null==d||d(t)}})}catch(e){t.abort(),null==m||m("Sorry, We meet some error, please try agin later.",e)}},[l]);return(0,a.useEffect)(()=>()=>{t.abort()},[]),r},u=t(39332),x=t(99513),m=t(24019),h=t(50888),p=t(97937),g=t(63606),v=t(50228),f=t(87547),b=t(89035),j=t(33035),y=t(12767),w=t(94184),Z=t.n(w),_=t(66309),N=t(81799),k=t(41468),C=t(57132),S=t(29158),P=t(98165),R=t(79166),E=t(93179),O=t(71577),D=t(38426),M=t(20640),I=t.n(M);let L={code(e){var l;let{inline:t,node:a,className:s,children:n,style:i,...c}=e,d=/language-(\w+)/.exec(s||"");return!t&&d?(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(O.ZP,{className:"absolute right-3 top-2 text-gray-300 hover:!text-gray-200 bg-gray-700",type:"text",icon:(0,r.jsx)(C.Z,{}),onClick:()=>{let e=I()(n);o.ZP[e?"success":"error"](e?"Copy success":"Copy failed")}}),(0,r.jsx)(E.Z,{language:null!==(l=null==d?void 0:d[1])&&void 0!==l?l:"javascript",style:R.Z,children:n})]}):(0,r.jsx)("code",{...c,style:i,className:"px-[6px] py-[2px] rounded bg-gray-700 text-gray-100 dark:bg-gray-100 dark:text-gray-800 text-sm",children:n})},ul(e){let{children:l}=e;return(0,r.jsx)("ul",{className:"py-1",children:l})},ol(e){let{children:l}=e;return(0,r.jsx)("ol",{className:"py-1",children:l})},li(e){let{children:l,ordered:t}=e;return(0,r.jsx)("li",{className:"text-sm leading-7 ml-5 pl-2 text-gray-600 dark:text-gray-300 ".concat(t?"list-decimal":"list-disc"),children:l})},table(e){let{children:l}=e;return(0,r.jsx)("table",{className:"my-2 rounded-tl-md rounded-tr-md max-w-full bg-white dark:bg-gray-900 text-sm rounded-lg overflow-hidden",children:l})},thead(e){let{children:l}=e;return(0,r.jsx)("thead",{className:"bg-[#fafafa] dark:bg-black font-semibold",children:l})},th(e){let{children:l}=e;return(0,r.jsx)("th",{className:"!text-left p-4",children:l})},td(e){let{children:l}=e;return(0,r.jsx)("td",{className:"p-4 border-t border-[#f0f0f0] dark:border-gray-700",children:l})},h1(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-2xl font-bold my-4 border-b border-slate-300 pb-4",children:l})},h2(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-xl font-bold my-3",children:l})},h3(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-lg font-semibold my-2",children:l})},h4(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-base font-semibold my-1",children:l})},a(e){let{children:l,href:t}=e;return(0,r.jsxs)("div",{className:"inline-block text-blue-600 dark:text-blue-400",children:[(0,r.jsx)(S.Z,{className:"mr-1"}),(0,r.jsx)("a",{href:t,target:"_blank",children:l})]})},img(e){let{src:l,alt:t}=e;return(0,r.jsx)("div",{children:(0,r.jsx)(D.Z,{className:"min-h-[1rem] max-w-full max-h-full border rounded",src:l,alt:t,placeholder:(0,r.jsx)(_.Z,{icon:(0,r.jsx)(P.Z,{spin:!0}),color:"processing",children:"Image Loading..."}),fallback:"/images/fallback.png"})})},blockquote(e){let{children:l}=e;return(0,r.jsx)("blockquote",{className:"py-4 px-6 border-l-4 border-blue-600 rounded bg-white my-2 text-gray-500 dark:bg-slate-800 dark:text-gray-200 dark:border-white shadow-sm",children:l})}},A={todo:{bgClass:"bg-gray-500",icon:(0,r.jsx)(m.Z,{className:"ml-2"})},runing:{bgClass:"bg-blue-500",icon:(0,r.jsx)(h.Z,{className:"ml-2"})},failed:{bgClass:"bg-red-500",icon:(0,r.jsx)(p.Z,{className:"ml-2"})},completed:{bgClass:"bg-green-500",icon:(0,r.jsx)(g.Z,{className:"ml-2"})}};function T(e){return e.replaceAll("\\n","\n").replace(/]+)>/gi,"
").replace(/]+)>/gi,"")}var F=(0,a.memo)(function(e){let{children:l,content:t,isChartChat:s,onLinkClick:n}=e,{scene:o}=(0,a.useContext)(k.p),{context:i,model_name:c,role:d}=t,u="view"===d,{relations:x,value:m,cachePlguinContext:h}=(0,a.useMemo)(()=>{if("string"!=typeof i)return{relations:[],value:"",cachePlguinContext:[]};let[e,l]=i.split(" relations:"),t=l?l.split(","):[],r=[],a=0,s=e.replace(/]*>[^<]*<\/dbgpt-view>/gi,e=>{try{var l;console.log(e);let t=e.replaceAll("\n","\\n").replace(/<[^>]*>|<\/[^>]*>/gm,""),s=JSON.parse(t),n="".concat(a,"");return r.push({...s,result:T(null!==(l=s.result)&&void 0!==l?l:"")}),a++,n}catch(l){return console.log(l.message,l),e}});return{relations:t,cachePlguinContext:r,value:s}},[i]),p=(0,a.useMemo)(()=>({"custom-view"(e){var l;let{children:t}=e,a=+t.toString();if(!h[a])return t;let{name:s,status:n,err_msg:o,result:i}=h[a],{bgClass:c,icon:d}=null!==(l=A[n])&&void 0!==l?l:{};return(0,r.jsxs)("div",{className:"bg-white dark:bg-[#212121] rounded-lg overflow-hidden my-2 flex flex-col lg:max-w-[80%]",children:[(0,r.jsxs)("div",{className:Z()("flex px-4 md:px-6 py-2 items-center text-white text-sm",c),children:[s,d]}),i?(0,r.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:(0,r.jsx)(j.D,{components:L,rehypePlugins:[y.Z],children:null!=i?i:""})}):(0,r.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:o})]})}}),[i,h]);return(0,r.jsxs)("div",{className:Z()("relative flex flex-wrap w-full px-2 sm:px-4 py-2 sm:py-6 rounded-xl break-words",{"bg-slate-100 dark:bg-[#353539]":u,"lg:w-full xl:w-full pl-0":["chat_with_db_execute","chat_dashboard"].includes(o)}),children:[(0,r.jsx)("div",{className:"mr-2 flex flex-shrink-0 items-center justify-center h-7 w-7 rounded-full text-lg sm:mr-4",children:u?(0,N.A)(c)||(0,r.jsx)(v.Z,{}):(0,r.jsx)(f.Z,{})}),(0,r.jsxs)("div",{className:"flex-1 overflow-hidden items-center text-md leading-8",children:[!u&&"string"==typeof i&&i,u&&s&&"object"==typeof i&&(0,r.jsxs)("div",{children:["[".concat(i.template_name,"]: "),(0,r.jsxs)("span",{className:"text-[#1677ff] cursor-pointer",onClick:n,children:[(0,r.jsx)(b.Z,{className:"mr-1"}),i.template_introduce||"More Details"]})]}),u&&"string"==typeof i&&(0,r.jsx)(j.D,{components:{...L,...p},rehypePlugins:[y.Z],children:T(m)}),!!(null==x?void 0:x.length)&&(0,r.jsx)("div",{className:"flex flex-wrap mt-2",children:null==x?void 0:x.map((e,l)=>(0,r.jsx)(_.Z,{color:"#108ee9",children:e},e+l))})]}),l]})}),H=t(59301),V=t(41132),$=t(74312),q=t(3414),z=t(72868),J=t(59562),W=t(14553),G=t(25359),B=t(7203),K=t(48665),Q=t(26047),U=t(99056),X=t(57814),Y=t(63955),ee=t(33028),el=t(40911),et=t(66478),er=t(83062),ea=t(50489),es=t(67421),en=e=>{var l;let{conv_index:t,question:s,knowledge_space:n}=e,{t:i}=(0,es.$G)(),{chatId:c}=(0,a.useContext)(k.p),[d,u]=(0,a.useState)(""),[x,m]=(0,a.useState)(4),[h,p]=(0,a.useState)(""),g=(0,a.useRef)(null),[v,f]=o.ZP.useMessage(),[b,j]=(0,a.useState)({});(0,a.useEffect)(()=>{(0,ea.Vx)((0,ea.Lu)()).then(e=>{var l;console.log(e),j(null!==(l=e[1])&&void 0!==l?l:{})}).catch(e=>{console.log(e)})},[]);let y=(0,a.useCallback)((e,l)=>{l?(0,ea.Vx)((0,ea.Eb)(c,t)).then(e=>{var l,t,r,a;let s=null!==(l=e[1])&&void 0!==l?l:{};u(null!==(t=s.ques_type)&&void 0!==t?t:""),m(parseInt(null!==(r=s.score)&&void 0!==r?r:"4")),p(null!==(a=s.messages)&&void 0!==a?a:"")}).catch(e=>{console.log(e)}):(u(""),m(4),p(""))},[c,t]),w=(0,$.Z)(q.Z)(e=>{let{theme:l}=e;return{backgroundColor:"dark"===l.palette.mode?"#FBFCFD":"#0E0E10",...l.typography["body-sm"],padding:l.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,width:"100%",height:"100%"}});return(0,r.jsxs)(z.L,{onOpenChange:y,children:[f,(0,r.jsx)(er.Z,{title:i("Rating"),children:(0,r.jsx)(J.Z,{slots:{root:W.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,r.jsx)(H.Z,{})})}),(0,r.jsxs)(G.Z,{children:[(0,r.jsx)(B.Z,{disabled:!0,sx:{minHeight:0}}),(0,r.jsx)(K.Z,{sx:{width:"100%",maxWidth:350,display:"grid",gap:3,padding:1},children:(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault();let l={conv_uid:c,conv_index:t,question:s,knowledge_space:n,score:x,ques_type:d,messages:h};console.log(l),(0,ea.Vx)((0,ea.VC)({data:l})).then(e=>{v.open({type:"success",content:"save success"})}).catch(e=>{v.open({type:"error",content:"save error"})})},children:(0,r.jsxs)(Q.Z,{container:!0,spacing:.5,columns:13,sx:{flexGrow:1},children:[(0,r.jsx)(Q.Z,{xs:3,children:(0,r.jsx)(w,{children:i("Q_A_Category")})}),(0,r.jsx)(Q.Z,{xs:10,children:(0,r.jsx)(U.Z,{action:g,value:d,placeholder:"Choose one…",onChange:(e,l)=>u(null!=l?l:""),...d&&{endDecorator:(0,r.jsx)(W.ZP,{size:"sm",variant:"plain",color:"neutral",onMouseDown:e=>{e.stopPropagation()},onClick:()=>{var e;u(""),null===(e=g.current)||void 0===e||e.focusVisible()},children:(0,r.jsx)(V.Z,{})}),indicator:null},sx:{width:"100%"},children:null===(l=Object.keys(b))||void 0===l?void 0:l.map(e=>(0,r.jsx)(X.Z,{value:e,children:b[e]},e))})}),(0,r.jsx)(Q.Z,{xs:3,children:(0,r.jsx)(w,{children:(0,r.jsx)(er.Z,{title:(0,r.jsx)(K.Z,{children:(0,r.jsx)("div",{children:i("feed_back_desc")})}),variant:"solid",placement:"left",children:i("Q_A_Rating")})})}),(0,r.jsx)(Q.Z,{xs:10,sx:{pl:0,ml:0},children:(0,r.jsx)(Y.Z,{"aria-label":"Custom",step:1,min:0,max:5,valueLabelFormat:function(e){return({0:i("Lowest"),1:i("Missed"),2:i("Lost"),3:i("Incorrect"),4:i("Verbose"),5:i("Best")})[e]},valueLabelDisplay:"on",marks:[{value:0,label:"0"},{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"}],sx:{width:"90%",pt:3,m:2,ml:1},onChange:e=>{var l;return m(null===(l=e.target)||void 0===l?void 0:l.value)},value:x})}),(0,r.jsx)(Q.Z,{xs:13,children:(0,r.jsx)(ee.Z,{placeholder:i("Please_input_the_text"),value:h,onChange:e=>p(e.target.value),minRows:2,maxRows:4,endDecorator:(0,r.jsx)(el.ZP,{level:"body-xs",sx:{ml:"auto"},children:i("input_count")+h.length+i("input_unit")}),sx:{width:"100%",fontSize:14}})}),(0,r.jsx)(Q.Z,{xs:13,children:(0,r.jsx)(et.Z,{type:"submit",variant:"outlined",sx:{width:"100%",height:"100%"},children:i("submit")})})]})})})]})]})},eo=t(32983),ei=t(12069),ec=t(96486),ed=t.n(ec),eu=t(38954),ex=t(98399),em=e=>{var l;let{messages:t,onSubmit:n}=e,{dbParam:i,currentDialogue:c,scene:d,model:m,refreshDialogList:h,chatId:p,agentList:g}=(0,a.useContext)(k.p),{t:v}=(0,es.$G)(),f=(0,u.useSearchParams)(),b=null!==(l=f&&f.get("spaceNameOriginal"))&&void 0!==l?l:"",[j,y]=(0,a.useState)(!1),[w,_]=(0,a.useState)(!1),[S,P]=(0,a.useState)(t),[R,E]=(0,a.useState)(""),O=(0,a.useRef)(null),D=(0,a.useMemo)(()=>"chat_dashboard"===d,[d]),M=(0,a.useMemo)(()=>{switch(d){case"chat_agent":return g.join(",");case"chat_excel":return null==c?void 0:c.select_param;default:return b||i}},[d,g,c,i,b]),L=async e=>{if(!j&&e.trim())try{y(!0),await n(e,{select_param:null!=M?M:""})}finally{y(!1)}},A=e=>{try{return JSON.parse(e)}catch(l){return e}},[T,H]=o.ZP.useMessage(),V=async e=>{let l=null==e?void 0:e.replace(/\trelations:.*/g,""),t=I()(l);t?l?T.open({type:"success",content:v("Copy_success")}):T.open({type:"warning",content:v("Copy_nothing")}):T.open({type:"error",content:v("Copry_error")})};return(0,s.Z)(async()=>{let e=(0,ex.a_)();e&&e.id===p&&(await L(e.message),h(),localStorage.removeItem(ex.rU))},[p]),(0,a.useEffect)(()=>{let e=t;D&&(e=ed().cloneDeep(t).map(e=>((null==e?void 0:e.role)==="view"&&"string"==typeof(null==e?void 0:e.context)&&(e.context=A(null==e?void 0:e.context)),e))),P(e.filter(e=>["view","human"].includes(e.role)))},[D,t]),(0,a.useEffect)(()=>{setTimeout(()=>{var e;null===(e=O.current)||void 0===e||e.scrollTo(0,O.current.scrollHeight)},50)},[t]),(0,r.jsxs)(r.Fragment,{children:[H,(0,r.jsx)("div",{ref:O,className:"flex flex-1 overflow-y-auto pb-8 w-full flex-col",children:(0,r.jsx)("div",{className:"flex items-center flex-1 flex-col text-sm leading-6 text-slate-900 dark:text-slate-300 sm:text-base sm:leading-7",children:S.length?S.map((e,l)=>{var t;return(0,r.jsx)(F,{content:e,isChartChat:D,onLinkClick:()=>{_(!0),E(JSON.stringify(null==e?void 0:e.context,null,2))},children:"view"===e.role&&(0,r.jsxs)("div",{className:"flex w-full flex-row-reverse pt-2 md:pt-4 border-t border-gray-200 mt-2 md:mt-4",children:[(0,r.jsx)(en,{conv_index:Math.ceil((l+1)/2),question:null===(t=null==S?void 0:S.filter(l=>(null==l?void 0:l.role)==="human"&&(null==l?void 0:l.order)===e.order)[0])||void 0===t?void 0:t.context,knowledge_space:b||i||""}),(0,r.jsx)(er.Z,{title:v("Copy"),children:(0,r.jsx)(et.Z,{onClick:()=>V(null==e?void 0:e.context),slots:{root:W.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,r.jsx)(C.Z,{})})})]})},l)}):(0,r.jsx)(eo.Z,{image:"/empty.png",imageStyle:{width:320,height:320,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:"flex items-center justify-center flex-col h-full w-full",description:"Start a conversation"})})}),(0,r.jsx)("div",{className:Z()("relative after:absolute after:-top-8 after:h-8 after:w-full after:bg-gradient-to-t after:from-white after:to-transparent dark:after:from-[#212121]",{"cursor-not-allowed":"chat_excel"===d&&!(null==c?void 0:c.select_param)}),children:(0,r.jsxs)("div",{className:"flex flex-wrap w-full py-2 sm:pt-6 sm:pb-10",children:[m&&(0,r.jsx)("div",{className:"mr-2 flex items-center h-10",children:(0,N.A)(m)}),(0,r.jsx)(eu.Z,{loading:j,onSubmit:L})]})}),(0,r.jsx)(ei.default,{title:"JSON Editor",open:w,width:"60%",cancelButtonProps:{hidden:!0},onOk:()=>{_(!1)},onCancel:()=>{_(!1)},children:(0,r.jsx)(x.Z,{className:"w-full h-[500px]",language:"json",value:R})})]})},eh=t(70803),ep=t(39156),eg=t(45247),ev=()=>{var e;let l=(0,u.useSearchParams)(),{scene:t,chatId:n,model:o,setModel:i}=(0,a.useContext)(k.p),c=d({}),x=null!==(e=l&&l.get("initMessage"))&&void 0!==e?e:"",[m,h]=(0,a.useState)(!1),[p,g]=(0,a.useState)(),[v,f]=(0,a.useState)([]),b=async()=>{h(!0);let[,e]=await (0,ea.Vx)((0,ea.$i)(n));f(null!=e?e:[]),h(!1)},j=e=>{var l;let t=null===(l=e[e.length-1])||void 0===l?void 0:l.context;if(t)try{let e=JSON.parse(t);g((null==e?void 0:e.template_name)==="report"?null==e?void 0:e.charts:void 0)}catch(e){g(void 0)}};(0,s.Z)(async()=>{let e=(0,ex.a_)();e&&e.id===n||await b()},[x,n]),(0,a.useEffect)(()=>{var e,l;if(!v.length)return;let t=null===(e=null===(l=v.filter(e=>"view"===e.role))||void 0===l?void 0:l.slice(-1))||void 0===e?void 0:e[0];(null==t?void 0:t.model_name)&&i(t.model_name),j(v)},[v.length]);let y=(0,a.useCallback)((e,l)=>new Promise(r=>{let a=[...v,{role:"human",context:e,model_name:o,order:0,time_stamp:0},{role:"view",context:"",model_name:o,order:0,time_stamp:0}],s=a.length-1;f([...a]),c({context:e,data:{...l,chat_mode:t||"chat_normal",model_name:o},chatId:n,onMessage:e=>{a[s].context=e,f([...a])},onDone:()=>{j(a),r()},onClose:()=>{j(a),r()},onError:e=>{a[s].context=e,f([...a]),r()}})}),[v,c,o]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eg.Z,{visible:m}),(0,r.jsx)(eh.Z,{refreshHistory:b,modelChange:e=>{i(e)}}),(0,r.jsxs)("div",{className:"px-4 flex flex-1 flex-wrap overflow-hidden relative",children:[!!(null==p?void 0:p.length)&&(0,r.jsx)("div",{className:"w-full xl:w-3/4 h-3/5 xl:pr-4 xl:h-full overflow-y-auto",children:(0,r.jsx)(ep.Z,{chartsData:p})}),!(null==p?void 0:p.length)&&"chat_dashboard"===t&&(0,r.jsx)(eo.Z,{image:"/empty.png",imageStyle:{width:320,height:320,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:"w-full xl:w-3/4 h-3/5 xl:h-full pt-0 md:pt-10"}),(0,r.jsx)("div",{className:Z()("flex flex-1 flex-col overflow-hidden",{"px-0 xl:pl-4 h-2/5 xl:h-full border-t xl:border-t-0 xl:border-l":"chat_dashboard"===t,"h-full lg:px-8":"chat_dashboard"!==t}),children:(0,r.jsx)(em,{messages:v,onSubmit:y})})]})]})}},38954:function(e,l,t){t.d(l,{Z:function(){return j}});var r=t(85893),a=t(27496),s=t(59566),n=t(71577),o=t(67294),i=t(2487),c=t(83062),d=t(2453),u=t(74627),x=t(39479),m=t(51009),h=t(58299),p=t(577),g=t(30119),v=t(67421);let f=e=>{let{data:l,loading:t,submit:a,close:s}=e,{t:n}=(0,v.$G)(),o=e=>()=>{a(e),s()};return(0,r.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,r.jsx)(i.Z,{dataSource:null==l?void 0:l.data,loading:t,rowKey:e=>e.prompt_name,renderItem:e=>(0,r.jsx)(i.Z.Item,{onClick:o(e.content),children:(0,r.jsx)(c.Z,{title:e.content,children:(0,r.jsx)(i.Z.Item.Meta,{style:{cursor:"copy"},title:e.prompt_name,description:n("Prompt_Info_Scene")+":".concat(e.chat_scene,",")+n("Prompt_Info_Sub_Scene")+":".concat(e.sub_chat_scene)})})},e.prompt_name)})})};var b=e=>{let{submit:l}=e,{t}=(0,v.$G)(),[a,s]=(0,o.useState)(!1),[n,i]=(0,o.useState)("common"),{data:b,loading:j}=(0,p.Z)(()=>(0,g.PR)("/prompt/list",{prompt_type:n}),{refreshDeps:[n],onError:e=>{d.ZP.error(null==e?void 0:e.message)}});return(0,r.jsx)(u.Z,{title:(0,r.jsx)(x.Z.Item,{label:"Prompt "+t("Type"),children:(0,r.jsx)(m.default,{style:{width:130},value:n,onChange:e=>{i(e)},options:[{label:t("Public")+" Prompts",value:"common"},{label:t("Private")+" Prompts",value:"private"}]})}),content:(0,r.jsx)(f,{data:b,loading:j,submit:l,close:()=>{s(!1)}}),placement:"topRight",trigger:"click",open:a,onOpenChange:e=>{s(e)},children:(0,r.jsx)(c.Z,{title:t("Click_Select")+" Prompt",children:(0,r.jsx)(h.Z,{className:"bottom-32"})})})},j=function(e){let{children:l,loading:t,onSubmit:i,...c}=e,[d,u]=(0,o.useState)("");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.default.TextArea,{className:"flex-1",size:"large",value:d,autoSize:{minRows:1,maxRows:4},...c,onPressEnter:e=>{if(d.trim()&&13===e.keyCode){if(e.shiftKey){u(e=>e+"\n");return}i(d),setTimeout(()=>{u("")},0)}},onChange:e=>{if("number"==typeof c.maxLength){u(e.target.value.substring(0,c.maxLength));return}u(e.target.value)}}),(0,r.jsx)(n.ZP,{className:"ml-2 flex items-center justify-center",size:"large",type:"text",loading:t,icon:(0,r.jsx)(a.Z,{}),onClick:()=>{i(d)}}),(0,r.jsx)(b,{submit:e=>{u(d+e)}}),l]})}},45247:function(e,l,t){var r=t(85893),a=t(50888);l.Z=function(e){let{visible:l}=e;return l?(0,r.jsx)("div",{className:"absolute w-full h-full top-0 left-0 flex justify-center items-center z-10 bg-white dark:bg-black bg-opacity-50 dark:bg-opacity-50 backdrop-blur-sm text-3xl animate-fade animate-duration-200",children:(0,r.jsx)(a.Z,{})}):null}}}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/747-6c8367d757926558.js b/pilot/server/static/_next/static/chunks/747-6c8367d757926558.js deleted file mode 100644 index 537fd50b9..000000000 --- a/pilot/server/static/_next/static/chunks/747-6c8367d757926558.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[747],{78543:function(e,t,l){l.d(t,{Z:function(){return w}});var s=l(85893),a=l(67294),n=l(12069),i=l(3363),r=l(67421),c=l(50489),o=l(75081),d=l(39479),m=l(59566),u=l(71577);function h(e){let{t}=(0,r.$G)(),{handleAddKnowledge:l}=e,[n,i]=(0,a.useState)(!1),h=async e=>{let{knowledgeName:t,owner:s,description:a}=e;i(!0);let[n,r,o]=await (0,c.Vx)((0,c.U6)({name:t,vector_type:"Chroma",owner:s,desc:a}));i(!1),(null==o?void 0:o.success)&&l(t)};return(0,s.jsx)(o.Z,{spinning:n,children:(0,s.jsxs)(d.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:h,children:[(0,s.jsx)(d.Z.Item,{label:t("Knowledge_Space_Name"),name:"knowledgeName",rules:[{required:!0,message:t("Please_input_the_name")},()=>({validator:(e,l)=>/[^\u4e00-\u9fa50-9a-zA-Z_-]/.test(l)?Promise.reject(Error(t("the_name_can_only_contain"))):Promise.resolve()})],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_name")})}),(0,s.jsx)(d.Z.Item,{label:t("Owner"),name:"owner",rules:[{required:!0,message:t("Please_input_the_owner")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_owner")})}),(0,s.jsx)(d.Z.Item,{label:t("Description"),name:"description",rules:[{required:!0,message:t("Please_input_the_description")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_description")})}),(0,s.jsx)(d.Z.Item,{children:(0,s.jsx)(u.ZP,{type:"primary",htmlType:"submit",children:t("Next")})})]})})}var x=l(31365),p=l(2453),_=l(85813),j=l(72269),f=l(92039),g=l(64082);let b={ChooseType:1,AddDataSourceForm:2},{Dragger:Z}=x.default,{TextArea:y}=m.default;function N(e){let{handleChooseType:t,documentType:l,step:n,handleBackBtn:i,knowledgeName:h,syncDocuments:N,fetchDocuments:w,setIsAddShow:k}=e,{t:T}=(0,r.$G)(),[S]=d.Z.useForm(),[P,v]=(0,a.useState)(!1),C=async e=>{var t;let s;let{synchChecked:a,documentName:n,textSource:i,originFileObj:r,text:o,webPageUrl:d}=e;switch(v(!0),l){case"webPage":s=await (0,c.Vx)((0,c.H_)(h,{doc_name:n,content:d,doc_type:"URL"}));break;case"file":let m=new FormData;m.append("doc_name",n||r.file.name),m.append("doc_file",r.file),m.append("doc_type","DOCUMENT"),m.append("space_name",h),s=await (0,c.Vx)((0,c.iG)(h,m));break;default:s=await (0,c.Vx)((0,c.H_)(h,{doc_name:n,source:i,content:o,doc_type:"TEXT"}))}a&&(null==N||N(h,null==s?void 0:s[1])),v(!1),(null===(t=s[2])||void 0===t?void 0:t.success)&&(null==k||k(!1),null==w||w())},F=()=>{let e=S.getFieldsValue().originFileObj;return!!e&&(p.ZP.warning(T("Limit_Upload_File_Count_Tips")),x.default.LIST_IGNORE)},D=e=>{let{file:t,fileList:l}=e;S.getFieldsValue().documentName||S.setFieldValue("documentName",t.name),0===l.length&&S.setFieldValue("originFileObj",null)},I=[{type:"text",title:T("Text"),subTitle:T("Fill your raw text"),iconType:"TEXT"},{type:"webPage",title:T("URL"),subTitle:T("Fetch_the_content_of_a_URL"),iconType:"WEBPAGE"},{type:"file",title:T("Document"),subTitle:T("Upload_a_document"),iconType:"DOCUMENT"}],E=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Z.Item,{label:"".concat(T("Text_Source"),":"),name:"textSource",rules:[{required:!0,message:T("Please_input_the_text_source")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:T("Please_input_the_text_source")})}),(0,s.jsx)(d.Z.Item,{label:"".concat(T("Text"),":"),name:"text",rules:[{required:!0,message:T("Please_input_the_description")}],children:(0,s.jsx)(y,{rows:4,maxLength:6})})]}),A=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(d.Z.Item,{label:"".concat(T("Web_Page_URL"),":"),name:"webPageUrl",rules:[{required:!0,message:T("Please_input_the_owner")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:T("Please_input_the_Web_Page_URL")})})}),V=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(d.Z.Item,{name:"originFileObj",rules:[{required:!0,message:T("Please_input_the_owner")}],children:(0,s.jsxs)(Z,{onChange:D,beforeUpload:F,multiple:!1,accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",children:[(0,s.jsx)("p",{className:"ant-upload-drag-icon",children:(0,s.jsx)(g.Z,{})}),(0,s.jsx)("p",{style:{color:"rgb(22, 108, 255)",fontSize:"20px"},children:T("Select_or_Drop_file")}),(0,s.jsx)("p",{className:"ant-upload-hint",style:{color:"rgb(22, 108, 255)"},children:"PDF, PowerPoint, Excel, Word, Text, Markdown,"})]})})});return n===b.ChooseType?(0,s.jsx)(s.Fragment,{children:I.map((e,l)=>(0,s.jsxs)(_.Z,{className:"mt-4 mb-4 cursor-pointer",onClick:()=>{t(e)},children:[(0,s.jsxs)("div",{className:"font-semibold",children:[(0,f._)(e.iconType)," ",e.title]}),(0,s.jsx)("div",{children:e.subTitle})]},l))}):(0,s.jsx)(o.Z,{spinning:P,children:(0,s.jsxs)(d.Z,{form:S,size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:C,children:[(0,s.jsx)(d.Z.Item,{label:"".concat(T("Name"),":"),name:"documentName",rules:[{required:!0,message:T("Please_input_the_name")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:T("Please_input_the_name")})}),(()=>{switch(l){case"webPage":return A();case"file":return V();default:return E()}})(),(0,s.jsx)(d.Z.Item,{label:"".concat(T("Synch"),":"),name:"synchChecked",initialValue:!0,children:(0,s.jsx)(j.Z,{className:"bg-slate-400",defaultChecked:!0})}),(0,s.jsxs)(d.Z.Item,{children:[(0,s.jsx)(u.ZP,{onClick:i,className:"mr-4",children:"".concat(T("Back"))}),(0,s.jsx)(u.ZP,{type:"primary",htmlType:"submit",children:T("Finish")})]})]})})}function w(e){let{setIsAddShow:t,isAddShow:l,type:c,knowLedge:o,fetchDocuments:d,fetchKnowledge:m,syncDocuments:u}=e,{t:x}=(0,r.$G)(),p=[{title:x("Knowledge_Space_Config")},{title:x("Choose_a_Datasource_type")},{title:x("Setup_the_Datasource")}],_=[{title:x("Choose_a_Datasource_type")},{title:x("Setup_the_Datasource")}],[j,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(0),[Z,y]=(0,a.useState)(),w=async e=>{b(1),null==m||m(),y(e)},k=e=>{f(e.type),b("knowledge"===c?2:1)},T=()=>{b("knowledge"===c?1:0)};return(0,s.jsxs)(n.default,{title:"knowledge"===c?"Add Knowledge":"Add Datasource",centered:!0,open:l,destroyOnClose:!0,onCancel:()=>{t(!1)},width:1e3,afterClose:()=>{b(0)},footer:null,children:[(0,s.jsx)(i.Z,{current:g,items:"knowledge"===c?p:_}),(()=>{let t="document"===c?g+1:g;return 0===t?(0,s.jsx)(h,{handleAddKnowledge:w}):(0,s.jsx)(N,{fetchDocuments:d,knowledgeName:(null==o?void 0:o.name)||Z,step:t,documentType:j,handleChooseType:k,handleBackBtn:T,syncDocuments:u,setIsAddShow:e.setIsAddShow})})()]})}},92039:function(e,t,l){l.d(t,{Z:function(){return O},_:function(){return q}});var s=l(85893),a=l(67294),n=l(12069),i=l(83062),r=l(66309),c=l(85813),o=l(32983),d=l(71577),m=l(42075),u=l(96074),h=l(75081),x=l(27595),p=l(27329),_=l(68346),j=l(21640),f=l(31326),g=l(88008),b=l(27704),Z=l(24969),y=l(18754),N=l(50489),w=l(30381),k=l.n(w),T=l(78543),S=l(59566),P=l(71230),v=l(15746),C=l(39479),F=l(44442),D=l(67421),I=l(31545),E=l(6321);let{TextArea:A}=S.default;function V(e){let{knowledge:t,argumentsShow:l,setArgumentsShow:i}=e,{t:r}=(0,D.$G)(),[c,o]=(0,a.useState)(),[m,u]=(0,a.useState)(!1),x=async()=>{let[e,l]=await (0,N.Vx)((0,N.Tu)(t.name));o(l)};(0,a.useEffect)(()=>{x()},[]);let p=[{key:"Embedding",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(I.Z,{}),r("Embedding")]}),children:(0,s.jsxs)(P.Z,{gutter:24,children:[(0,s.jsx)(v.Z,{span:12,offset:0,children:(0,s.jsx)(C.Z.Item,{tooltip:r("the_top_k_vectors"),rules:[{required:!0}],label:r("topk"),name:["embedding","topk"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:r("Set_a_threshold_score"),rules:[{required:!0}],label:r("recall_score"),name:["embedding","recall_score"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_owner")})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:r("Recall_Type"),rules:[{required:!0}],label:r("recall_type"),name:["embedding","recall_type"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:r("A_model_used"),rules:[{required:!0}],label:r("model"),name:["embedding","model"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:r("The_size_of_the_data_chunks"),rules:[{required:!0}],label:r("chunk_size"),name:["embedding","chunk_size"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:r("The_amount_of_overlap"),rules:[{required:!0}],label:r("chunk_overlap"),name:["embedding","chunk_overlap"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_description")})})})]})},{key:"Prompt",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(E.Z,{}),r("Embedding")]}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z.Item,{tooltip:r("A_contextual_parameter"),label:r("scene"),name:["prompt","scene"],children:(0,s.jsx)(A,{rows:4,className:"mb-2"})}),(0,s.jsx)(C.Z.Item,{tooltip:r("structure_or_format"),label:r("template"),name:["prompt","template"],children:(0,s.jsx)(A,{rows:7,className:"mb-2"})}),(0,s.jsx)(C.Z.Item,{tooltip:r("The_maximum_number_of_tokens"),label:r("max_token"),name:["prompt","max_token"],children:(0,s.jsx)(S.default,{className:"mb-2"})})]})}],_=async e=>{u(!0);let[l,s,a]=await (0,N.Vx)((0,N.iH)(t.name,{argument:JSON.stringify(e)}));u(!1),(null==a?void 0:a.success)&&i(!1)};return(0,s.jsx)(n.default,{width:850,open:l,onCancel:()=>{i(!1)},footer:null,children:(0,s.jsx)(h.Z,{spinning:m,children:(0,s.jsxs)(C.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{...c},autoComplete:"off",onFinish:_,children:[(0,s.jsx)(F.Z,{items:p}),(0,s.jsxs)("div",{className:"mt-3 mb-3",children:[(0,s.jsx)(d.ZP,{htmlType:"submit",type:"primary",className:"mr-6",children:r("Submit")}),(0,s.jsx)(d.ZP,{onClick:()=>{i(!1)},children:r("close")})]})]})})})}var z=l(11163);let{confirm:U}=n.default,q=e=>"TEXT"===e?(0,s.jsx)(x.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"}):"DOCUMENT"===e?(0,s.jsx)(p.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"}):(0,s.jsx)(_.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"});function O(e){let{t}=(0,D.$G)(),l=(0,z.useRouter)(),{knowledge:n,setDocumentCount:x}=e,[p,_]=(0,a.useState)(!1),[w,S]=(0,a.useState)([]),[P,v]=(0,a.useState)(!1),[C,F]=(0,a.useState)(!1),I=e=>{U({title:t("Tips"),icon:(0,s.jsx)(j.Z,{}),content:"".concat(t("Del_Document_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await O(e)}})};async function E(){_(!0);let[e,t]=await (0,N.Vx)((0,N._Q)(null==n?void 0:n.name,{page:1,page_size:20}));S(null==t?void 0:t.data),x(String(null==t?void 0:t.total)),_(!1)}let A=async(e,t)=>{await (0,N.Vx)((0,N.Hx)(e,{doc_ids:[t]}))},O=async e=>{await (0,N.Vx)((0,N.n3)(null==n?void 0:n.name,{doc_name:e.doc_name})),E()},L=()=>{v(!0)},G=(e,t)=>{let l;switch(e){case"TODO":l="gold";break;case"RUNNING":l="#2db7f5";break;case"FINISHED":l="#87d068";break;default:l="f50"}return(0,s.jsx)(i.Z,{title:t,children:(0,s.jsx)(r.Z,{color:l,children:e})})};return(0,a.useEffect)(()=>{E()},[n]),(0,s.jsxs)("div",{className:"collapse-container pt-2 px-4",children:[(0,s.jsxs)(m.Z,{children:[(0,s.jsx)(d.ZP,{size:"middle",type:"primary",className:"flex items-center",icon:(0,s.jsx)(Z.Z,{}),onClick:L,children:t("Add_Datasource")}),(0,s.jsx)(d.ZP,{size:"middle",className:"flex items-center mx-2",icon:(0,s.jsx)(y.Z,{}),onClick:()=>{F(!0)},children:"Arguments"})]}),(0,s.jsx)(u.Z,{}),(0,s.jsx)(h.Z,{spinning:p,children:w.length>0?(0,s.jsx)("div",{className:"max-h-96 mt-3 grid grid-cols-1 gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-3 xl:gap-x-5 overflow-auto",children:w.map(e=>(0,s.jsxs)(c.Z,{className:" dark:bg-[#484848] relative shrink-0 grow-0 cursor-pointer rounded-[10px] border border-gray-200 border-solid w-full",title:(0,s.jsx)(i.Z,{title:e.doc_name,children:(0,s.jsxs)("div",{className:"truncate ",children:[q(e.doc_type),(0,s.jsx)("span",{children:e.doc_name})]})}),extra:(0,s.jsxs)("div",{className:"mx-3",children:[(0,s.jsx)(i.Z,{title:"detail",children:(0,s.jsx)(f.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{l.push("/knowledge/".concat(n.name,"/").concat(e.id))}})}),(0,s.jsx)(i.Z,{title:"Sync",children:(0,s.jsx)(g.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{A(n.name,e.id)}})}),(0,s.jsx)(i.Z,{title:"Delete",children:(0,s.jsx)(b.Z,{className:"text-[#ff1b2e] !text-lg",onClick:()=>{I(e)}})})]}),children:[(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[t("Size"),":"]}),(0,s.jsxs)("p",{children:[e.chunk_size," chunks"]}),(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[t("Last_Synch"),":"]}),(0,s.jsx)("p",{children:k()(e.last_sync).format("YYYY-MM-DD HH:MM:SS")}),(0,s.jsx)("p",{className:"mt-2 mb-2",children:G(e.status,e.result)})]},e.id))}):(0,s.jsx)(o.Z,{image:o.Z.PRESENTED_IMAGE_DEFAULT,children:(0,s.jsx)(d.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,s.jsx)(Z.Z,{}),onClick:L,children:"Create Now"})})}),(0,s.jsx)(T.Z,{syncDocuments:A,fetchDocuments:E,setIsAddShow:v,isAddShow:P,type:"document",setDocuments:S,knowLedge:n}),(0,s.jsx)(V,{knowledge:n,argumentsShow:C,setArgumentsShow:F})]})}}}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/747-ec60adab93bb6758.js b/pilot/server/static/_next/static/chunks/747-ec60adab93bb6758.js new file mode 100644 index 000000000..9ecce8738 --- /dev/null +++ b/pilot/server/static/_next/static/chunks/747-ec60adab93bb6758.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[747],{78543:function(e,t,l){l.d(t,{Z:function(){return w}});var s=l(85893),a=l(67294),n=l(12069),i=l(3363),c=l(67421),r=l(50489),o=l(75081),d=l(39479),m=l(59566),u=l(71577);function h(e){let{t}=(0,c.$G)(),{handleAddKnowledge:l}=e,[n,i]=(0,a.useState)(!1),h=async e=>{let{knowledgeName:t,owner:s,description:a}=e;i(!0);let[n,c,o]=await (0,r.Vx)((0,r.U6)({name:t,vector_type:"Chroma",owner:s,desc:a}));i(!1),(null==o?void 0:o.success)&&l(t)};return(0,s.jsx)(o.Z,{spinning:n,children:(0,s.jsxs)(d.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:h,children:[(0,s.jsx)(d.Z.Item,{label:t("Knowledge_Space_Name"),name:"knowledgeName",rules:[{required:!0,message:t("Please_input_the_name")},()=>({validator:(e,l)=>/[^\u4e00-\u9fa50-9a-zA-Z_-]/.test(l)?Promise.reject(Error(t("the_name_can_only_contain"))):Promise.resolve()})],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_name")})}),(0,s.jsx)(d.Z.Item,{label:t("Owner"),name:"owner",rules:[{required:!0,message:t("Please_input_the_owner")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_owner")})}),(0,s.jsx)(d.Z.Item,{label:t("Description"),name:"description",rules:[{required:!0,message:t("Please_input_the_description")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_description")})}),(0,s.jsx)(d.Z.Item,{children:(0,s.jsx)(u.ZP,{type:"primary",htmlType:"submit",children:t("Next")})})]})})}var x=l(31365),p=l(2453),_=l(85813),j=l(72269),f=l(92039),g=l(64082);let b={ChooseType:1,AddDataSourceForm:2},{Dragger:Z}=x.default,{TextArea:y}=m.default;function N(e){let{handleChooseType:t,documentType:l,step:n,handleBackBtn:i,knowledgeName:h,fetchDocuments:N,setIsAddShow:w}=e,{t:k}=(0,c.$G)(),[T]=d.Z.useForm(),[S,P]=(0,a.useState)(!1),v=async e=>{var t;let s;let{synchChecked:a,documentName:n,textSource:i,originFileObj:c,text:o,webPageUrl:d}=e;switch(P(!0),l){case"webPage":s=await (0,r.Vx)((0,r.H_)(h,{doc_name:n,content:d,doc_type:"URL"}));break;case"file":let m=new FormData;m.append("doc_name",n||c.file.name),m.append("doc_file",c.file),m.append("doc_type","DOCUMENT"),m.append("space_name",h),s=await (0,r.Vx)((0,r.iG)(h,m));break;default:s=await (0,r.Vx)((0,r.H_)(h,{doc_name:n,source:i,content:o,doc_type:"TEXT"}))}a&&(null==C||C(h,null==s?void 0:s[1])),P(!1),(null===(t=s[2])||void 0===t?void 0:t.success)&&(null==w||w(!1),null==N||N())},C=async(e,t)=>{await (0,r.Vx)((0,r.Hx)(e,{doc_ids:[t]}))},F=()=>{let e=T.getFieldsValue().originFileObj;return!!e&&(p.ZP.warning(k("Limit_Upload_File_Count_Tips")),x.default.LIST_IGNORE)},I=e=>{let{file:t,fileList:l}=e;T.getFieldsValue().documentName||T.setFieldValue("documentName",t.name),0===l.length&&T.setFieldValue("originFileObj",null)},D=[{type:"text",title:k("Text"),subTitle:k("Fill your raw text"),iconType:"TEXT"},{type:"webPage",title:k("URL"),subTitle:k("Fetch_the_content_of_a_URL"),iconType:"WEBPAGE"},{type:"file",title:k("Document"),subTitle:k("Upload_a_document"),iconType:"DOCUMENT"}],E=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Z.Item,{label:"".concat(k("Text_Source"),":"),name:"textSource",rules:[{required:!0,message:k("Please_input_the_text_source")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:k("Please_input_the_text_source")})}),(0,s.jsx)(d.Z.Item,{label:"".concat(k("Text"),":"),name:"text",rules:[{required:!0,message:k("Please_input_the_description")}],children:(0,s.jsx)(y,{rows:4,maxLength:6})})]}),A=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(d.Z.Item,{label:"".concat(k("Web_Page_URL"),":"),name:"webPageUrl",rules:[{required:!0,message:k("Please_input_the_owner")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:k("Please_input_the_Web_Page_URL")})})}),V=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(d.Z.Item,{name:"originFileObj",rules:[{required:!0,message:k("Please_input_the_owner")}],children:(0,s.jsxs)(Z,{onChange:I,beforeUpload:F,multiple:!1,accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",children:[(0,s.jsx)("p",{className:"ant-upload-drag-icon",children:(0,s.jsx)(g.Z,{})}),(0,s.jsx)("p",{style:{color:"rgb(22, 108, 255)",fontSize:"20px"},children:k("Select_or_Drop_file")}),(0,s.jsx)("p",{className:"ant-upload-hint",style:{color:"rgb(22, 108, 255)"},children:"PDF, PowerPoint, Excel, Word, Text, Markdown,"})]})})});return n===b.ChooseType?(0,s.jsx)(s.Fragment,{children:D.map((e,l)=>(0,s.jsxs)(_.Z,{className:"mt-4 mb-4 cursor-pointer",onClick:()=>{t(e)},children:[(0,s.jsxs)("div",{className:"font-semibold",children:[(0,f._)(e.iconType)," ",e.title]}),(0,s.jsx)("div",{children:e.subTitle})]},l))}):(0,s.jsx)(o.Z,{spinning:S,children:(0,s.jsxs)(d.Z,{form:T,size:"large",className:"mt-4",layout:"vertical",name:"basic",autoComplete:"off",onFinish:v,children:[(0,s.jsx)(d.Z.Item,{label:"".concat(k("Name"),":"),name:"documentName",rules:[{required:!0,message:k("Please_input_the_name")}],children:(0,s.jsx)(m.default,{className:"mb-5 h-12",placeholder:k("Please_input_the_name")})}),(()=>{switch(l){case"webPage":return A();case"file":return V();default:return E()}})(),(0,s.jsx)(d.Z.Item,{label:"".concat(k("Synch"),":"),name:"synchChecked",initialValue:!0,children:(0,s.jsx)(j.Z,{className:"bg-slate-400",defaultChecked:!0})}),(0,s.jsxs)(d.Z.Item,{children:[(0,s.jsx)(u.ZP,{onClick:i,className:"mr-4",children:"".concat(k("Back"))}),(0,s.jsx)(u.ZP,{type:"primary",htmlType:"submit",children:k("Finish")})]})]})})}function w(e){let{setIsAddShow:t,isAddShow:l,type:r,knowLedge:o,fetchDocuments:d,fetchKnowledge:m,syncDocuments:u}=e,{t:x}=(0,c.$G)(),p=[{title:x("Knowledge_Space_Config")},{title:x("Choose_a_Datasource_type")},{title:x("Setup_the_Datasource")}],_=[{title:x("Choose_a_Datasource_type")},{title:x("Setup_the_Datasource")}],[j,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(0),[Z,y]=(0,a.useState)(),w=async e=>{b(1),null==m||m(),y(e)},k=e=>{f(e.type),b("knowledge"===r?2:1)},T=()=>{b("knowledge"===r?1:0)};return(0,s.jsxs)(n.default,{title:"knowledge"===r?"Add Knowledge":"Add Datasource",centered:!0,open:l,destroyOnClose:!0,onCancel:()=>{t(!1)},width:1e3,afterClose:()=>{b(0)},footer:null,children:[(0,s.jsx)(i.Z,{current:g,items:"knowledge"===r?p:_}),(()=>{let t="document"===r?g+1:g;return 0===t?(0,s.jsx)(h,{handleAddKnowledge:w}):(0,s.jsx)(N,{fetchDocuments:d,knowledgeName:(null==o?void 0:o.name)||Z,step:t,documentType:j,handleChooseType:k,handleBackBtn:T,setIsAddShow:e.setIsAddShow})})()]})}},92039:function(e,t,l){l.d(t,{Z:function(){return O},_:function(){return q}});var s=l(85893),a=l(67294),n=l(12069),i=l(83062),c=l(66309),r=l(85813),o=l(32983),d=l(71577),m=l(42075),u=l(96074),h=l(75081),x=l(27595),p=l(27329),_=l(68346),j=l(21640),f=l(31326),g=l(88008),b=l(27704),Z=l(24969),y=l(18754),N=l(50489),w=l(30381),k=l.n(w),T=l(78543),S=l(59566),P=l(71230),v=l(15746),C=l(39479),F=l(44442),I=l(67421),D=l(31545),E=l(6321);let{TextArea:A}=S.default;function V(e){let{knowledge:t,argumentsShow:l,setArgumentsShow:i}=e,{t:c}=(0,I.$G)(),[r,o]=(0,a.useState)(),[m,u]=(0,a.useState)(!1),x=async()=>{let[e,l]=await (0,N.Vx)((0,N.Tu)(t.name));o(l)};(0,a.useEffect)(()=>{x()},[]);let p=[{key:"Embedding",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{}),c("Embedding")]}),children:(0,s.jsxs)(P.Z,{gutter:24,children:[(0,s.jsx)(v.Z,{span:12,offset:0,children:(0,s.jsx)(C.Z.Item,{tooltip:c("the_top_k_vectors"),rules:[{required:!0}],label:c("topk"),name:["embedding","topk"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:c("Set_a_threshold_score"),rules:[{required:!0}],label:c("recall_score"),name:["embedding","recall_score"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_owner")})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:c("Recall_Type"),rules:[{required:!0}],label:c("recall_type"),name:["embedding","recall_type"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:c("A_model_used"),rules:[{required:!0}],label:c("model"),name:["embedding","model"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:c("The_size_of_the_data_chunks"),rules:[{required:!0}],label:c("chunk_size"),name:["embedding","chunk_size"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(v.Z,{span:12,children:(0,s.jsx)(C.Z.Item,{tooltip:c("The_amount_of_overlap"),rules:[{required:!0}],label:c("chunk_overlap"),name:["embedding","chunk_overlap"],children:(0,s.jsx)(S.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_description")})})})]})},{key:"Prompt",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(E.Z,{}),c("Embedding")]}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z.Item,{tooltip:c("A_contextual_parameter"),label:c("scene"),name:["prompt","scene"],children:(0,s.jsx)(A,{rows:4,className:"mb-2"})}),(0,s.jsx)(C.Z.Item,{tooltip:c("structure_or_format"),label:c("template"),name:["prompt","template"],children:(0,s.jsx)(A,{rows:7,className:"mb-2"})}),(0,s.jsx)(C.Z.Item,{tooltip:c("The_maximum_number_of_tokens"),label:c("max_token"),name:["prompt","max_token"],children:(0,s.jsx)(S.default,{className:"mb-2"})})]})}],_=async e=>{u(!0);let[l,s,a]=await (0,N.Vx)((0,N.iH)(t.name,{argument:JSON.stringify(e)}));u(!1),(null==a?void 0:a.success)&&i(!1)};return(0,s.jsx)(n.default,{width:850,open:l,onCancel:()=>{i(!1)},footer:null,children:(0,s.jsx)(h.Z,{spinning:m,children:(0,s.jsxs)(C.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{...r},autoComplete:"off",onFinish:_,children:[(0,s.jsx)(F.Z,{items:p}),(0,s.jsxs)("div",{className:"mt-3 mb-3",children:[(0,s.jsx)(d.ZP,{htmlType:"submit",type:"primary",className:"mr-6",children:c("Submit")}),(0,s.jsx)(d.ZP,{onClick:()=>{i(!1)},children:c("close")})]})]})})})}var z=l(11163);let{confirm:U}=n.default,q=e=>"TEXT"===e?(0,s.jsx)(x.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"}):"DOCUMENT"===e?(0,s.jsx)(p.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"}):(0,s.jsx)(_.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"});function O(e){let{t}=(0,I.$G)(),l=(0,z.useRouter)(),{knowledge:n,setDocumentCount:x}=e,[p,_]=(0,a.useState)(!1),[w,S]=(0,a.useState)([]),[P,v]=(0,a.useState)(!1),[C,F]=(0,a.useState)(!1),D=e=>{U({title:t("Tips"),icon:(0,s.jsx)(j.Z,{}),content:"".concat(t("Del_Document_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await O(e)}})};async function E(){_(!0);let[e,t]=await (0,N.Vx)((0,N._Q)(null==n?void 0:n.name,{page:1,page_size:20}));S(null==t?void 0:t.data),x(String(null==t?void 0:t.total)),_(!1)}let A=async(e,t)=>{await (0,N.Vx)((0,N.Hx)(e,{doc_ids:[t]}))},O=async e=>{await (0,N.Vx)((0,N.n3)(null==n?void 0:n.name,{doc_name:e.doc_name})),E()},L=()=>{v(!0)},G=(e,t)=>{let l;switch(e){case"TODO":l="gold";break;case"RUNNING":l="#2db7f5";break;case"FINISHED":l="#87d068";break;default:l="f50"}return(0,s.jsx)(i.Z,{title:t,children:(0,s.jsx)(c.Z,{color:l,children:e})})};return(0,a.useEffect)(()=>{E()},[n]),(0,s.jsxs)("div",{className:"collapse-container pt-2 px-4",children:[(0,s.jsxs)(m.Z,{children:[(0,s.jsx)(d.ZP,{size:"middle",type:"primary",className:"flex items-center",icon:(0,s.jsx)(Z.Z,{}),onClick:L,children:t("Add_Datasource")}),(0,s.jsx)(d.ZP,{size:"middle",className:"flex items-center mx-2",icon:(0,s.jsx)(y.Z,{}),onClick:()=>{F(!0)},children:"Arguments"})]}),(0,s.jsx)(u.Z,{}),(0,s.jsx)(h.Z,{spinning:p,children:w.length>0?(0,s.jsx)("div",{className:"max-h-96 mt-3 grid grid-cols-1 gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-3 xl:gap-x-5 overflow-auto",children:w.map(e=>(0,s.jsxs)(r.Z,{className:" dark:bg-[#484848] relative shrink-0 grow-0 cursor-pointer rounded-[10px] border border-gray-200 border-solid w-full",title:(0,s.jsx)(i.Z,{title:e.doc_name,children:(0,s.jsxs)("div",{className:"truncate ",children:[q(e.doc_type),(0,s.jsx)("span",{children:e.doc_name})]})}),extra:(0,s.jsxs)("div",{className:"mx-3",children:[(0,s.jsx)(i.Z,{title:"detail",children:(0,s.jsx)(f.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{l.push("/knowledge/".concat(n.name,"/").concat(e.id))}})}),(0,s.jsx)(i.Z,{title:"Sync",children:(0,s.jsx)(g.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{A(n.name,e.id)}})}),(0,s.jsx)(i.Z,{title:"Delete",children:(0,s.jsx)(b.Z,{className:"text-[#ff1b2e] !text-lg",onClick:()=>{D(e)}})})]}),children:[(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[t("Size"),":"]}),(0,s.jsxs)("p",{children:[e.chunk_size," chunks"]}),(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[t("Last_Synch"),":"]}),(0,s.jsx)("p",{children:k()(e.last_sync).format("YYYY-MM-DD HH:MM:SS")}),(0,s.jsx)("p",{className:"mt-2 mb-2",children:G(e.status,e.result)})]},e.id))}):(0,s.jsx)(o.Z,{image:o.Z.PRESENTED_IMAGE_DEFAULT,children:(0,s.jsx)(d.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,s.jsx)(Z.Z,{}),onClick:L,children:"Create Now"})})}),(0,s.jsx)(T.Z,{syncDocuments:A,fetchDocuments:E,setIsAddShow:v,isAddShow:P,type:"document",setDocuments:S,knowLedge:n}),(0,s.jsx)(V,{knowledge:n,argumentsShow:C,setArgumentsShow:F})]})}}}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/pages/_app-0e8330de38c03c5c.js b/pilot/server/static/_next/static/chunks/pages/_app-e86697c1b3c2f440.js similarity index 100% rename from pilot/server/static/_next/static/chunks/pages/_app-0e8330de38c03c5c.js rename to pilot/server/static/_next/static/chunks/pages/_app-e86697c1b3c2f440.js diff --git a/pilot/server/static/_next/static/chunks/webpack-2e50ecf954b8023b.js b/pilot/server/static/_next/static/chunks/webpack-d3a85272b0e75370.js similarity index 74% rename from pilot/server/static/_next/static/chunks/webpack-2e50ecf954b8023b.js rename to pilot/server/static/_next/static/chunks/webpack-d3a85272b0e75370.js index 53726b45d..7587b758b 100644 --- a/pilot/server/static/_next/static/chunks/webpack-2e50ecf954b8023b.js +++ b/pilot/server/static/_next/static/chunks/webpack-d3a85272b0e75370.js @@ -1 +1 @@ -!function(){"use strict";var e,t,n,r,o,u,i,a,c,f,d,s,l={},b={};function p(e){var t=b[e];if(void 0!==t)return t.exports;var n=b[e]={id:e,loaded:!1,exports:{}},r=!0;try{l[e].call(n.exports,n,n.exports,p),r=!1}finally{r&&delete b[e]}return n.loaded=!0,n.exports}p.m=l,p.amdO={},e=[],p.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u=o&&Object.keys(p.O).every(function(e){return p.O[e](n[c])})?n.splice(c--,1):(a=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u=o&&Object.keys(p.O).every(function(e){return p.O[e](n[a])})?n.splice(a--,1):(c=!1,o
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/chat/[scene]/[id]/index.html b/pilot/server/static/chat/[scene]/[id]/index.html index 663999144..5d44056db 100644 --- a/pilot/server/static/chat/[scene]/[id]/index.html +++ b/pilot/server/static/chat/[scene]/[id]/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/chat/index.html b/pilot/server/static/chat/index.html index 9fc16a7a5..bf959b9e9 100644 --- a/pilot/server/static/chat/index.html +++ b/pilot/server/static/chat/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/database/index.html b/pilot/server/static/database/index.html index 35bf9e01a..56fc6ad7a 100644 --- a/pilot/server/static/database/index.html +++ b/pilot/server/static/database/index.html @@ -1 +1 @@ -
MySQL

MySQL

Comming soon

Fast, reliable, scalable open-source relational database management system.

MSSQL

MSSQL

Comming soon

Powerful, scalable, secure relational database system by Microsoft.

DuckDB

DuckDB

Comming soon

In-memory analytical database with efficient query processing.

Sqlite

Sqlite

Comming soon

Lightweight embedded relational database with simplicity and portability.

ClickHouse

ClickHouse

Comming soon

Columnar database for high-performance analytics and real-time queries.

Oracle

Oracle

Comming soon

Robust, scalable, secure relational database widely used in enterprises.

Access

Access

Comming soon

Easy-to-use relational database for small-scale applications by Microsoft.

MongoDB

MongoDB

Comming soon

Flexible, scalable NoSQL document database for web and mobile apps.

DB2

DB2

Comming soon

Scalable, secure relational database system developed by IBM.

HBase

HBase

Comming soon

Distributed, scalable NoSQL database for large structured/semi-structured data.

Redis

Redis

Comming soon

Fast, versatile in-memory data structure store as cache, DB, or broker.

Cassandra

Cassandra

Comming soon

Scalable, fault-tolerant distributed NoSQL database for large data.

Couchbase

Couchbase

Comming soon

High-performance NoSQL document database with distributed architecture.

PostgreSQL

PostgreSQL

Comming soon

Powerful open-source relational database with extensibility and SQL standards.

Spark

Spark

Comming soon

Unified engine for large-scale data analytics.

\ No newline at end of file +
MySQL

MySQL

Comming soon

Fast, reliable, scalable open-source relational database management system.

MSSQL

MSSQL

Comming soon

Powerful, scalable, secure relational database system by Microsoft.

DuckDB

DuckDB

Comming soon

In-memory analytical database with efficient query processing.

Sqlite

Sqlite

Comming soon

Lightweight embedded relational database with simplicity and portability.

ClickHouse

ClickHouse

Comming soon

Columnar database for high-performance analytics and real-time queries.

Oracle

Oracle

Comming soon

Robust, scalable, secure relational database widely used in enterprises.

Access

Access

Comming soon

Easy-to-use relational database for small-scale applications by Microsoft.

MongoDB

MongoDB

Comming soon

Flexible, scalable NoSQL document database for web and mobile apps.

DB2

DB2

Comming soon

Scalable, secure relational database system developed by IBM.

HBase

HBase

Comming soon

Distributed, scalable NoSQL database for large structured/semi-structured data.

Redis

Redis

Comming soon

Fast, versatile in-memory data structure store as cache, DB, or broker.

Cassandra

Cassandra

Comming soon

Scalable, fault-tolerant distributed NoSQL database for large data.

Couchbase

Couchbase

Comming soon

High-performance NoSQL document database with distributed architecture.

PostgreSQL

PostgreSQL

Comming soon

Powerful open-source relational database with extensibility and SQL standards.

Spark

Spark

Comming soon

Unified engine for large-scale data analytics.

\ No newline at end of file diff --git a/pilot/server/static/index.html b/pilot/server/static/index.html index 1efdad899..be94bd42f 100644 --- a/pilot/server/static/index.html +++ b/pilot/server/static/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/knowledge/[knowledgeName]/[id]/index.html b/pilot/server/static/knowledge/[knowledgeName]/[id]/index.html index 1a690829c..17ffc40a6 100644 --- a/pilot/server/static/knowledge/[knowledgeName]/[id]/index.html +++ b/pilot/server/static/knowledge/[knowledgeName]/[id]/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/knowledge/index.html b/pilot/server/static/knowledge/index.html index fd320b235..f4e922c4e 100644 --- a/pilot/server/static/knowledge/index.html +++ b/pilot/server/static/knowledge/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/models/index.html b/pilot/server/static/models/index.html index b32a9ccc9..b66b5b43c 100644 --- a/pilot/server/static/models/index.html +++ b/pilot/server/static/models/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/prompt/index.html b/pilot/server/static/prompt/index.html index fcc3522e1..64c00c110 100644 --- a/pilot/server/static/prompt/index.html +++ b/pilot/server/static/prompt/index.html @@ -1 +1 @@ -
NameSceneSub SceneContentOperation
No data
\ No newline at end of file +
NameSceneSub SceneContentOperation
No data
\ No newline at end of file