Spaces:
Sleeping
Sleeping
try stream
Browse files
app.py
CHANGED
@@ -54,8 +54,11 @@ def bot(history):
|
|
54 |
history[-1][1] = ""
|
55 |
user_message = history[-1][0]
|
56 |
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
59 |
yield history
|
60 |
|
61 |
|
|
|
54 |
history[-1][1] = ""
|
55 |
user_message = history[-1][0]
|
56 |
|
57 |
+
full_input = chain.prep_inputs({"text": user_message})
|
58 |
+
prompts, stop = chain.prep_prompts([full_input], run_manager=None)
|
59 |
+
|
60 |
+
for chunk in llm._stream(prompt=prompts[0].to_string(), stop=stop, run_manager=None):
|
61 |
+
history[-1][1] += chunk.text
|
62 |
yield history
|
63 |
|
64 |
|