This project aims to create a chatbot using Chat APIs integrating with GPT(GPT-3.5-turbo)/ GPT3 (text-davinci-003)/ VertexAI (chat-bison@001) that can help users with their fitness goals like being their personal fitness trainer. The chatbot can provide suggestions related to exercise routines, diet plans, and more based on the users' fitness goals.
Before getting started with the project, you will need to have an OpenAI API or Vertex AI API key. You can get the key by signing up on the OpenAI's website for OpenAI key and for Vertex AI visit Google Cloud. Once you have an API key, you can integrate it with the Streamlit interface.
- Install the requirements by:
pip install -r requirements.txt
- using OpenAI API or Vertex AI API
-
Once all the requirement libraries are installed, create a file called
apikey.py
-
Declare a varibale named
openai_api_key
with API key value.
echo "openai_api_key = '<Enter your OpenAI Key here>' " > apikey.py
- Download
service_account.json
from your google cloud account and place it in the root directory of the project.
Run the Streamlit app using the following command:
streamlit run chatbot.py
The app should now be running on your localhost.
localhost:8501
Here are some screenshots of the chatbot in action: