Artin2009 commited on
Commit
2d20bde
·
verified ·
1 Parent(s): 87ef27f

Update chain_app.py

Browse files
Files changed (1) hide show
  1. chain_app.py +2 -3
chain_app.py CHANGED
@@ -697,12 +697,11 @@ async def main(message: cl.Message):
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
 
 
697
  prompt_truncation='OFF',
698
  connectors=[],
699
  )
 
700
 
701
  for event in stream:
702
  if event.event_type == 'text-generation':
703
+ complete_content += event
704
+ await cl.Message(content=complete_content).send()
705
 
706
 
707