Update app.py
Browse files
app.py
CHANGED
@@ -41,9 +41,9 @@ if prompt := st.chat_input("How can I help you today?"):
|
|
41 |
stream=True,
|
42 |
)
|
43 |
|
44 |
-
for
|
45 |
-
if
|
46 |
-
full_response +=
|
47 |
message_placeholder.markdown(full_response + "▌")
|
48 |
|
49 |
message_placeholder.markdown(full_response)
|
|
|
41 |
stream=True,
|
42 |
)
|
43 |
|
44 |
+
for event in response:
|
45 |
+
if event.type == 'response.output_text.delta':
|
46 |
+
full_response += event.delta.content.replace('\\$','$').replace('$','\\$')
|
47 |
message_placeholder.markdown(full_response + "▌")
|
48 |
|
49 |
message_placeholder.markdown(full_response)
|