Spaces:
Runtime error
Runtime error
Revert "ai: Filter out blank responses."
Browse filesThis reverts commit 48d228b3adfe9428c4c0b735b4a5800abd42040a.
jarvis.py
CHANGED
@@ -310,11 +310,10 @@ async def respond_async(multi, history, model_display, sess, custom_prompt):
|
|
310 |
chunk = d.result()
|
311 |
if chunk is None:
|
312 |
raise StopAsyncIteration
|
313 |
-
if not chunk.strip():
|
314 |
-
continue
|
315 |
if not first_meaningful_chunk_found:
|
316 |
-
|
317 |
-
|
|
|
318 |
else:
|
319 |
history[-1][1] += chunk
|
320 |
yield history, gr.update(interactive=False, submit_btn=False, stop_btn=True), sess
|
|
|
310 |
chunk = d.result()
|
311 |
if chunk is None:
|
312 |
raise StopAsyncIteration
|
|
|
|
|
313 |
if not first_meaningful_chunk_found:
|
314 |
+
if chunk.strip():
|
315 |
+
history[-1][1] = chunk
|
316 |
+
first_meaningful_chunk_found = True
|
317 |
else:
|
318 |
history[-1][1] += chunk
|
319 |
yield history, gr.update(interactive=False, submit_btn=False, stop_btn=True), sess
|