ryo-ma
gpt-assistants-api-ui
Python

๐Ÿ’ฌ OpenAI Assistants API chat UI ๐Ÿ› ๏ธ It works easily by setting the ASSISTANT ID ๐Ÿ“ Supports file upload and file download ๐Ÿƒ Supports Streaming API ๐ŸชŸ Support to Azure OpenAI

Last updated Jul 9, 2026
248
Stars
172
Forks
10
Issues
0
Stars/day
Attention Score
54
Language breakdown
Python 96.9%
Dockerfile 3.1%
โ–ธ Files click to expand
README

gpt-assistants-api-ui

  • ๐Ÿ’ฌ OpenAI Assistants API chat UI
  • ๐Ÿ› ๏ธ It works quickly by setting the ASSISTANT IDs
  • ๐Ÿ“ Supports file upload and file download
  • ๐Ÿƒ Supports Streaming API
  • ๐Ÿ‘ฅ Supports multiple Assistant profiles in one place
  • ๐ŸชŸ Support to Azure OpenAI
* โ€ป Cannot be used until Azure OpenAI Service supports Streaming API

ใ‚นใ‚ฏใƒชใƒผใƒณใ‚ทใƒงใƒƒใƒˆ 2023-11-20 2 23 51

๐ŸŒŸ Quick Start

  • ๐Ÿ‘ค Create an assistant on the OpenAI site & Get assistant ID (https://platform.openai.com/assistants)
  • ๐Ÿ”‘ Get the API key from OpenAI (https://platform.openai.com/api-keys)
  • โฌ‡๏ธ Clone the repository
$ git clone https://github.com/ryo-ma/gpt-assistants-api-ui.git
  • ๐Ÿ“ฆ Install dependencies
$ poetry install
  • โš™๏ธ Set environment variables file .env
# OpenAI settings
    OPENAIAPIKEY="sk-xxx"

# When using only one assistant, set the following, unset the OPENAI_ASSISTANTS variable. ASSISTANTID="asstxxx" ASSISTANT_TITLE="Assistants API UI" # This is for the single agent title

# When using multiple assistants, set the following. OPENAIASSISTANTS='[{"id": "asstxxx", "title": "Assistants XXX UI"}, {"id": "asst_yyy", "title": "Assistants YYY UI"}]' # App settings ENABLEDFILEUPLOAD_MESSAGE="Upload a file" # Leave empty to disable AUTHENTICATI # Must change to True if you require authentication

If you use azure instead, set AZUREOPENAIENDPOINT and AZUREOPENAIKEY

  • ๐Ÿ”‘ Set Authentication configuration (optional)
To set up authentication, create a secrets file .streamlit/secrets.toml as below:
[credentials]
    usernames = { jsmith = {failedloginattempts = 0,  loggedin = false, name = "John Smith", password = "abc"}, rbriggs = {failedloginattempts = 0,  loggedin = false, name = "R Briggs", password = "abc"}}

[cookie] expiry_days = 30 key = "somesignaturekey" # Must be string name = "somecookiename"

Reference: Deploying Streamlit-Authenticator via Streamlit Community Cloud

๐Ÿƒโ€๏ธ Run the app using Streamlit

$ poetry shell
$ streamlit run app.py

๐Ÿณ Run the app using Docker

  • ๐Ÿ’ฝ Build image
$ docker compose build
  • ๐Ÿƒโ€๏ธ Run the app
$ docker compose up
Access to http://localhost:8501.

๐ŸŒ Deploy to Streamlit Cloud

You can fork this repository and deploy the app to https://share.streamlit.io/. No need to run the app on your local machine.
Don't forget to choose 3.10 as the Python version and set environment variables in the "Advanced settings" during deployment.

To use authentication with Streamlit Cloud, please use this TOML format:

# Environment variables

OpenAI settings

OPENAIAPIKEY="sk-xxx"

When using only one assistant, set the following, unset the OPENAI_ASSISTANTS variable.

ASSISTANTID="asstxxx" ASSISTANT_TITLE="Assistants API UI" # This is for the single agent title

When using multiple assistants, set the following.

OPENAIASSISTANTS='[{"id": "asstxxx", "title": "Assistants XXX UI"}, {"id": "asst_yyy", "title": "Assistants YYY UI"}]'

App settings

ENABLEDFILEUPLOAD_MESSAGE="Upload a file" # Leave empty to disable AUTHENTICATI # Must change to True if you require authentication

Authentication secrets

[credentials] usernames = { jsmith = {failedloginattempts = 0, loggedin = false, name = "John Smith", password = "abc"}, rbriggs = {failedloginattempts = 0, loggedin = false, name = "R Briggs", password = "abc"}}

[cookie] expiry_days = 30 key = "somesignaturekey" # Must be string name = "somecookiename"

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท ryo-ma/gpt-assistants-api-ui ยท Updated daily from GitHub