The goal of this project was to create a Choose Your Own Adventure style game powered by OpenAI's ChatGPT-3.5-turbo
We did this by calling the API for GPT with a very specific prompt, parsing the results, and displaying it all in a tkinter window.
We're honored to have won the beginner award for AI and Machine Learning at HackUSU 2023.
Hackathon | Current |
---|---|
Video coming soon! |
In order to run this program you'll need
- An API key from openAI
- Python 3.7 or higher
- OpenAI library
- Install the OpenAI Library for python with
pip install openai
- Download
main.py
- Repleace the API key with your own OpenAI API key
- Run
python main.py
in the terminal or your favorite python-supporting IDE - The program will launch a tkinter window, all further instructions refer to the window
- Select the length of your adventure (Short-10 turns, Medium-15 turns, or Long-25 turns) and then click the "Select Length" button
- The AI will then generate 5 characters to choose from, select the button corresponding to the character you'd like to be and click "Select Character"
- The AI will then start the story and give you two options, select the option you'd like to continue with
- Repeat the previous step until the story is over
- Select "Close Window" to end the experience
- To play again, repeat instructions
Features we wanted to include but weren't able to due to the time constraint
These features may get added in the future
- generate dalle images for each scene
- save story with images and text
- option save story text to file
- ChatGPT api call async so loading symbol can be displayed to user instead of the app going unresponsive
- ability to go back and replay scenarios (select different option)
- "Play Again" button
- Refactor code to better conform to python coding standards
Name | Github | |
---|---|---|
Carter Watson | Github | |
Chandler McClellan | Github | |
Joseph Johnson | Github |