Artin2009 commited on
Commit
d42a2a1
1 Parent(s): 1de578b

Update chain_app.py

Browse files
Files changed (1) hide show
  1. chain_app.py +2 -2
chain_app.py CHANGED
@@ -2342,10 +2342,10 @@ async def main(message: cl.Message):
2342
  stream=True
2343
  )
2344
  for chunk in completion:
2345
- await msg.stream_token(chunk.choices[0].delta.content)
 
2346
 
2347
 
2348
-
2349
  elif chat_profile == 'Llama-3.1-70B':
2350
  completion = groq_client.chat.completions.create(
2351
  model="llama-3.1-70b-versatile",
 
2342
  stream=True
2343
  )
2344
  for chunk in completion:
2345
+ if chunk.choices[0].delta.content is not None:
2346
+ await msg.stream_token(chunk.choices[0].delta.content)
2347
 
2348
 
 
2349
  elif chat_profile == 'Llama-3.1-70B':
2350
  completion = groq_client.chat.completions.create(
2351
  model="llama-3.1-70b-versatile",