File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
src/openai/resources/realtime Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -326,6 +326,7 @@ async def __aenter__(self) -> AsyncRealtimeConnection:
326
326
raise OpenAIError ("You need to install `openai[realtime]` to use this method" ) from exc
327
327
328
328
extra_query = self .__extra_query
329
+ await self .__client ._refresh_api_key ()
329
330
auth_headers = self .__client .auth_headers
330
331
if is_async_azure_client (self .__client ):
331
332
url , auth_headers = await self .__client ._configure_realtime (self .__model , extra_query )
@@ -507,6 +508,7 @@ def __enter__(self) -> RealtimeConnection:
507
508
raise OpenAIError ("You need to install `openai[realtime]` to use this method" ) from exc
508
509
509
510
extra_query = self .__extra_query
511
+ self .__client ._refresh_api_key ()
510
512
auth_headers = self .__client .auth_headers
511
513
if is_azure_client (self .__client ):
512
514
url , auth_headers = self .__client ._configure_realtime (self .__model , extra_query )
You can’t perform that action at this time.
0 commit comments