FranklinWillemen commited on
Commit
23830c1
1 Parent(s): 2e24d2c

save context bug

Browse files
Files changed (2) hide show
  1. context.txt +0 -0
  2. discourse.py +5 -5
context.txt ADDED
File without changes
discourse.py CHANGED
@@ -28,13 +28,13 @@ def gen_voice(response, response_filename):
28
 
29
  def save_context(context):
30
  chat_transcript = ""
31
- for message in context:
32
- if message['role'] != 'system':
33
- chat_transcript += message['role'] + ": " + message['content'] + "\n\n"
34
-
35
  file_name = "context.txt"
 
36
  with open(file_name, 'w') as file:
37
- file.write(chat_transcript)
 
 
 
38
 
39
 
40
  def respond(audio:str):
 
28
 
29
  def save_context(context):
30
  chat_transcript = ""
 
 
 
 
31
  file_name = "context.txt"
32
+
33
  with open(file_name, 'w') as file:
34
+ for message in context:
35
+ if message['role'] != 'system':
36
+ chat_transcript = message['role'] + ": " + message['content'] + "\n\n"
37
+ file.write(chat_transcript)
38
 
39
 
40
  def respond(audio:str):