Buckets:

rtrm's picture
download
raw
7.95 kB
import{s as Ae,n as Se,o as Ie}from"../chunks/scheduler.6efaaf90.js";import{S as ke,i as Ue,e as a,s as l,c as r,h as Ee,a as s,d as n,b as o,f as ye,g as m,j as u,k as He,l as Oe,m as i,n as p,t as f,o as $,p as d}from"../chunks/index.eb3e1f0f.js";import{C as Re,H as c,E as qe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.4a7651cc.js";import{C as je}from"../chunks/CodeBlock.f3ed5268.js";function ze(ge){let g,D,B,K,h,J,v,W,w,he="This document provides a high-level overview of the Chat UI codebase. If you’re looking to contribute or understand how the codebase works, this is the place for you!",F,M,N,T,ve='Chat UI provides a simple interface connecting LLMs to external tools via MCP. The project uses <a href="https://www.mongodb.com/" rel="nofollow">MongoDB</a> and <a href="https://kit.svelte.dev/" rel="nofollow">SvelteKit</a> with <a href="https://tailwindcss.com/" rel="nofollow">Tailwind</a>.',Q,x,we="Key architectural decisions:",V,C,Me="<li><strong>OpenAI-compatible only</strong>: All model interactions use the OpenAI API format</li> <li><strong>MCP for tools</strong>: Tool calling is handled via Model Context Protocol servers</li> <li><strong>Auto-discovery</strong>: Models are discovered from the <code>/models</code> endpoint</li>",X,_,Y,b,Z,L,Te="All routes rendered with SSR via SvelteKit. The majority of backend and frontend logic lives here, with shared modules in <code>lib</code> (client) and <code>lib/server</code> (server).",ee,P,te,y,xe="Provides a standard interface for chat features including model output, tool calls, and streaming. Outputs <code>MessageUpdate</code>s for fine-grained status updates (new tokens, tool results, etc.).",ne,H,ie,A,Ce="Provides the streaming interface for OpenAI-compatible endpoints. Models are fetched and cached from <code>${OPENAI_BASE_URL}/models</code>.",le,S,oe,I,_e='Implements MCP client functionality for tool discovery and execution. See <a href="../configuration/mcp-tools">MCP Tools</a> for configuration.',ae,k,se,U,be='Intelligent routing logic that selects the best model for each request. Uses the Arch router model for classification. See <a href="../configuration/llm-router">LLM Router</a> for details.',re,E,me,O,Le="MongoDB migrations for maintaining backwards compatibility across schema changes. Any schema changes must include a migration.",pe,R,fe,q,$e,j,Pe="The dev server runs at <code>http://localhost:5173</code> with hot reloading.",de,z,ue,G,ce;return h=new Re({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),v=new c({props:{title:"Architecture",local:"architecture",headingTag:"h1"}}),M=new c({props:{title:"Overview",local:"overview",headingTag:"h2"}}),_=new c({props:{title:"Code Map",local:"code-map",headingTag:"h2"}}),b=new c({props:{title:"routes",local:"routes",headingTag:"h3"}}),P=new c({props:{title:"textGeneration",local:"textgeneration",headingTag:"h3"}}),H=new c({props:{title:"endpoints",local:"endpoints",headingTag:"h3"}}),S=new c({props:{title:"mcp",local:"mcp",headingTag:"h3"}}),k=new c({props:{title:"llmRouter",local:"llmrouter",headingTag:"h3"}}),E=new c({props:{title:"migrations",local:"migrations",headingTag:"h3"}}),R=new c({props:{title:"Development",local:"development",headingTag:"h2"}}),q=new je({props:{code:"bnBtJTIwaW5zdGFsbCUwQW5wbSUyMHJ1biUyMGRldg==",highlighted:`npm install
npm run dev`,wrap:!1}}),z=new qe({props:{source:"https://github.com/huggingface/chat-ui/blob/main/docs/source/developing/architecture.md"}}),{c(){g=a("meta"),D=l(),B=a("p"),K=l(),r(h.$$.fragment),J=l(),r(v.$$.fragment),W=l(),w=a("p"),w.textContent=he,F=l(),r(M.$$.fragment),N=l(),T=a("p"),T.innerHTML=ve,Q=l(),x=a("p"),x.textContent=we,V=l(),C=a("ul"),C.innerHTML=Me,X=l(),r(_.$$.fragment),Y=l(),r(b.$$.fragment),Z=l(),L=a("p"),L.innerHTML=Te,ee=l(),r(P.$$.fragment),te=l(),y=a("p"),y.innerHTML=xe,ne=l(),r(H.$$.fragment),ie=l(),A=a("p"),A.innerHTML=Ce,le=l(),r(S.$$.fragment),oe=l(),I=a("p"),I.innerHTML=_e,ae=l(),r(k.$$.fragment),se=l(),U=a("p"),U.innerHTML=be,re=l(),r(E.$$.fragment),me=l(),O=a("p"),O.textContent=Le,pe=l(),r(R.$$.fragment),fe=l(),r(q.$$.fragment),$e=l(),j=a("p"),j.innerHTML=Pe,de=l(),r(z.$$.fragment),ue=l(),G=a("p"),this.h()},l(e){const t=Ee("svelte-u9bgzb",document.head);g=s(t,"META",{name:!0,content:!0}),t.forEach(n),D=o(e),B=s(e,"P",{}),ye(B).forEach(n),K=o(e),m(h.$$.fragment,e),J=o(e),m(v.$$.fragment,e),W=o(e),w=s(e,"P",{"data-svelte-h":!0}),u(w)!=="svelte-1vxaips"&&(w.textContent=he),F=o(e),m(M.$$.fragment,e),N=o(e),T=s(e,"P",{"data-svelte-h":!0}),u(T)!=="svelte-1artity"&&(T.innerHTML=ve),Q=o(e),x=s(e,"P",{"data-svelte-h":!0}),u(x)!=="svelte-uxw62z"&&(x.textContent=we),V=o(e),C=s(e,"UL",{"data-svelte-h":!0}),u(C)!=="svelte-16gq00j"&&(C.innerHTML=Me),X=o(e),m(_.$$.fragment,e),Y=o(e),m(b.$$.fragment,e),Z=o(e),L=s(e,"P",{"data-svelte-h":!0}),u(L)!=="svelte-w8mm60"&&(L.innerHTML=Te),ee=o(e),m(P.$$.fragment,e),te=o(e),y=s(e,"P",{"data-svelte-h":!0}),u(y)!=="svelte-q7jolv"&&(y.innerHTML=xe),ne=o(e),m(H.$$.fragment,e),ie=o(e),A=s(e,"P",{"data-svelte-h":!0}),u(A)!=="svelte-1o44yzy"&&(A.innerHTML=Ce),le=o(e),m(S.$$.fragment,e),oe=o(e),I=s(e,"P",{"data-svelte-h":!0}),u(I)!=="svelte-1vx0lbk"&&(I.innerHTML=_e),ae=o(e),m(k.$$.fragment,e),se=o(e),U=s(e,"P",{"data-svelte-h":!0}),u(U)!=="svelte-13q5ws6"&&(U.innerHTML=be),re=o(e),m(E.$$.fragment,e),me=o(e),O=s(e,"P",{"data-svelte-h":!0}),u(O)!=="svelte-12qn90e"&&(O.textContent=Le),pe=o(e),m(R.$$.fragment,e),fe=o(e),m(q.$$.fragment,e),$e=o(e),j=s(e,"P",{"data-svelte-h":!0}),u(j)!=="svelte-g2mtn6"&&(j.innerHTML=Pe),de=o(e),m(z.$$.fragment,e),ue=o(e),G=s(e,"P",{}),ye(G).forEach(n),this.h()},h(){He(g,"name","hf:doc:metadata"),He(g,"content",Be)},m(e,t){Oe(document.head,g),i(e,D,t),i(e,B,t),i(e,K,t),p(h,e,t),i(e,J,t),p(v,e,t),i(e,W,t),i(e,w,t),i(e,F,t),p(M,e,t),i(e,N,t),i(e,T,t),i(e,Q,t),i(e,x,t),i(e,V,t),i(e,C,t),i(e,X,t),p(_,e,t),i(e,Y,t),p(b,e,t),i(e,Z,t),i(e,L,t),i(e,ee,t),p(P,e,t),i(e,te,t),i(e,y,t),i(e,ne,t),p(H,e,t),i(e,ie,t),i(e,A,t),i(e,le,t),p(S,e,t),i(e,oe,t),i(e,I,t),i(e,ae,t),p(k,e,t),i(e,se,t),i(e,U,t),i(e,re,t),p(E,e,t),i(e,me,t),i(e,O,t),i(e,pe,t),p(R,e,t),i(e,fe,t),p(q,e,t),i(e,$e,t),i(e,j,t),i(e,de,t),p(z,e,t),i(e,ue,t),i(e,G,t),ce=!0},p:Se,i(e){ce||(f(h.$$.fragment,e),f(v.$$.fragment,e),f(M.$$.fragment,e),f(_.$$.fragment,e),f(b.$$.fragment,e),f(P.$$.fragment,e),f(H.$$.fragment,e),f(S.$$.fragment,e),f(k.$$.fragment,e),f(E.$$.fragment,e),f(R.$$.fragment,e),f(q.$$.fragment,e),f(z.$$.fragment,e),ce=!0)},o(e){$(h.$$.fragment,e),$(v.$$.fragment,e),$(M.$$.fragment,e),$(_.$$.fragment,e),$(b.$$.fragment,e),$(P.$$.fragment,e),$(H.$$.fragment,e),$(S.$$.fragment,e),$(k.$$.fragment,e),$(E.$$.fragment,e),$(R.$$.fragment,e),$(q.$$.fragment,e),$(z.$$.fragment,e),ce=!1},d(e){e&&(n(D),n(B),n(K),n(J),n(W),n(w),n(F),n(N),n(T),n(Q),n(x),n(V),n(C),n(X),n(Y),n(Z),n(L),n(ee),n(te),n(y),n(ne),n(ie),n(A),n(le),n(oe),n(I),n(ae),n(se),n(U),n(re),n(me),n(O),n(pe),n(fe),n($e),n(j),n(de),n(ue),n(G)),n(g),d(h,e),d(v,e),d(M,e),d(_,e),d(b,e),d(P,e),d(H,e),d(S,e),d(k,e),d(E,e),d(R,e),d(q,e),d(z,e)}}}const Be='{"title":"Architecture","local":"architecture","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Code Map","local":"code-map","sections":[{"title":"routes","local":"routes","sections":[],"depth":3},{"title":"textGeneration","local":"textgeneration","sections":[],"depth":3},{"title":"endpoints","local":"endpoints","sections":[],"depth":3},{"title":"mcp","local":"mcp","sections":[],"depth":3},{"title":"llmRouter","local":"llmrouter","sections":[],"depth":3},{"title":"migrations","local":"migrations","sections":[],"depth":3}],"depth":2},{"title":"Development","local":"development","sections":[],"depth":2}],"depth":1}';function Ge(ge){return Ie(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fe extends ke{constructor(g){super(),Ue(this,g,Ge,ze,Ae,{})}}export{Fe as component};

Xet Storage Details

Size:
7.95 kB
·
Xet hash:
29d9c10edaf104e2aa71f6080b7d4833a68e1156ed105abace4696b0e74aec2d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.