import{cU as p,M as h,dO as d,dP as $}from"./index-DHiyXWqE.js";const f=(t,e,r)=>{const n=t.modelServerInferencePath;if(t.modelServer===p.VLLM){const s=e.startsWith("/")?e:`/${e}`;return`${n}${s}`}if(!t.modelName){const s=e.startsWith("/")?e:`/${e}`;return`${n}${s}`}return`${n}:${e}`},m=(t,e)=>`${t.hopsworksInferencePath}:${e}/test`,y=(t,e,r)=>{const n=f(t,e);return`/v1/${r}/${t.name}${n}`},l=h.injectEndpoints({endpoints:t=>({runTestDeployment:t.mutation({async queryFn({host:e,deployment:r,verb:n,content:s,projectName:o,method:a},i,I,P){const u=new d("",e),c=o?y(r,n,o):m(r,n);return await u.rtkQuery({url:c,data:s,headers:{"Content-Type":"application/json"},method:a??$.post},i,{skipError:!0})}}),getInferenceEndpoints:t.query({query:()=>({url:"serving/endpoints"})})})}),{useRunTestDeploymentMutation:k,useGetInferenceEndpointsQuery:E}=l;export{k as a,y as g,E as u};
