weblab-geniac-spaces
commited on
Commit
•
11beee0
1
Parent(s):
40b51f1
fix bug
Browse files
app.py
CHANGED
@@ -114,6 +114,10 @@ def stream_chat(
|
|
114 |
{"role": "system", "content": system_prompt}
|
115 |
]
|
116 |
for prompt, answer in history:
|
|
|
|
|
|
|
|
|
117 |
conversation.extend([
|
118 |
{"role": "user", "content": prompt},
|
119 |
{"role": "assistant", "content": answer},
|
|
|
114 |
{"role": "system", "content": system_prompt}
|
115 |
]
|
116 |
for prompt, answer in history:
|
117 |
+
if prompt == None:
|
118 |
+
prompt = " "
|
119 |
+
if answer == None:
|
120 |
+
prompt = " "
|
121 |
conversation.extend([
|
122 |
{"role": "user", "content": prompt},
|
123 |
{"role": "assistant", "content": answer},
|