Skip to content

Commit 296f214

Browse files
committed
Expose agent deployment exceptions via public API and fix example import
1 parent 911c72f commit 296f214

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/agent_wait_until_ready.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
an agent to finish deploying before using it.
66
"""
77

8-
from gradient import Gradient
9-
from gradient._exceptions import AgentDeploymentError, AgentDeploymentTimeoutError
8+
from gradient import Gradient, AgentDeploymentError, AgentDeploymentTimeoutError
109

1110
# Initialize the Gradient client
1211
client = Gradient()

src/gradient/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
PermissionDeniedError,
3636
UnprocessableEntityError,
3737
APIResponseValidationError,
38+
AgentDeploymentError,
39+
AgentDeploymentTimeoutError,
3840
)
3941
from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient
4042
from ._utils._logs import setup_logging as _setup_logging
@@ -57,6 +59,8 @@
5759
"APITimeoutError",
5860
"APIConnectionError",
5961
"APIResponseValidationError",
62+
"AgentDeploymentError",
63+
"AgentDeploymentTimeoutError",
6064
"BadRequestError",
6165
"AuthenticationError",
6266
"PermissionDeniedError",

0 commit comments

Comments
 (0)