File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/elevenlabs/conversational_ai Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1111from websockets .exceptions import ConnectionClosedOK
1212
1313from ..base_client import BaseElevenLabs
14+ from ..version import __version__
1415
1516
1617class ClientToOrchestratorEvent (str , Enum ):
@@ -491,8 +492,11 @@ def send_response(response):
491492
492493 def _get_wss_url (self ):
493494 base_ws_url = self .client ._client_wrapper .get_environment ().wss
494- return f"{ base_ws_url } /v1/convai/conversation?agent_id={ self .agent_id } "
495+ return f"{ base_ws_url } /v1/convai/conversation?agent_id={ self .agent_id } &source=python_sdk&version= { __version__ } "
495496
496497 def _get_signed_url (self ):
497498 response = self .client .conversational_ai .conversations .get_signed_url (agent_id = self .agent_id )
498- return response .signed_url
499+ signed_url = response .signed_url
500+ # Append source and version query parameters to the signed URL
501+ separator = "&" if "?" in signed_url else "?"
502+ return f"{ signed_url } { separator } source=python_sdk&version={ __version__ } "
You can’t perform that action at this time.
0 commit comments