Spaces:
Runtime error
Runtime error
Update app.py
Browse files168 unmodified lines1691701711721731741751761771781791 unmodified line181182183184185186187168 unmodified linesmessages=conversation,stream=True,)for part in stream:chunk_message = (part.choices[0].delta.content or "")collected_messages.append(chunk_message) # save the message#content=part["choices"][0].get("delta",{}).get("content")content=part.choices[0].delta.contenttry:report.append(content)if len(content) > 0:1 unmodified lineres_box.markdown(f'*{result}*')except:st.write(' ')full_reply_content = ''.join([m.get('content', '') for m in collected_messages])#for chunk in client.chat.completions.create(168 unmodified lines1691701711721731741751761771781791801 unmodified line182183184185186187188168 unmodified linesmessages=conversation,stream=True,)all_content = "" # Initialize an empty string to hold all contentfor part in stream:chunk_message = (part.choices[0].delta.content or "")collected_messages.append(chunk_message) # save the messagecontent=part.choices[0].delta.contentall_content += contenttry:report.append(content)if len(content) > 0:1 unmodified lineres_box.markdown(f'*{result}*')except:st.write(' ')full_reply_content = all_content#for chunk in client.chat.completions.create(
app.py+3-2