We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 536391f commit b339a00Copy full SHA for b339a00
1 file changed
examples/say-server/server.py
@@ -327,11 +327,15 @@ def poll_tts_audio(queue_id: str) -> list[types.TextContent]:
327
queue_id: The queue ID from create_tts_queue
328
"""
329
import json
330
+ import time
331
332
state = tts_queues.get(queue_id)
333
if not state:
334
return [types.TextContent(type="text", text='{"error": "Queue not found"}')]
335
336
+ # Update last activity to prevent timeout during active polling
337
+ state.last_activity = time.time()
338
+
339
# Get new chunks (use sync approach since we can't await in tool)
340
# The lock is async, so we need to be careful here
341
# For simplicity, just grab what's available without locking
0 commit comments