Skip to content

S2S context summarization: Upgrade websockets.connect() call to v15#2344

Open
gabor-openai wants to merge 2 commits intomainfrom
dev/gabor/rt-context-summarization-legacy-websockets
Open

S2S context summarization: Upgrade websockets.connect() call to v15#2344
gabor-openai wants to merge 2 commits intomainfrom
dev/gabor/rt-context-summarization-legacy-websockets

Conversation

@gabor-openai
Copy link
Contributor

Summary

In Websockets V15.0.1, the extra_headers parameter is replaced by the additional_headers parameter. Upgrade guide:
https://websockets.readthedocs.io/en/stable/howto/upgrade.html#arguments-of-connect

Motivation

The current implementation throws the following error:

Cell In[12], line 20, in realtime_session(model, voice, enable_playback)
     17 url = f"wss://api.openai.com/v1/realtime?model={model}"
     18 headers = {"Authorization": f"Bearer {openai.api_key}"}
---> 20 async with websockets.connect(url, extra_headers=headers, max_size=1 << 24) as ws:

TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'extra_headers'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant