Chat UI: The Open Source Interface for LLMs, Powering HuggingChat

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Chat UI: The Open Source Interface for LLMs, Powering HuggingChat

Summary

Chat UI is an open-source SvelteKit application that provides a flexible chat interface for Large Language Models (LLMs). It serves as the foundation for HuggingChat, enabling users to interact with various OpenAI-compatible APIs. This project offers extensive customization and deployment options, making it ideal for developers building their own AI chat experiences.

Repository Information

Analyzed by OSRepos on February 25, 2026

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

Chat UI is an impressive open-source project by Hugging Face, serving as the foundational codebase for the popular HuggingChat application. Built with SvelteKit and TypeScript, it provides a highly customizable and extensible chat interface designed specifically for interacting with Large Language Models (LLMs). This project empowers developers to create their own AI chat experiences, offering seamless integration with various OpenAI-compatible APIs and robust features for managing chat history, users, and settings.

Installation

Getting Chat UI up and running locally is straightforward. The project is designed to connect with OpenAI-compatible APIs, making it flexible for various LLM providers.

Step 1: Clone the repository and set up your environment variables.

First, clone the repository and navigate into its directory:

git clone https://github.com/huggingface/chat-ui
cd chat-ui

Next, create a .env.local file in the root of the project. This file will hold your API endpoint and key. For quick setup, you can use Hugging Face Inference Providers router:

OPENAI_BASE_URL=https://router.huggingface.co/v1
OPENAI_API_KEY=hf_************************ # Replace with your Hugging Face access token

Step 2: Install dependencies and launch the development server.

npm install
npm run dev -- --open

This will start the development server, and Chat UI will be accessible in your browser, ready for you to start chatting.

Examples

Chat UI offers versatile integration options for various LLM providers and robust database solutions.

Connecting to Different LLM Providers:

The OPENAI_BASE_URL and OPENAI_API_KEY in your .env.local file can be configured to work with a range of OpenAI-compatible services:

Provider Example OPENAI_BASE_URL Example key env
Hugging Face Inference Providers router https://router.huggingface.co/v1 OPENAI_API_KEY=hf_xxx (or HF_TOKEN legacy alias)
llama.cpp server http://127.0.0.1:8080/v1 OPENAI_API_KEY=sk-local-demo (any string works; llama.cpp ignores it)
Ollama http://127.0.0.1:11434/v1 OPENAI_API_KEY=ollama
OpenRouter https://openrouter.ai/api/v1 OPENAI_API_KEY=sk-or-v1-...
Poe https://api.poe.com/v1 OPENAI_API_KEY=pk_...

Database Options:

For chat history, user data, and settings, Chat UI uses MongoDB. For local development, it can fall back to an embedded MongoDB. For production or team environments, you can configure it with:

  • MongoDB Atlas (managed): Set MONGODB_URL to your Atlas connection string.
  • Local MongoDB (container): Run docker run -d -p 27017:27017 --name mongo-chatui mongo:latest and set MONGODB_URL=mongodb://localhost:27017.

Advanced Features:

Chat UI also supports advanced configurations like:

  • Theming: Customize the app's name, assets, and data sharing options using environment variables.
  • LLM Router: Implement server-side smart routing for LLMs using models like katanemo/Arch-Router-1.5B, allowing the UI to select the best model for each message.
  • MCP Tools (Model Context Protocol): Integrate external tools and services, enabling models to perform actions like web searches and feed results back into the conversation using OpenAI function calling.

Why Use Chat UI?

Chat UI stands out as a robust and flexible solution for anyone looking to build or customize an AI chat application. Its key advantages include:

  • Open Source and Community-Driven: Being open source, it benefits from community contributions and offers full transparency and control.
  • Proven Reliability: It powers HuggingChat, demonstrating its stability and capability in a real-world, high-traffic environment.
  • Broad LLM Compatibility: Its support for OpenAI-compatible APIs means you can easily integrate with a wide array of LLM providers, from commercial services to local models.
  • Developer-Friendly: Built with SvelteKit and TypeScript, it offers a modern development experience, with clear installation steps and comprehensive documentation.
  • Rich Feature Set: From basic chat functionality to advanced LLM routing, tool integration, and theming, Chat UI provides a comprehensive toolkit for sophisticated AI chat applications.

Links

Related repositories

Similar repositories that may be relevant next.

AnythingMCP: AI-Empowered Gateway for Custom Claude, ChatGPT, Gemini Connectors

AnythingMCP: AI-Empowered Gateway for Custom Claude, ChatGPT, Gemini Connectors

August 16, 2026

AnythingMCP is a self-hosted, open-source AI-empowered gateway that transforms existing APIs, databases, and MCP servers into custom connectors for leading AI models like Claude, ChatGPT, and Gemini. It enables no-code integration of REST, SOAP, GraphQL, and SQL sources into the Model Context Protocol, featuring robust authentication, access control, and audit logging. The platform also includes over 175 pre-built adapters for common services, simplifying complex integrations.

ai-agentsapi-gatewaychatgpt
Jan: An Open-Source, Offline ChatGPT Alternative for Your Desktop

Jan: An Open-Source, Offline ChatGPT Alternative for Your Desktop

August 14, 2026

Jan is a powerful open-source desktop application that provides a 100% offline alternative to ChatGPT. It allows users to download and run various large language models locally, ensuring complete control and privacy over their AI interactions. With support for multiple platforms, Jan offers a robust solution for personal and private AI use.

chatgptllmopen-source
LobeHub: Your Chief Agent Operator for AI Team Orchestration

LobeHub: Your Chief Agent Operator for AI Team Orchestration

August 8, 2026

LobeHub acts as a Chief Agent Operator, streamlining the management of your AI team. It enables hiring, scheduling, and reporting on agents for 24/7 operations, allowing users to maintain control without constant online presence. This platform transforms individual AI tools into a cohesive, productive team.

agentaichatgpt
MoneyPrinter: Automate YouTube Shorts Creation with Local AI

MoneyPrinter: Automate YouTube Shorts Creation with Local AI

April 11, 2026

MoneyPrinter is an open-source tool that automates the creation of YouTube Shorts by generating scripts and metadata from a given video topic. It leverages local Ollama models for AI processing and features a robust, DB-backed generation queue for reliable content production. This project is ideal for content creators looking to streamline their video production workflow.

automationchatgptmoviepy

Source repository

Open the original repository on GitHub.

12 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️