chat-ui (huggingface/chat-ui)

Searching Database…

What is this?Chat UI is the open-source chat interface that powers Hugging Face's HuggingChat app at hf.co/chat. It's a self-hostable SvelteKit web app for talking to LLMs through any OpenAI-compatible API.
Is this a library I import, or a standalone app I run?It's a standalone self-hosted web application built with SvelteKit, not a library — you deploy it (via npm or Docker) and point it at an OpenAI-compatible model endpoint.
How do I get it running?Create a .env.local file with OPENAI_BASE_URL and OPENAI_API_KEY pointing at an OpenAI-compatible endpoint (e.g. HF Inference Providers, llama.cpp, Ollama, OpenRouter), then run npm install and npm run dev.
What do I need besides Node.js — a database, an API key?You need an OpenAI-compatible API key/endpoint for the model, plus MongoDB 6/7 for storing chats, users and settings; skip MONGODB_URL and it falls back to an embedded MongoDB saved to ./db for quick local testing.
Does it still support provider-specific integrations like GGUF or built-in web search?No — legacy provider-specific features (the old MODELS env var, GGUF discovery, embeddings, web-search helpers) have been removed; only OpenAI-compatible APIs are supported now, though the old feature set is preserved on the project's legacy branch.
What is the Omni model router?Omni is a virtual model alias that uses a local heuristic to pick the best route per message: image inputs go to a multimodal model, MCP-tool-enabled requests go to an agentic model, and everything else uses a default model, with automatic fallback if a route fails.
Can Chat UI call external tools?Yes, via Model Context Protocol (MCP) servers — you can preconfigure trusted servers or let users add their own, and the model calls their tools through OpenAI function calling, with results shown inline in the chat.
Can I rebrand the UI for my own deployment?Yes, env vars like PUBLIC_APP_NAME and PUBLIC_APP_ASSETS let you change the app name and logo/favicon set, and PUBLIC_APP_DATA_SHARING can add a data-sharing opt-in toggle in user settings.
Is there a prebuilt Docker image?Yes, the chat-ui-db image bundles MongoDB inside the container, so you can run the whole stack with one Docker command and pass env vars as -e flags.
Size
18.2 MB
Stars
11.1K
Age
3y
Commits · 90 Days