Browse Source

remove is_initial fluff, no soundtrack when embed

master
The Dod 9 months ago
parent
commit
9dce633a48
1 changed files with 7 additions and 4 deletions
  1. 7
    4
      app.py

+ 7
- 4
app.py View File

@@ -34,7 +34,7 @@ def preprocess_content(defs):
34 34
             content = """<img src="{source}" alt="{alt}" class="float-right w-{width}"/><br/>\n""".format(**img)+content
35 35
         case "below":
36 36
             content = content+"""<br/>\n<img src="{source}" alt="{alt}" class="centered w-{width}"/><br/>\n""".format(**img)
37
-    if defs.get("use_soundtrack"):
37
+    if defs.get("use_soundtrack") and not defs.get("use_video_content"): ## No soundtrack if we're playing video
38 38
         content = """<audio loop data-autoplay><source src="{}" type="audio/{}"></audio>\n""".format(
39 39
                       defs["soundtrack"], defs["soundtrack"].split(".")[-1])+content
40 40
     return content
@@ -124,15 +124,18 @@ def home():
124 124
         if "user" not in session:
125 125
             session["user"] = "odelia"  # terrible kludge
126 126
         session["messages"] = [
127
-          {"role": "system", "content": make_prompt(session["user"])},
128
-          {"role": "assistant", "content": file2json("static/initial-chat.json")}
127
+          {"role": "system", "content": make_prompt(session["user"])} #,
128
+          ### This turned to be counter productive
129
+          # {"role": "assistant", "content": file2json("static/initial-chat.json")}
129 130
         ]
130 131
         session["history"] = []
131 132
         is_initial = True
132 133
         prompt = ""
133 134
     if request.method=='POST' or is_initial:
134 135
         if is_initial:
135
-            session["messages"] += [{"role": "system", "content": "User wishes to begin. Remember to find out how they feel before offering a ceremony or other action."}]
136
+            pass
137
+            ## this turned out to be counter-productive
138
+            # session["messages"] += [{"role": "system", "content": "User wishes to begin. Remember to find out how they feel before offering a ceremony or other action."}]
136 139
         else:
137 140
             prompt = request.form["prompt"].strip()
138 141
             if prompt:

Loading…
Cancel
Save