SuperAPI AI Directory

chatbot-ui

Open-source AI chat application for multiple language models.

Open website

About this tool

Chatbot UI is an open-source AI chat app, positioned as an "open-source AI chat app for everyone," supporting any model. The project provides an official hosted version, so users can use it without hosting it themselves; it also supports self-deployment.

Main Capabilities

  • Supports AI chat with any language model.
  • Version 2.0 has been released, and the version 1.0 code is located in the legacy branch.
  • Data storage uses Supabase (open-source Postgres, offering a free hosted tier), replacing the previous local browser storage to address issues such as security, storage limits, and limitations in multimodal use cases. There are future plans to support other providers.
  • Optionally use Ollama to support local models.

Local Quick Start

  1. Clone the repository.
  2. Run the install dependencies command in the root directory of the local Chatbot UI repository.
  3. Install Supabase and run it locally: Docker needs to be installed to run Supabase locally. Obtain the required values by running the command, and note that NEXT_PUBLIC_SUPABASE_URL uses the API URL from supabase status. Then fill these values into the .env.local file. If environment variables are set, the corresponding inputs in user settings will be disabled. In the first migration file supabase/migrations/20240108234540_setup.sql, 2 values need to be replaced with the values obtained above: project_url (line 53) defaults to http://supabase_kong_chatbotui:8000,若不更改 the project_id in config.toml can remain unchanged; service_role_key (line 54) comes from the value obtained by running supabase status, which prevents the issue of storage files not being deleted correctly.
  4. Fill in the keys.
  5. Install Ollama (optional, for local models), and follow the instructions.
  6. Run the app locally: the local instance should run at http://localhost:3000,需使用兼容的 node version (such as v18). The backend GUI can be viewed at http://localhost:54323/project/default/editor .

Hosted Quick Start (Cloud)

  1. Repeat steps 1-4 of the local quick start. It is recommended to use different repositories for the local and hosted instances. Create a new repository for the hosted instance on GitHub and push the code.
  2. Set up the backend with Supabase: create a new project, and obtain the environment variable values from the project dashboard—Project Ref (the Reference ID in General settings), Project ID (in the project dashboard URL), Project URL (in API Settings), Anon key (anon public in Project API keys), Service role key (service_role in Project API keys, which must be kept like a password). In Authentication's Providers, make sure Email is enabled; for a personal instance, it is recommended to turn off Confirm email. Fill project_url (line 53) and service_role_key (line 54) into the migration file of the hosted instance repository. Then, in the root directory of the local repository, run commands such as logging in to Supabase, linking the project with the Project ID, and pushing the database to Supabase to complete the hosted database setup.
  3. Set up the frontend with Vercel: create a new project, import the GitHub repository, and switch the Framework Preset to Next.js in the project Settings under Build & Development Settings. Add NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, NEXT_PUBLIC_OLLAMA_URL (only needed when using a local Ollama model, default http://localhost:11434)。也可添加 API keys as environment variables: AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_GPT_45_VISION_NAME. For the full list of environment variables, refer to the .env.local.example file. If environment variables are set for the API keys, the input in user settings will be disabled. Click Deploy and wait for the frontend deployment to complete. Once deployment is complete, you can use the hosted instance via the URL provided by Vercel.

Other Information

  • If you find Chatbot UI useful, consider sponsoring the author to support open-source work.
  • Issues are limited to actual problems related to the codebase; feature requests, cloud provider issues, etc. will be closed; for setup and other questions, please refer to the Help section under the Discussions tab. You are encouraged to participate in Discussions to ask questions, share ideas, and get help.
  • Contribution guidelines are being written.
  • You can contact Mckay via Twitter/X.