(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-542a55d2"],{"1c4c":function(t,e,a){"use strict";a.d(e,"c",(function(){return o})),a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return r}));var n=a("b775");function o(t){return Object(n["a"])({url:"/source/data/search",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/source/data/info",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/source/data/find",method:"post",data:t})}},"1cc6":function(t,e,a){"use strict";a("2cb8")},"2cb8":function(t,e,a){},f67b:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-formual"},[a("el-form",[a("el-form-item",[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择模型",size:"large"},on:{change:t.onChangeTab},model:{value:t.tableCode,callback:function(e){t.tableCode=e},expression:"tableCode"}},[a("el-option",{attrs:{label:"测试模型",value:0}})],1)],1),a("el-form-item",[t.showSearch?a("el-input",{on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.retrieval(e)}},model:{value:t.dataIntro,callback:function(e){t.dataIntro=e},expression:"dataIntro"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.retrieval},slot:"append"})],1):t._e()],1),t.fileLoadStatus?a("el-form-item",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"min-height":"200px"}},[a("div",[t._v("当前回答内容："+t._s(t.textInfo))]),a("div",{staticClass:"dialog-footer",staticStyle:{display:"flex","justify-content":"flex-end"}},[a("el-button",{attrs:{type:"primary"},on:{click:t.onConfirm}},[t._v(" 确认选择 ")])],1)]):t._e()],1)],1)},o=[],i=a("c7eb"),r=a("1da1"),s=a("1c4c"),c=a("bc3a"),l=a.n(c),u={name:"SourceAi",emits:["onPicked"],components:{},data:function(){return{tableCode:"",tableList:[],showConfirm:!1,fileLoadStatus:!1,showSearch:!1,position:{tb:"",c:0,r:0,sheet:"",value:""},dataIntro:"",textInfo:"",loading:!1,searchResult:{}}},mounted:function(){this.initTableList()},methods:{retrieval:function(){var t=this;return Object(r["a"])(Object(i["a"])().mark((function e(){var a;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.fileLoadStatus=!0,t.loading=!0,e.prev=2,e.next=5,l.a.post("http://58.246.234.210:7860/api/v1/run/c7ea3a2d-f50c-4936-b96c-3fe7c34fa062?stream=false",{input_value:t.dataIntro,output_type:"chat",input_type:"chat",tweaks:{"ChatInput-MbQRf":{},"ParseData-UiiZo":{},"Prompt-L8PiG":{},"ChatOutput-MdiWR":{},"SplitText-JIbWW":{},"File-1i88L":{},"OllamaEmbeddings-4TSqH":{},"Milvus-Wotjl":{},"OllamaModel-j2Vj0":{},"Milvus-fivEN":{},"OllamaEmbeddings-e409J":{}}},{headers:{"Content-Type":"application/json"}});case 5:a=e.sent,200===a.status&&(t.textInfo=a.data.outputs[0].outputs[0].results.message.data.text,t.searchResult={searchTerm:t.dataIntro,result:t.textInfo}),e.next=13;break;case 9:e.prev=9,e.t0=e["catch"](2),console.error("Error during retrieval:",e.t0),t.$message.error("检索失败，请稍后重试");case 13:return e.prev=13,t.loading=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,9,13,16]])})))()},onConfirm:function(t){this.$emit("onPicked",this.searchResult)},onChangeTab:function(t){var e=this;e.showSearch=!0},initTableList:function(){var t=this;Object(s["c"])({page:1,pageSize:999,status:5}).then((function(e){200==e.status&&(t.tableList=e.data.dataList)}))}}},d=u,f=(a("1cc6"),a("2877")),p=Object(f["a"])(d,n,o,!1,null,null,null);e["default"]=p.exports}}]);