knowledge-QEeGwCU7.js 3.3 KB

1
  1. import{H as t}from"./index-BuZ8RqOW.js";function a(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 d(e){return t({url:`/dify/console/api/apps/${e}`,method:"delete"})}function c(e,o){return t({url:`/dify/console/api/apps/${e}`,method:"put",data:o})}function s(e){return t({url:"/rgflow/v1/dialog/set",method:"post",data:e})}function i(e){return t({url:"/rgflow/v1/dialog/rm",method:"post",data:e})}function m(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 f(e){return t({url:`/rgflow/v1/dialog/get?dialog_id=${e}`,method:"get"})}function h(e){return t({url:"/rgflow/v1/kb/create",method:"post",data:{name:e}})}function p(){return t({url:"/rgflow/v1/kb/list",method:"get"})}function w(e){return t({url:"/rgflow/v1/kb/detail",method:"get",params:e})}function k(e){return t({url:"/rgflow/v1/document/list",method:"get",params:e})}function v(e){return t({url:"/rgflow/v1/kb/rm",method:"post",data:e})}function b(e){return t({url:"/rgflow/v1/document/rm",method:"post",data:e})}function y(e){return t({url:"/rgflow/v1/document/run",method:"post",data:e})}function $(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 D(e){return t({url:"/rgflow/v1/document/change_parser",method:"post",data:e})}function F(e){return t({url:"/rgflow/v1/chunk/create",method:"post",data:e})}function q(e){return t({url:"/rgflow/v1/chunk/list",method:"post",data:e})}function C(e){return t({url:"/rgflow/v1/chunk/switch",method:"post",data:e})}function L(e){return t({url:"/rgflow/v1/chunk/rm",method:"post",data:e})}function S(e){return t({url:"/rgflow/v1/chunk/get",method:"get",params:e})}function x(e){return t({url:"/rgflow/v1/chunk/set",method:"post",data:e})}function E(e){return t({url:"/rgflow/v1/chunk/retrieval_test",method:"post",data:e})}function O(e){return t({url:"/rgflow/v1/document/rename",method:"post",data:e})}function R(e){return t({url:"/rgflow/v1/llm/my_llms",method:"get",params:e})}function j(e){return t({url:"/rgflow/v1/kb/update",method:"post",data:e})}function I(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 z(e){return t({url:"/api/knowledge/create",method:"post",data:e})}function A(e){return t({url:`/api/knowledge/delete?knowledgeId=${e}`,method:"get"})}function B(e){return t({url:`/api/knowledge/sync?knowledgeId=${e}`,method:"get"})}function G(e,o){return t({url:"/api/knowledge/update_icon",method:"put",data:{id:e,icon:o}})}export{p as A,_ as B,y as C,b as D,K as E,$ as F,k as G,w as H,s as a,f as b,a as c,d,i as e,h as f,I as g,z as h,G as i,v as j,A as k,m as l,O as m,R as n,j as o,E as p,g as q,F as r,B as s,x as t,c as u,D as v,C as w,q as x,S as y,L as z};