datacipen commited on
Commit
cb02c1c
·
verified ·
1 Parent(s): b50e8f1

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -94,9 +94,9 @@ async def Affichage_reponse(response):
94
  msg = cl.Message(author="COPILOT",content="")
95
 
96
  for update in response:
97
- if update.choices:
98
  time.sleep(0.125)
99
- await msg.stream_token(update.choices[0].delta.content.replace('Ã','é').replace('©','').replace('Ã','è').replace('¨','').replace('â','\'').replace('€','').replace('™','').replace('Å','oe').replace('“','').replace('®','î').replace('´','ô').replace('<','').replace('>','').replace('/',''))
100
 
101
  await msg.send()
102
  return msg
 
94
  msg = cl.Message(author="COPILOT",content="")
95
 
96
  for update in response:
97
+ if update.data.choices:
98
  time.sleep(0.125)
99
+ await msg.stream_token(update.data.choices[0].delta.content.replace('Ã','é').replace('©','').replace('Ã','è').replace('¨','').replace('â','\'').replace('€','').replace('™','').replace('Å','oe').replace('“','').replace('®','î').replace('´','ô').replace('<','').replace('>','').replace('/',''))
100
 
101
  await msg.send()
102
  return msg