This is a Python-based chatbot application called Jarvis that uses the OpenAI API to respond to user inputs. The application can handle a variety of questions and provides meaningful responses based on OpenAI's GPT models. The chatbot runs in a terminal/command line interface and can answer questions in a conversational style.
- Simple chatbot interface.
- Integration with OpenAI's GPT-3.5 or GPT-4 models.
- Flexible conversation based on user input.
- Easy setup and use on Ubuntu or any system with Python.
- Python 3.x
- OpenAI API key
git clone <your-repo-url>
cd <your-repo-directory>
It's recommended to create a virtual environment to isolate your project's dependencies.
python3 -m venv venv
source venv/bin/activate
All required Python packages are listed in the requirements.txt file. You can install them with the following command:
pip install -r requirements.txt
This project uses a .env file to store sensitive environment variables such as the OpenAI API key.
Create a .env file in the root of the project:
touch .env
Add your OpenAI API key to the .env file:
OPENAI_API_KEY=your-openai-api-key
After setting up the environment and installing the dependencies, you can start the chatbot by running the following command:
python chat.py
streamlit run ai-demo/mygpt/chap-app.py