Spaces:
Runtime error
Runtime error
Update chain_app.py
Browse files- chain_app.py +5 -3
chain_app.py
CHANGED
@@ -697,10 +697,12 @@ async def main(message: cl.Message):
|
|
697 |
prompt_truncation='OFF',
|
698 |
connectors=[],
|
699 |
)
|
700 |
-
|
701 |
|
702 |
-
|
703 |
-
|
|
|
|
|
704 |
|
705 |
|
706 |
|
|
|
697 |
prompt_truncation='OFF',
|
698 |
connectors=[],
|
699 |
)
|
700 |
+
msg = cl.Message(content="")
|
701 |
|
702 |
+
for event in stream:
|
703 |
+
if event.event_type == 'text-generation':
|
704 |
+
await msg.stream_token(content=event.text)
|
705 |
+
await msg.send()
|
706 |
|
707 |
|
708 |
|