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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -172,7 +172,8 @@ 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=part["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
+ content=part.choices[0].delta.content
177
  try:
178
  report.append(content)
179
  if len(content) > 0: