knowledge-DFwr_W8F.js 3.3 KB

1
  1. import{A as t}from"./index-DA4TjoSG.js";function d(e){const o={icon_type:"emoji",icon:"🤖",icon_background:"#FFEAD5"};return o.mode=e.mode,o.name=e.name,o.description=e.description,t({url:"/dify/console/api/apps",method:"post",data:o})}function a(e){return t({url:`/dify/console/api/apps/${e}`,method:"delete"})}function c(e){return t({url:"/rgflow/v1/dialog/set",method:"post",data:e})}function s(e){return t({url:"/rgflow/v1/dialog/rm",method:"post",data:e})}function i(e){return t({url:"/rgflow/v1/document/upload",method:"post",data:e,headers:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}.headers})}function g(){return t({url:"/rgflow/v1/llm/list",method:"get"})}function m(e){return t({url:`/rgflow/v1/dialog/get?dialog_id=${e}`,method:"get"})}function f(e){return t({url:"/rgflow/v1/kb/create",method:"post",data:{name:e}})}function h(){return t({url:"/rgflow/v1/kb/list",method:"get"})}function w(e){return t({url:"/rgflow/v1/kb/detail",method:"get",params:e})}function p(e){return t({url:"/rgflow/v1/document/list",method:"get",params:e})}function k(e){return t({url:"/rgflow/v1/kb/rm",method:"post",data:e})}function v(e){return t({url:"/rgflow/v1/document/rm",method:"post",data:e})}function b(e){return t({url:"/rgflow/v1/document/run",method:"post",data:e})}function y(e){return t({url:"/rgflow/v1/document/change_status",method:"post",data:e})}const K=({url:e,filename:o,target:r})=>{const n=document.createElement("a");n.style.display="none",n.href=e,r&&(n.target="_blank"),n.rel="noopener noreferrer",o&&(n.download=o),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function $(e){return t({url:"/rgflow/v1/document/change_status",method:"post",data:e})}function _(e){return t({url:"/rgflow/v1/document/change_parser",method:"post",data:e})}function D(e){return t({url:"/rgflow/v1/chunk/create",method:"post",data:e})}function F(e){return t({url:"/rgflow/v1/chunk/list",method:"post",data:e})}function q(e){return t({url:"/rgflow/v1/chunk/switch",method:"post",data:e})}function C(e){return t({url:"/rgflow/v1/chunk/rm",method:"post",data:e})}function L(e){return t({url:"/rgflow/v1/chunk/get",method:"get",params:e})}function S(e){return t({url:"/rgflow/v1/chunk/set",method:"post",data:e})}function x(e){return t({url:"/rgflow/v1/chunk/retrieval_test",method:"post",data:e})}function E(e){return t({url:"/rgflow/v1/document/rename",method:"post",data:e})}function O(e){return t({url:"/rgflow/v1/llm/my_llms",method:"get",params:e})}function R(e){return t({url:"/rgflow/v1/kb/update",method:"post",data:e})}function j(e,o,r,n="0"){const u=n=="1"?`/api/knowledge/list?current=${e}&pageSize=${o}&keyword=${r}&location=${n}`:`/api/knowledge/list?current=${e}&pageSize=${o}&keyword=${r}`;return t({url:u,method:"get"})}function A(e){return t({url:"/api/knowledge/create",method:"post",data:e})}function I(e){return t({url:`/api/knowledge/delete?knowledgeId=${e}`,method:"get"})}function z(e){return t({url:`/api/knowledge/sync?knowledgeId=${e}`,method:"get"})}function B(e,o){return t({url:"/api/knowledge/update_icon",method:"put",data:{id:e,icon:o}})}export{w as A,$ as B,b as C,v as D,K as E,y as F,p as G,c as a,m as b,d as c,a as d,s as e,f,j as g,A as h,k as i,I as j,i as k,E as l,R as m,O as n,x as o,D as p,g as q,S as r,z as s,_ as t,B as u,L as v,q as w,F as x,C as y,h as z};