Artin2009 commited on
Commit
9fa8e9b
1 Parent(s): 3fc87fd

Update chain_app.py

Browse files
Files changed (1) hide show
  1. chain_app.py +4 -4
chain_app.py CHANGED
@@ -643,7 +643,7 @@ async def main(message: cl.Message):
643
  ).send()
644
 
645
  elif chat_profile == 'Llama-3.1-70B':
646
- completion = groq_client.chat.completions.create(
647
  model="llama-3.1-70b-versatile",
648
  messages=[
649
  {
@@ -657,9 +657,9 @@ async def main(message: cl.Message):
657
  stream=True,
658
  stop=None,
659
  )
660
-
661
  complete_content = ""
662
-
663
  # Iterate over each chunk
664
  for chunk in completion:
665
  # Retrieve the content from the current chunk
@@ -668,7 +668,7 @@ async def main(message: cl.Message):
668
  # Check if the content is not None before concatenating it
669
  if content is not None:
670
  complete_content += content
671
-
672
  # Send the concatenated content as a message
673
  await cl.Message(content=complete_content).send()
674
 
 
643
  ).send()
644
 
645
  elif chat_profile == 'Llama-3.1-70B':
646
+ completion = groq_client.chat.completions.create(
647
  model="llama-3.1-70b-versatile",
648
  messages=[
649
  {
 
657
  stream=True,
658
  stop=None,
659
  )
660
+
661
  complete_content = ""
662
+
663
  # Iterate over each chunk
664
  for chunk in completion:
665
  # Retrieve the content from the current chunk
 
668
  # Check if the content is not None before concatenating it
669
  if content is not None:
670
  complete_content += content
671
+
672
  # Send the concatenated content as a message
673
  await cl.Message(content=complete_content).send()
674