agents
agents copied to clipboard
Close TTS connections when closing the session
I have an agent that transfers to other agents, during testing I unexpectedly hit the Inference TTS quota. After digging around a bit I discovered that after every transfer, the number of TTS connections to my dev Inference service kept increasing.
As far as I can tell, this only happens for TTS plugins that use a connection pool.
I tested this change with TTS plugins that do and do not use a connection pool. In the case of TTS plugins that do not use a connection pool.
This doesn't happen for STT connections since those get closed here .
Feedback welcome, let me know if there's an alternative way to handle this situation.