Spaces:
Runtime error
Runtime error
layerdiffusion
commited on
Commit
•
c62829f
1
Parent(s):
579bce7
fix some queue problems
Browse files
app.py
CHANGED
@@ -120,9 +120,9 @@ def chat_fn(message: str, history: list, seed:int, temperature: float, top_p: fl
|
|
120 |
conversation = [{"role": "system", "content": omost_canvas.system_prompt}]
|
121 |
|
122 |
for user, assistant in history:
|
123 |
-
if user
|
124 |
-
|
125 |
-
|
126 |
|
127 |
conversation.append({"role": "user", "content": message})
|
128 |
|
|
|
120 |
conversation = [{"role": "system", "content": omost_canvas.system_prompt}]
|
121 |
|
122 |
for user, assistant in history:
|
123 |
+
if isinstance(user, str) and isinstance(assistant, str):
|
124 |
+
if len(user) > 0 and len(assistant) > 0:
|
125 |
+
conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
|
126 |
|
127 |
conversation.append({"role": "user", "content": message})
|
128 |
|