datacipen commited on
Commit
0374ded
β€’
1 Parent(s): df3f7e9

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -707,8 +707,8 @@ async def construction_NCS(romeListArray):
707
  #completion_NCS = chain.invoke({"question":question_p,"context":context_p})
708
 
709
  msg = cl.Message(author="Datapcc : 🌐🌐🌐",content="")
710
- for chunk in chain.stream({"question":question_p,"context":context_p}):
711
- msg.stream_token(chunk)
712
 
713
  #for s in chain.stream({"question":question_p,"context":context_p}):
714
  # print(s, end="", flush=True)
 
707
  #completion_NCS = chain.invoke({"question":question_p,"context":context_p})
708
 
709
  msg = cl.Message(author="Datapcc : 🌐🌐🌐",content="")
710
+ async for chunk in chain.astream({"question":question_p,"context":context_p}):
711
+ await msg.stream_token(chunk)
712
 
713
  #for s in chain.stream({"question":question_p,"context":context_p}):
714
  # print(s, end="", flush=True)