Explorar el Código

remove is_initial fluff, no soundtrack when embed

master
The Dod hace 2 meses
padre
commit
9dce633a48
Se han modificado 1 ficheros con 7 adiciones y 4 borrados
  1. 7
    4
      app.py

+ 7
- 4
app.py Ver fichero

34
             content = """<img src="{source}" alt="{alt}" class="float-right w-{width}"/><br/>\n""".format(**img)+content
34
             content = """<img src="{source}" alt="{alt}" class="float-right w-{width}"/><br/>\n""".format(**img)+content
35
         case "below":
35
         case "below":
36
             content = content+"""<br/>\n<img src="{source}" alt="{alt}" class="centered w-{width}"/><br/>\n""".format(**img)
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
         content = """<audio loop data-autoplay><source src="{}" type="audio/{}"></audio>\n""".format(
38
         content = """<audio loop data-autoplay><source src="{}" type="audio/{}"></audio>\n""".format(
39
                       defs["soundtrack"], defs["soundtrack"].split(".")[-1])+content
39
                       defs["soundtrack"], defs["soundtrack"].split(".")[-1])+content
40
     return content
40
     return content
124
         if "user" not in session:
124
         if "user" not in session:
125
             session["user"] = "odelia"  # terrible kludge
125
             session["user"] = "odelia"  # terrible kludge
126
         session["messages"] = [
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
         session["history"] = []
131
         session["history"] = []
131
         is_initial = True
132
         is_initial = True
132
         prompt = ""
133
         prompt = ""
133
     if request.method=='POST' or is_initial:
134
     if request.method=='POST' or is_initial:
134
         if is_initial:
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
         else:
139
         else:
137
             prompt = request.form["prompt"].strip()
140
             prompt = request.form["prompt"].strip()
138
             if prompt:
141
             if prompt:

Loading…
Cancelar
Guardar