Files
aiot-platform-ui/apps/web-antd/dist/js/index-sS4P0cZP.js

2 lines
620 B
JavaScript

import{aq as t,a5 as i,bC as c}from"./bootstrap-DsjPfOC_.js";import{f as p}from"./fetch-ByP_rkuS.js";const u={VITE_GLOB_API_URL:"/admin-api"},{apiURL:m}=c(u,!0),g=i();function f({data:e,onClose:r,onMessage:n,onError:a,ctrl:o}){const s=g.accessToken;return p(`${m}/ai/write/generate-stream`,{method:"post",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`},openWhenHidden:!0,body:JSON.stringify(e),onmessage:n,onerror:a,onclose:r,signal:o.signal})}function l(e){return t.get("/ai/write/page",{params:e})}function h(e){return t.delete("/ai/write/delete",{params:{id:e}})}export{h as d,l as g,f as w};