Skip to content

Commit

Permalink
fix: realtime api headers
Browse files Browse the repository at this point in the history
  • Loading branch information
csgulati09 committed Dec 26, 2024
1 parent bb5989e commit c3b60eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions portkey_ai/api_resources/apis/beta_realtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def connect(
return self.openai_client.beta.realtime.connect(
model=model,
websocket_connection_options=websocket_connection_options,
extra_headers=self.openai_client.default_headers,
**kwargs,
)

Expand All @@ -49,6 +50,7 @@ def connect(
return self.openai_client.beta.realtime.connect(
model=model,
websocket_connection_options=websocket_connection_options,
extra_headers=self.openai_client.default_headers,
**kwargs,
)

Expand Down
4 changes: 2 additions & 2 deletions portkey_ai/api_resources/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __init__(
default_headers=self.allHeaders,
http_client=http_client,
max_retries=0,
websocket_base_url=websocket_base_url,
websocket_base_url=self.websocket_base_url,
)

self.completions = apis.Completion(self)
Expand Down Expand Up @@ -352,7 +352,7 @@ def __init__(
default_headers=self.allHeaders,
http_client=http_client,
max_retries=0,
websocket_base_url=websocket_base_url,
websocket_base_url=self.websocket_base_url,
)

self.completions = apis.AsyncCompletion(self)
Expand Down

0 comments on commit c3b60eb

Please sign in to comment.