Just sharing an app I built recently using Streamlit. It’s a simple chatbot that uses OpenAI API to get responses from GPT LLMs. It is written completely in Python.
You can try the demo app on Streamlit
This is a multipage app where new pages are created (and removed) dynamically. Since I’ve seen in my searches that this is a topic people tend to be interested in when it comes to Streamlit, I though it could be useful for other if I shared my code.
Here are some of the features:
- Speech recognition and text to voice: Interact with GPT by voice
- Web UI (streamlit)
- Add/remove conversations dynamically
- Automatic/editable conversation summary title
- Fully configurable
- Support for multiple GPT LLMs
- Control over the parameters passed to the OpenAI API, with (hopefully) sensible defaults
- Ability to pass base directives to the LLM
- E.g., to make it adopt a persona, but you decide which directived to pass
- Dynamically modifiable AI parameters in each chat separately
- No need to restart the chat
- Autosave & retrieve chat history
- Chat context handling using embeddings
- Estimated API token usage and associated costs
- Terminal UI (for a more “Wake up, Neo” experience")
- OpenAI API key is never stored on disk
This project’s main purpose is to serve as a learning exercise for me, as well as a tool for and experimenting with OpenAI API, GPT LLMs and Streamlit. While it does not claim to be the best or more robust OpenAI-powered chatbot out there, it does aim to have a friendly user interface and to be easy to use and configure.
The source code is available on GitHub too. Feel free to open issues or submit pull requests if you find a bug or have a suggestion.
Last but not least: this project is not affiliated with OpenAI in any way.