This is a demo to build a chatbot in Python using Streamlit for the frontend and the GPT 3.5 LLM model from OpenAI for the backend.
- Python 3.10+
- Streamlit
- OpenAI API Key
- Clone this repo and
cd
into it:git clone [url] && cd [repo]
- Create a virtual environment:
make virtualenv
- Enter the virtual environment:
source .venv/bin/activate
- Install the dependencies:
make install-requirements
- The app needs secrets to be configured, you'll need to create a
.streamlit/secrets.toml
file with the following content:
OPENAI_API_KEY = "sk-2...X"
- Once environment is set up and secrets are configured, the app can be run by:
streamlit run src/chatbot_app.py
$ pytest -v