ChineseAiDungeonChatGPT: A Journey into AI Storytelling
Introduction
ChineseAiDungeonChatGPT is an intriguing project aimed at creating immersive storytelling experiences using OpenAI's ChatGPT API. It stands out as a Chinese-language version of AI Dungeon, using state-of-the-art technology to enhance narrative capability. The project developer highlights that this version surpasses their previous month-long efforts using the ChineseAiDungeon, a manually trained model. Astonishingly, this improved performance was achieved in just one hour with only 40 lines of code. The power of technology is truly evidenced here, far exceeding the capabilities of other models like Tsinghua's open-source Qingyuan CPM.
The storytelling ability of ChatGPT has drawn comparisons to AI Dungeon itself, demonstrating how rapidly technology is advancing in the field. This project's innovation allows users to engage in rich, dynamic narratives that are much more natural and coherent.
Installation and Usage
Using ChineseAiDungeonChatGPT is straightforward. Start by downloading the project files. Open a terminal and run the following command to install the necessary dependencies:
pip3 install -r requirements.txt
Once the dependencies are installed, you can start generating stories through the command line by running:
python3 example_story.py
Alternatively, for those who prefer a graphical user interface (GUI), you can launch the application using:
python3 app.py
It's essential to have Python 3.9 or later for the GUI version to work properly.
Important Updates
Update on March 2, 2023
With the official release of OpenAI's API, the project now supports logging in using an OpenAI api_key
. This method requires an OpenAI account with a payment method attached, as it is faster and more robust, but it does incur charges. For those interested in this method, the API key can be obtained from OpenAI's API page.
Due to the increased restrictions following the API release, using an account password for access might lead to account suspension. Therefore, caution is advised, and the GUI interface reflects this change.
Make sure that the revChatGPT
package is updated to its latest version:
pip3 install --upgrade revChatGPT
Update on March 1, 2023
Due to the reliable API provided by revChatGPT, this project has transitioned to the new API and continues to receive updates. The command line interface (CLI) now functions smoothly by simply running:
python3 example_story.py
Ensure the revChatGPT
package is current to avoid potential issues. The older session_token method is now deprecated in favor of OpenAI account login.
Additional updates include:
- Enhanced CLI interface aesthetics.
- New features for automatic story saving and loading.
Challenges and Considerations
The project shares its OpenAI account token within the code for accessible use, but this token may become unusable due to several reasons, such as account suspension, account security breaches, token expiration, or API access changes.
Should these issues arise, users are guided to configure their own setup by following the detailed instructions on revChatGPT's setup wiki.
Story Samples and Experiences
For those curious about the project's capabilities, sample stories can be found in the outputs folder. One particular narrative involves an adventure in a forest, demonstrating the nuanced and engaging storytelling that ChatGPT can facilitate. Through quick thinking using a recall teleport scroll, the protagonist successfully navigates out of a cave to return safely to their village, showcasing the project's dynamic storytelling prowess.
Common Problems and Solutions
ChineseAiDungeonChatGPT users might face some technical issues, such as:
-
TypeError: 'generator' object is not subscriptable
- Solution: Upgrade dependencies using
pip3 install revChatGPT --upgrade
.
- Solution: Upgrade dependencies using
-
IndexError: list index out of range
- Generally caused by overused API calls; wait for API restoration or update
revChatGPT
to resolve.
- Generally caused by overused API calls; wait for API restoration or update
-
ValueError: Error refreshing session: No email and password provided
- Caused by expired tokens. Users need to refer to
revChatGPT
for token configuration or request a token update.
- Caused by expired tokens. Users need to refer to
The project continues to evolve, driven by a passion for AI-driven storytelling and the capabilities of modern technology.