Update app.py
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ def transcribe(audio, text):
|
|
113 |
messages_rev.insert(0, {"role": "user", "content": input_text + transcript["text"]})
|
114 |
|
115 |
# Concatenate the chat history
|
116 |
-
chat_transcript = "\n\n".join([f"[ANSWER {answer_count}]{
|
117 |
|
118 |
# chat_transcript_copy = chat_transcript
|
119 |
# Append the number of tokens used to the end of the chat transcript
|
|
|
113 |
messages_rev.insert(0, {"role": "user", "content": input_text + transcript["text"]})
|
114 |
|
115 |
# Concatenate the chat history
|
116 |
+
chat_transcript = "\n\n".join([f"[ANSWER {answer_count}]{message['role']}: {message['content']}" for message in messages_rev if message['role'] != 'system'])
|
117 |
|
118 |
# chat_transcript_copy = chat_transcript
|
119 |
# Append the number of tokens used to the end of the chat transcript
|