Spaces:
Runtime error
Runtime error
Update app.py
Browse files168 unmodified lines1691701711721731741751751761771781791801 unmodified line182183184184185186187188168 unmodified lines messages=conversation, stream=True, ) all_content = "" # Initialize an empty string to hold all content 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.content all_content += content try: report.append(content) if len(content) > 0:1 unmodified line res_box.markdown(f'*{result}*') except: st.write(' ') full_reply_content = ''.join([m.get('content', '') for m in collected_messages]) full_reply_content = all_content
#for chunk in client.chat.completions.create(app.py+3-2