{"id":16789172,"url":"https://github.com/ryo-ma/gpt-assistants-api-ui","last_synced_at":"2025-05-16T02:07:58.939Z","repository":{"id":208098452,"uuid":"720811037","full_name":"ryo-ma/gpt-assistants-api-ui","owner":"ryo-ma","description":"💬 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","archived":false,"fork":false,"pushed_at":"2025-03-25T06:21:02.000Z","size":137,"stargazers_count":246,"open_issues_count":10,"forks_count":186,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-15T11:57:27.749Z","etag":null,"topics":["assistant-api","chatgpt","gpt","openai","openai-api","openai-assistant-api","openai-assistants","openai-chatgpt","streamlit","streamlit-webapp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryo-ma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-19T17:11:59.000Z","updated_at":"2025-05-12T21:46:19.000Z","dependencies_parsed_at":"2024-01-21T02:26:39.117Z","dependency_job_id":"d126c323-4b86-46d7-ac7e-dd7ad8441e86","html_url":"https://github.com/ryo-ma/gpt-assistants-api-ui","commit_stats":null,"previous_names":["ryo-ma/gpt-assistants-api-ui"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryo-ma%2Fgpt-assistants-api-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryo-ma%2Fgpt-assistants-api-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryo-ma%2Fgpt-assistants-api-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryo-ma%2Fgpt-assistants-api-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryo-ma","download_url":"https://codeload.github.com/ryo-ma/gpt-assistants-api-ui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453653,"owners_count":22073617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assistant-api","chatgpt","gpt","openai","openai-api","openai-assistant-api","openai-assistants","openai-chatgpt","streamlit","streamlit-webapp"],"created_at":"2024-10-13T08:26:09.124Z","updated_at":"2025-05-16T02:07:58.851Z","avatar_url":"https://github.com/ryo-ma.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpt-assistants-api-ui\n\n* 💬 OpenAI Assistants API chat UI\n* 🛠️ It works quickly by setting the ASSISTANT IDs\n* 📁 Supports file upload and file download\n* 🏃 Supports Streaming API\n* 👥 Supports multiple Assistant profiles in one place\n* 🪟 Support to Azure OpenAI\n  * ※ Cannot be used until Azure OpenAI Service supports Streaming API\n\n\u003cimg width=\"1459\" alt=\"スクリーンショット 2023-11-20 2 23 51\" src=\"https://github.com/ryo-ma/gpt-assistants-api-ui/assets/6661165/5c288d51-196a-4919-bc4d-dc508146f58a\"\u003e\n\n## 🌟 Quick Start\n\n1. 👤 Create an assistant on the OpenAI site \u0026 Get assistant ID (https://platform.openai.com/assistants)\n2. 🔑 Get the API key from OpenAI (https://platform.openai.com/api-keys)\n3. ⬇️ Clone the repository\n\n    ```bash\n    $ git clone https://github.com/ryo-ma/gpt-assistants-api-ui.git\n    ```\n\n4. 📦 Install dependencies\n\n    ```bash\n    $ poetry install\n    ```\n\n5. ⚙️ Set environment variables file `.env`\n\n    ```bash\n    # OpenAI settings\n    OPENAI_API_KEY=\"sk-xxx\"\n    APP_ENABLED_FILE_UPLOAD_MESSAGE=\"Upload a file\" # Leave empty to disable\n\n    AUTHENTICATION_REQUIRED=\"False\" # Must change to True if you require authentication\n\n    # When using only one assistant, set the following, unset the OPENAI_ASSISTANTS variable.\n    ASSISTANT_ID=\"asst_xxx\"\n    ASSISTANT_TITLE=\"Assistants API UI\" # This is for the single agent title\n\n    # When using multiple assistants, set the following.\n    OPENAI_ASSISTANTS='[{\"id\": \"asst_xxx\", \"title\": \"Assistants XXX UI\"}, {\"id\": \"asst_yyy\", \"title\": \"Assistants YYY UI\"}]'\n    ```\n    If you use azure instead, set `AZURE_OPENAI_ENDPOINT` and `AZURE_OPENAI_KEY`\n\n6. 🔑 Set Authentication configuration (optional)\n\n    To set up authentication, create a [secrets](https://docs.streamlit.io/deploy/streamlit-community-cloud/deploy-your-app/secrets-management) file `.streamlit/secrets.toml`  as below:\n\n    ```toml\n    [credentials]\n    usernames = { jsmith = {failed_login_attempts = 0,  logged_in = false, name = \"John Smith\", password = \"abc\"}, rbriggs = {failed_login_attempts = 0,  logged_in = false, name = \"R Briggs\", password = \"abc\"}}\n\n    [cookie]\n    expiry_days = 30\n    key = \"some_signature_key\"  # Must be string\n    name = \"some_cookie_name\"\n    ```\n    Reference:  [Deploying Streamlit-Authenticator via Streamlit Community Cloud](https://discuss.streamlit.io/t/deploying-streamlit-authenticator-via-streamlit-community-cloud/39085)\n\n## 🏃‍️ Run the app using Streamlit\n\n\n```bash\n$ poetry shell\n$ streamlit run app.py\n```\n\n## 🐳 Run the app using Docker\n\n1. 💽 Build image\n\n    ```bash\n    $ docker compose build\n    ```\n\n2. 🏃‍️ Run the app\n\n    ```bash\n    $ docker compose up\n    ```\nAccess to [http://localhost:8501](http://localhost:8501).\n\n## 🌐 Deploy to Streamlit Cloud\nYou can fork this repository and deploy the app to https://share.streamlit.io/. No need to run the app on your local machine.\n\n\u003e Don't forget to choose 3.10 as the Python version and set environment variables in the \"Advanced settings\" during deployment.\n\nTo use authentication with Streamlit Cloud, please use this TOML format:\n\n```toml\n# Environment variables\n# OpenAI settings\nOPENAI_API_KEY=\"sk-xxx\"\nAPP_ENABLED_FILE_UPLOAD_MESSAGE=\"Upload a file\" # Leave empty to disable\n\nAUTHENTICATION_REQUIRED=\"False\" # Must change to True if you require authentication\n\n# When using only one assistant, set the following, unset the OPENAI_ASSISTANTS variable.\nASSISTANT_ID=\"asst_xxx\"\nASSISTANT_TITLE=\"Assistants API UI\" # This is for the single agent title\n\n# When using multiple assistants, set the following.\nOPENAI_ASSISTANTS='[{\"id\": \"asst_xxx\", \"title\": \"Assistants XXX UI\"}, {\"id\": \"asst_yyy\", \"title\": \"Assistants YYY UI\"}]'\n\n# Authentication secrets\n[credentials]\nusernames = { jsmith = {failed_login_attempts = 0,  logged_in = false, name = \"John Smith\", password = \"abc\"}, rbriggs = {failed_login_attempts = 0,  logged_in = false, name = \"R Briggs\", password = \"abc\"}}\n\n[cookie]\nexpiry_days = 30\nkey = \"some_signature_key\"  # Must be string\nname = \"some_cookie_name\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryo-ma%2Fgpt-assistants-api-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryo-ma%2Fgpt-assistants-api-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryo-ma%2Fgpt-assistants-api-ui/lists"}