Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"skip_validation": true
}
},
"originGitCommit": "0052a020a7becd03b349857664c9f4a89b6c449a",
"originGitCommit": "d228f82e93aaa8aa77f978d458cf912f3daaa8c1",
"originGitCommitIsDirty": true,
"invokedBy": "manual",
"sdkVersion": "7.1.2"
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "deepgram-sdk"
version = "7.1.1"
version = "7.1.2"
description = ""
readme = "README.md"
authors = []
Expand Down
4 changes: 2 additions & 2 deletions src/deepgram/agent/v1/settings/think/models/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def list(
"""
_response = self._client_wrapper.httpx_client.request(
"v1/agent/settings/think/models",
base_url=self._client_wrapper.get_environment().agent,
base_url=self._client_wrapper.get_environment().agent_rest,
method="GET",
request_options=request_options,
)
Expand Down Expand Up @@ -93,7 +93,7 @@ async def list(
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/agent/settings/think/models",
base_url=self._client_wrapper.get_environment().agent,
base_url=self._client_wrapper.get_environment().agent_rest,
method="GET",
request_options=request_options,
)
Expand Down
4 changes: 2 additions & 2 deletions src/deepgram/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "deepgram-sdk/7.1.1",
"User-Agent": "deepgram-sdk/7.1.2",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "deepgram-sdk",
"X-Fern-SDK-Version": "7.1.1",
"X-Fern-SDK-Version": "7.1.2",
**(self.get_custom_headers() or {}),
}
headers["Authorization"] = f"Token {self.api_key}"
Expand Down
12 changes: 6 additions & 6 deletions src/deepgram/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

class DeepgramClientEnvironment:
PRODUCTION: DeepgramClientEnvironment
AGENT: DeepgramClientEnvironment

def __init__(self, *, base: str, production: str, agent: str):
def __init__(self, *, base: str, production: str, agent: str, agent_rest: str):
self.base = base
self.production = production
self.agent = agent
self.agent_rest = agent_rest


DeepgramClientEnvironment.PRODUCTION = DeepgramClientEnvironment(
base="https://api.deepgram.com", production="wss://api.deepgram.com", agent="wss://agent.deepgram.com"
)
DeepgramClientEnvironment.AGENT = DeepgramClientEnvironment(
base="https://agent.deepgram.com", production="wss://api.deepgram.com", agent="wss://agent.deepgram.com"
base="https://api.deepgram.com",
production="wss://api.deepgram.com",
agent="wss://agent.deepgram.com",
agent_rest="https://agent.deepgram.com",
)
6 changes: 4 additions & 2 deletions tests/wire/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ def get_client(test_id: str) -> DeepgramClient:

if _CLIENT_SUPPORTS_HEADERS:
return DeepgramClient(
environment=DeepgramClientEnvironment(base=base_url, production=base_url, agent=base_url),
environment=DeepgramClientEnvironment(
base=base_url, production=base_url, agent=base_url, agent_rest=base_url
),
headers=test_headers,
api_key="test_api_key",
)

return DeepgramClient(
environment=DeepgramClientEnvironment(base=base_url, production=base_url, agent=base_url),
environment=DeepgramClientEnvironment(base=base_url, production=base_url, agent=base_url, agent_rest=base_url),
httpx_client=httpx.Client(headers=test_headers),
api_key="test_api_key",
)
Expand Down
Loading