Closed jjmaldonis closed 3 months ago
The recent modifications to the convert_to_websocket_url
function enhance its ability to determine the appropriate WebSocket URL scheme based on the provided base_url
. By introducing the use_ssl
variable, which detects whether the base_url
contains "http://", the function can dynamically select between secure ("wss://") and non-secure ("ws://") WebSocket connections. This change improves flexibility for handling different connection types.
Files | Change Summary |
---|---|
deepgram/clients/listen/v1/helpers.py | Modified convert_to_websocket_url to use a use_ssl variable for determining WebSocket URL scheme based on base_url , enhancing flexibility in connection handling. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Nice!
Proposed changes
The code currently only supports SSL-secured websocket connections, which means the SDK doesn't support testing self-hosted deployments when running on the self-hosted server itself (i.e.
ws://
connections).This change updates the code to use
ws://
rather thanwss://
when the user specifieshttp://
in theirapi_url
.Types of changes
What types of changes does your code introduce to the community Python SDK? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
Tested!
Summary by CodeRabbit