Jack
commited on
Commit
·
0264b46
1
Parent(s):
bc091a0
added various files
Browse files
app.py
CHANGED
@@ -110,6 +110,9 @@ To get started, upload the audio below.
|
|
110 |
token = part.choices[0].delta.content or ""
|
111 |
await msg.stream_token(token)
|
112 |
|
|
|
|
|
|
|
113 |
except Exception as e:
|
114 |
# Log any errors that occur during session initialization
|
115 |
print(f"Error during on_chat_start: {str(e)}")
|
|
|
110 |
token = part.choices[0].delta.content or ""
|
111 |
await msg.stream_token(token)
|
112 |
|
113 |
+
# Ensure the final token is sent and the message stream is complete
|
114 |
+
await msg.send() # This will mark the end of the streaming process
|
115 |
+
|
116 |
except Exception as e:
|
117 |
# Log any errors that occur during session initialization
|
118 |
print(f"Error during on_chat_start: {str(e)}")
|