This repository contains code for an interactive text-based adventure game called "Temporal Traverse." Players will navigate a character named Alex through various time periods, making choices that determine the narrative's path and, ultimately, Alex's fate. The game is powered by Cassandra for chat history and AI-based language model from OpenAI to generate responses.
Cassandra Configuration
cloud_config variable with the appropriate credentials in the code.secure-connect-choose-your-adventure.zip with the bundle corresponding to your Cassandra or AstraDB setup.Environment Variables
token.json..env file and add the OPENAI_API_KEY variable.OpenAI API Key
OPENAI_API_KEY in your .env file.Vector Database Provisioning
Game Rules and Narrative
Execution
bashCopy code
python connect-database.py
Gameplay
The game utilizes a chat history stored in Cassandra through CassandraChatMessageHistory. This context aids the AI model (LLMChain) from OpenAI to generate responses based on the player's input and the established narrative template.
Contributions are welcome! If you wish to enhance the game, feel free to fork the repository and submit a pull request with your changes.
This project is licensed under MIT License. Feel free to modify and distribute it as per the license terms.
This game is a demonstration and should be used responsibly. The AI-generated content might not always follow a predictable or desired path due to its learning nature.
Thank you for checking out the Temporal Traverse Adventure Game repository. Enjoy your journey through time and storytelling! If you have any queries or suggestions, feel free to reach out or create an issue in the repository.