Skip to content

Commit 7249d59

Browse files
committed
fixes
1 parent 044df6f commit 7249d59

2 files changed

Lines changed: 41 additions & 8 deletions

File tree

  • packages/uipath_langchain_client/src/uipath_langchain_client
  • src/uipath/llm_client/utils
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from uipath.llm_client.utils.exceptions import (
2+
UiPathAPIError,
3+
UiPathAuthenticationError,
4+
UiPathBadRequestError,
5+
UiPathConflictError,
6+
UiPathGatewayTimeoutError,
7+
UiPathInternalServerError,
8+
UiPathNotFoundError,
9+
UiPathPermissionDeniedError,
10+
UiPathRateLimitError,
11+
UiPathRequestTooLargeError,
12+
UiPathServiceUnavailableError,
13+
UiPathTooManyRequestsError,
14+
UiPathUnprocessableEntityError,
15+
)
16+
from uipath.llm_client.utils.retry import RetryConfig
17+
18+
__all__ = [
19+
"RetryConfig",
20+
"UiPathAPIError",
21+
"UiPathBadRequestError",
22+
"UiPathAuthenticationError",
23+
"UiPathPermissionDeniedError",
24+
"UiPathNotFoundError",
25+
"UiPathConflictError",
26+
"UiPathRequestTooLargeError",
27+
"UiPathUnprocessableEntityError",
28+
"UiPathRateLimitError",
29+
"UiPathInternalServerError",
30+
"UiPathServiceUnavailableError",
31+
"UiPathGatewayTimeoutError",
32+
"UiPathTooManyRequestsError",
33+
]

src/uipath/llm_client/utils/retry.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@
4949

5050
from uipath.llm_client.utils.exceptions import UiPathAPIError, UiPathRateLimitError
5151

52-
__all__ = [
53-
"RetryConfig",
54-
"RetryableHTTPTransport",
55-
"RetryableAsyncHTTPTransport",
56-
]
57-
58-
5952
# Default retry configuration values
6053
_DEFAULT_RETRY_ON_EXCEPTIONS: tuple[type[Exception], ...] = (UiPathRateLimitError,)
6154
_DEFAULT_INITIAL_DELAY: float = 2.0
@@ -147,7 +140,7 @@ class RetryConfig(TypedDict):
147140
... }
148141
"""
149142

150-
retry_on_exceptions: NotRequired[tuple[type[UiPathAPIError], ...]]
143+
retry_on_exceptions: NotRequired[tuple[type[Exception], ...]]
151144
initial_delay: NotRequired[float]
152145
max_delay: NotRequired[float]
153146
exp_base: NotRequired[float]
@@ -327,3 +320,10 @@ async def _send() -> Response:
327320
return await _send()
328321
except UiPathAPIError as e:
329322
return e.response
323+
324+
325+
__all__ = [
326+
"RetryConfig",
327+
"RetryableHTTPTransport",
328+
"RetryableAsyncHTTPTransport",
329+
]

0 commit comments

Comments
 (0)