- π¬ OpenAI Assistants API chat UI
- π οΈ It works easily by setting the ASSISTANT ID
- π Supports file upload and file download
- πͺ Support to Azure OpenAI
-
π€ Create an assistant on the OpenAI site (Get assistant ID)
-
π Get the API key from OpenAI
-
β¬οΈ Clone the repository
$ git clone https://github.com/ryo-ma/gpt-assistants-api-ui.git
-
π¦ Install dependencies
$ poetry install
-
π Set environment variables
OPENAI_API_KEY="sk-xxx" ASSISTANT_ID="asst_xxx" ASSISTANT_TITLE="Assistants API UI" ENABLED_FILE_UPLOAD_MESSAGE="Upload a file" # Leave empty to disable
If you use azure instead, set
AZURE_OPENAI_ENDPOINT
andAZURE_OPENAI_KEY
-
πβοΈ Run the app
$ poetry shell $ streamlit run app.py
-
π€ Create an assistant on the OpenAI site (Get assistant ID)
-
π Get the API key from OpenAI
-
β¬οΈ Clone the repository
$ git clone https://github.com/ryo-ma/gpt-assistants-api-ui.git
-
π Set environment variables
Create a .env file.
OPENAI_API_KEY="sk-xxx" ASSISTANT_ID="asst_xxx" ASSISTANT_TITLE="Assistants API UI" ENABLED_FILE_UPLOAD_MESSAGE="Upload a file" # Leave empty to disable
If you use azure instead, set
AZURE_OPENAI_ENDPOINT
andAZURE_OPENAI_KEY
-
π½ Build image
$ docker compose build
-
πβοΈ Run the app
$ docker compose up
Access to http://localhost:8501.
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.