This Python script implements a chatbot named Marv that uses OpenAI's GPT-3.5 Turbo model to provide responses to user queries. Marv adds a touch of sarcasm to its responses, making interactions more engaging and humorous. The script demonstrates how to interact with the OpenAI API to create a chatbot experience.
- Welcome message to greet users.
- User input prompt for chatting with the chatbot.
- Utilizes OpenAI's GPT-3.5 Turbo model for generating responses.
- Implements error handling in case of API issues.
- Clone the repository or download the script to your local machine.
- Install the required dependencies. You can install the
openailibrary using pip: - Create an OpenAI account and obtain an API key. Save your API key in a file named
hidden.txt. - Run the script by executing the
main.pyfile - Type your message, and Marv will respond with a sarcastic answer generated by the GPT-3.5 Turbo model.
- Continue chatting with Marv as long as you like.
- OpenAI API: Used for generating chatbot responses.
For any questions or inquiries, please feel free to contact me at najiib@pdx.edu