Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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:
|