knowledge-BehHb3pH.js 3.3 KB

1
  1. import{K as t}from"./index-CdX63BAb.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 I(e){return t({url:"/api/knowledge/create",method:"post",data:e})}function z(e){return t({url:`/api/knowledge/delete?knowledgeId=${e}`,method:"get"})}function A(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{y as A,p as B,d as C,c as D,m as E,a as F,s as G,I as a,z as b,f as c,k as d,E as e,R as f,j as g,O as h,x as i,D as j,i as k,S as l,_ as m,L as n,q as o,F as p,g as q,C as r,A as s,h as t,B as u,w as v,$ as w,b as x,v as y,K as z};