diff --git a/main.py b/main.py index 4aad724..2eff616 100644 --- a/main.py +++ b/main.py @@ -16,7 +16,6 @@ GOOGLE_CRED_LOCATION = "./AI-Adventure-2bb65e3a4e2f.json" def story_init(session, seed): pass - # Routes to index @app.route('/') def root(): @@ -47,6 +46,7 @@ def index(): def about(): return render_template('about.html') + # Bread and butter of app, updates story and returns based on choice @app.route('/choose', methods=['POST']) def story_request(): diff --git a/story/story_manager.py b/story/story_manager.py index 49f47d8..9713f24 100644 --- a/story/story_manager.py +++ b/story/story_manager.py @@ -1,6 +1,12 @@ from story.utils import * from other.cacher import * import json +<<<<<<< HEAD +======= + +prompts = [ + "You enter a dungeon with your trusty sword and shield. You are searching for the evil necromancer who killed your family. You've heard that he resides at the bottom of the dungeon, guarded by legions of the undead. You enter the first door and see"] +>>>>>>> cc28b3787ca6c0614066ca4af4501b4d9ece8ff7 prompts = [ "You enter a dungeon with your trusty sword and shield. You are searching for the evil necromancer who killed your family. You've heard that he resides at the bottom of the dungeon, guarded by legions of the undead. You enter the first door and see"] @@ -170,6 +176,7 @@ class CachedStoryManager(ConstrainedStoryManager): if response is not None: action_results = json.loads(response) else: + print("Not found in cache. Generating...") action_results = super().get_action_results() response = json.dumps(action_results) self.cacher.cache_file(self.seed, self.prompt_num, self.choices, response, "choices")