PageSourceSearch

https://kserve-fms-openwebui.hf.space/_app/immutable/nodes/31.3aaMPNXn.js

js kserve-fms-openwebui.hf.space collected 2026-10-03 17:03:57 UTC 3,991 bytes, 4 lines download raw bytes

1import"../chunks/CWj6FrbW.js";import"../chunks/69_IOA4Y.js";import{p as ee,g as te,o as oe,t as v,l as r,a as g,b as ae,s as se,c as l,n as E,k as n,f as b,e as p,m as x,aX as re,r as a,d as j,q}from"../chunks/Djt4fO9t.js";import{i as le}from"../chunks/DresXHHc.js";import{e as ie,i as ne}from"../chunks/CioKlagv.js";import{f as de,a as ce}from"../chunks/C22PTw-J.js";import{b as fe}from"../chunks/DTAaEhCL.js";import{b as pe}from"../chunks/CFvwO0iM.js";import{i as me}from"../chunks/BqaakOp7.js";import"../chunks/CDvT-V1T.js";import{g as ue}from"../chunks/BwKtPiAG.js";import{a as ve}from"../chunks/QGuclOcQ.js";import{u as ge,b as xe,c as be,a as _e}from"../chunks/Di7fgO1t.js";import{c as he}from"../chunks/Cg0QFnFM.js";import{s as ye}from"../chunks/DvLK6xgF.js";import{S as we}from"../chunks/B8AXWb8I.js";var ke=b('<option class="bg-gray-50 dark:bg-gray-700"> </option>'),$e=b('<button class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-lg"> </button>'),Se=b('<button class="px-3.5 py-1.5 text-sm font-medium bg-gray-300 text-black transition rounded-lg flex items-center gap-2"><!> </button>'),Re=b('<div class=" flex flex-col justify-between w-full overflow-y-auto h-full"><div class="mx-auto w-full md:px-0 h-full"><div class=" flex flex-col h-full px-4"><div class=" pt-0.5 pb-2.5 flex flex-col justify-between w-full flex-auto overflow-auto h-0" id="messages-container"><div class=" h-full w-full flex flex-col"><div class="flex-1"><textarea id="text-completion-textarea" class="w-full h-full p-3 bg-transparent border border-gray-100/30 dark:border-gray-850/30 outline-hidden resize-none rounded-lg text-sm"></textarea></div></div></div> <div class="pb-3 flex justify-between items-center"><div class="flex-1"><select class="bg-transparent border border-gray-100/30 dark:border-gray-850/30 rounded-lg py-1 px-2 -mx-0.5 text-sm outline-hidden w-full"></select></div> <div class="flex gap-2 shrink-0 ml-2"><!></div></div></div></div></div>');function Ce(_,F){ee(F,!1);const B=()=>p(_e,"$models",c),J=()=>p(ge,"$user",c),H=()=>p(xe,"$settings",c),N=()=>p(be,"$config",c),h=()=>p(W,"$i18n",c),[c,L]=se(),W=te("i18n");let f=x(""),d=x(""),y=x(!1),m=!1,w=x();const X=()=>{const e=r(w);e&&(e.scrollTop=e==null?void 0:e.scrollHeight)},Y=()=>{m=!0},G=async()=>{const e=B().find(s=>s.id===r(d)),[t,o]=await he(localStorage.token,{model:e.id,stream:!0,messages:[{role:"assistant",content:r(f)}]},`${ve}/api`);if(t&&t.ok){const s=t.body.pipeThrough(new TextDecoderStream).pipeThrough(ye(`
2`)).getReader();for(;;){const{value:i,done:Z}=await s.read();if(Z||m){m&&o.abort("User: Stop Response");break}try{let C=i.split(`
3`);for(const T of C)if(T!==""&&!T.includes("[DONE]")){let O=JSON.parse(T.replace(/^data: /,""));n(f,r(f)+(O.choices[0].delta.content??""))}}catch(C){}X()}}},K=async()=>{r(d)&&(n(y,!0),await G(),n(y,!1),m=!1)};oe(async()=>{var e,t,o,s,i;((e=J())==null?void 0:e.role)!=="admin"&&await ue("/"),(t=H())!=null&&t.models?n(d,(o=H())==null?void 0:o.models[0]):(s=N())!=null&&s.default_models?n(d,(i=N())==null?void 0:i.default_models.split(",")[0]):n(d,"")}),me();var k=Re(),U=l(k),z=l(U),$=l(z),A=l($),D=l(A),u=l(D);re(u),pe(u,e=>n(w,e),()=>r(w)),a(D),a(A),a($);var I=E($,2),S=l(I),R=l(S);ie(R,5,B,ne,(e,t)=>{var o=ke(),s=l(o,!0);a(o);var i={};v(()=>{j(s,r(t).name),i!==(i=r(t).id)&&(o.value=(o.__value=r(t).id)??"")}),g(e,o)}),a(R),a(S);var M=E(S,2),P=l(M);{var Q=e=>{var t=$e(),o=l(t,!0);a(t),v(s=>j(o,s),[()=>h().t("Run")]),q("click",t,()=>{K()}),g(e,t)},V=e=>{var t=Se(),o=l(t);we(o,{className:"size-4"});var s=E(o);a(t),v(i=>j(s,` ${i??""}`),[()=>h().t("Cancel")]),q("click",t,()=>{Y()}),g(e,t)};le(P,e=>{r(y)?e(V,-1):e(Q)})}a(M),a(I),a(z),a(U),a(k),v(e=>ce(u,"placeholder",e),[()=>h().t("You're a helpful assistant.")]),fe(u,()=>r(f),e=>n(f,e)),de(R,()=>r(d),e=>n(d,e)),g(_,k),ae(),L()}function Le(_){Ce(_,{})}export{Le as component};
4//# sourceMappingURL=31.3aaMPNXn.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.