uipath-llm-client 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  __titile__ = "UiPath LLM Client"
2
2
  __description__ = "A Python client for interacting with UiPath's LLM services."
3
- __version__ = "1.0.0"
3
+ __version__ = "1.0.1"
@@ -1,11 +1,11 @@
1
1
  from collections.abc import Generator
2
2
 
3
- from httpx import Auth, Client, HTTPStatusError, Request, Response
3
+ from httpx import Auth, Client, Request, Response
4
4
 
5
5
  from uipath_llm_client.settings.llmgateway.settings import LLMGatewayBaseSettings
6
6
  from uipath_llm_client.settings.llmgateway.utils import LLMGatewayEndpoints
7
7
  from uipath_llm_client.settings.utils import SingletonMeta
8
- from uipath_llm_client.utils.exceptions import UiPathAPIError
8
+ from uipath_llm_client.utils.exceptions import UiPathAPIError, UiPathAuthenticationError
9
9
 
10
10
 
11
11
  class LLMGatewayS2SAuth(Auth, metaclass=SingletonMeta):
@@ -39,10 +39,15 @@ class LLMGatewayS2SAuth(Auth, metaclass=SingletonMeta):
39
39
  )
40
40
  with Client() as http_client:
41
41
  response = http_client.post(url_get_token, data=token_credentials)
42
- try:
43
- response.raise_for_status()
44
- except HTTPStatusError as e:
45
- raise UiPathAPIError.from_response(e.response)
42
+ if response.is_client_error:
43
+ raise UiPathAuthenticationError(
44
+ message="Failed to authenticate with LLM Gateway, invalid credentials",
45
+ request=response.request,
46
+ response=response,
47
+ body=response.json(),
48
+ )
49
+ elif response.is_error:
50
+ raise UiPathAPIError.from_response(response)
46
51
  llmgw_token_header = response.json().get("access_token")
47
52
  return llmgw_token_header
48
53
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath-llm-client
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: UiPath LLM Client
5
5
  Author-email: Cosmin Maria <cosmin.maria@uipath.com>, Dragos Bobolea <dragos.bobolea@uipath.com>
6
6
  License-File: LICENSE
@@ -1,5 +1,5 @@
1
1
  uipath_llm_client/__init__.py,sha256=K7pMecLOblh6GWVBkoOalC-ho5ozlw3WG6loiJNzSFo,2363
2
- uipath_llm_client/__version__.py,sha256=i-3gbkh2cjfZHmW7rn8P-fH6H8bytkCMMV7yK6auN6g,135
2
+ uipath_llm_client/__version__.py,sha256=XRsycPH7nsRKzC-w-8NWhittA9jfhtGLdZuIIybOWNQ,135
3
3
  uipath_llm_client/httpx_client.py,sha256=IscG5Qu5E60FooEktOmNVIjjBGBJoA6APNCabmSFSnA,12718
4
4
  uipath_llm_client/clients/anthropic/__init__.py,sha256=0KxbVGKSVWwC89PYPM7IXkP3qhJa2J0zyW6xsr0efWM,546
5
5
  uipath_llm_client/clients/anthropic/client.py,sha256=UjrXzsgOOgoIRjo7SiLThWtXAJIEH-BHuPy3umNcmC0,17967
@@ -16,13 +16,13 @@ uipath_llm_client/settings/agenthub/auth.py,sha256=vWb0nipR3pITNxVQmQARCsxx5ZfUA
16
16
  uipath_llm_client/settings/agenthub/settings.py,sha256=-tNiyg_AeKKNa-m2T2DG596eoCUayJrB-6KUswHncgo,5764
17
17
  uipath_llm_client/settings/agenthub/utils.py,sha256=JVpGC8SKNshCz_MCp-wcjPGTpGWTdP0TPXcPs5kDEH4,471
18
18
  uipath_llm_client/settings/llmgateway/__init__.py,sha256=QMViUqELA0LVle_WDjNivxxNaFSpr_X3yfJRsCEdZ4I,1525
19
- uipath_llm_client/settings/llmgateway/auth.py,sha256=BxZZtLvHCiFaNouS7eyYfO9GHKUllJMnVtxaPPHvClA,2441
19
+ uipath_llm_client/settings/llmgateway/auth.py,sha256=JzN6czbLOQfLF0CMuHNHJjzUOSzKfr_tVrgeC5tXSxI,2710
20
20
  uipath_llm_client/settings/llmgateway/settings.py,sha256=ZhKk94UP2yJ6MNR8mSRWmoqYB_pRv9SKmV3OWVh0CWY,4733
21
21
  uipath_llm_client/settings/llmgateway/utils.py,sha256=gqyZXulcG0ifvlaxqdOGkf24jOtjCAalBme26BmoV3Q,527
22
22
  uipath_llm_client/utils/exceptions.py,sha256=IcHPQIf-Jzir_rG7gaD7ByD25Thcl-QpAjnC6xvZ0qQ,5973
23
23
  uipath_llm_client/utils/logging.py,sha256=pmC00QAt4LVXFb6PCHQDPoX7iLE9N2GeEytuAkUiQ1w,4641
24
24
  uipath_llm_client/utils/retry.py,sha256=cvM-OBEvga6mufCQ5G9rmxVzd33wOJOO6UGOHs9IWgk,8603
25
- uipath_llm_client-1.0.0.dist-info/METADATA,sha256=BcAbGn1ItN0S6gQI9ZwuSRPXgJ9fgmoaSTl-5snnJZU,22964
26
- uipath_llm_client-1.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
27
- uipath_llm_client-1.0.0.dist-info/licenses/LICENSE,sha256=r4HMU0pdnVI7BlSYgDUCszn7IrCXJiN8o3yt2U1aOpc,375
28
- uipath_llm_client-1.0.0.dist-info/RECORD,,
25
+ uipath_llm_client-1.0.1.dist-info/METADATA,sha256=6d4sU4NIG31Cfh8ZQoZ-MZKHpBZLnLPHiuLFid_TmSk,22964
26
+ uipath_llm_client-1.0.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
27
+ uipath_llm_client-1.0.1.dist-info/licenses/LICENSE,sha256=r4HMU0pdnVI7BlSYgDUCszn7IrCXJiN8o3yt2U1aOpc,375
28
+ uipath_llm_client-1.0.1.dist-info/RECORD,,