mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-11 11:51:53 +08:00
updating
This commit is contained in:
@@ -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():
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user