A basic streamlit UI for consuming API calls from the new OpenAI assistants API! Quick way to show buttons, free text and (coming soon) images from your Assistant.
-
Create a .env file (can use the sample as a template) with your OpenAI API key, a name for your assistant, and an optional description.
-
Initialize your virtual environment with poetry. If you have not already installed poetry, you can do so with:
pip install poetry
and then run:
poetry init
- Create the assistant by running
make-assistant.py:
poetry run python make-assistant.py
You can also create the assistant yourself through the OpenAI Assistant Playground and copy/paste your Assistant info into .env manually.
- Run the program through streamlit:
poetry run streamlit run bot-ui.py
If you want to change how things look, modify ./streamlit/config.toml. You can also change and edit the theme in the streamlit UI by clicking the three dots in the upper right corner and going to "settings"
Leverages the new Assistant API to create and interact with OpenAI Assistants. Also uses their threads and runs endpoints to keep track of state and tool use.
Gives agents a tool to send a set of buttons to the chat. Very useful!
Includes pydantic classes for all data types, type hints everywhere, and docstrings on all functions.
- Fix scrolling issue on free text submission
- More tools for bot message types:
- Dropdowns
- Images
- Carousels
- [~] Add DALLE-3 tool
- Save quiz questions and answers
Try these things to help:
- Use a different model, like 3.5-Turbo or the non 1106 versions
- Ask to borrow a friend's API key (especially if that friend has good billing history)
- Touch grass for a while and come back




