awacke1 commited on
Commit
3913f6f
·
1 Parent(s): edcf559

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -172,7 +172,7 @@ def chat_with_model(prompt, document_section, model_choice='gpt-3.5-turbo'):
172
  for part in stream:
173
  chunk_message = (part.choices[0].delta.content or "")
174
  collected_messages.append(chunk_message) # save the message
175
- content=chunk["choices"][0].get("delta",{}).get("content")
176
  try:
177
  report.append(content)
178
  if len(content) > 0:
 
172
  for part in stream:
173
  chunk_message = (part.choices[0].delta.content or "")
174
  collected_messages.append(chunk_message) # save the message
175
+ content=part["choices"][0].get("delta",{}).get("content")
176
  try:
177
  report.append(content)
178
  if len(content) > 0: