letta-client 0.1.284__py3-none-any.whl → 0.1.285__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.

Potentially problematic release.


This version of letta-client might be problematic. Click here for more details.

@@ -24,10 +24,10 @@ class BaseClientWrapper:
24
24
 
25
25
  def get_headers(self) -> typing.Dict[str, str]:
26
26
  headers: typing.Dict[str, str] = {
27
- "User-Agent": "letta-client/0.1.284",
27
+ "User-Agent": "letta-client/0.1.285",
28
28
  "X-Fern-Language": "Python",
29
29
  "X-Fern-SDK-Name": "letta-client",
30
- "X-Fern-SDK-Version": "0.1.284",
30
+ "X-Fern-SDK-Version": "0.1.285",
31
31
  **(self.get_custom_headers() or {}),
32
32
  }
33
33
  if self._project is not None:
@@ -25,7 +25,7 @@ class TelemetryClient:
25
25
 
26
26
  def retrieve_provider_trace(
27
27
  self, step_id: str, *, request_options: typing.Optional[RequestOptions] = None
28
- ) -> ProviderTrace:
28
+ ) -> typing.Optional[ProviderTrace]:
29
29
  """
30
30
  Parameters
31
31
  ----------
@@ -36,7 +36,7 @@ class TelemetryClient:
36
36
 
37
37
  Returns
38
38
  -------
39
- ProviderTrace
39
+ typing.Optional[ProviderTrace]
40
40
  Successful Response
41
41
 
42
42
  Examples
@@ -72,7 +72,7 @@ class AsyncTelemetryClient:
72
72
 
73
73
  async def retrieve_provider_trace(
74
74
  self, step_id: str, *, request_options: typing.Optional[RequestOptions] = None
75
- ) -> ProviderTrace:
75
+ ) -> typing.Optional[ProviderTrace]:
76
76
  """
77
77
  Parameters
78
78
  ----------
@@ -83,7 +83,7 @@ class AsyncTelemetryClient:
83
83
 
84
84
  Returns
85
85
  -------
86
- ProviderTrace
86
+ typing.Optional[ProviderTrace]
87
87
  Successful Response
88
88
 
89
89
  Examples
@@ -20,7 +20,7 @@ class RawTelemetryClient:
20
20
 
21
21
  def retrieve_provider_trace(
22
22
  self, step_id: str, *, request_options: typing.Optional[RequestOptions] = None
23
- ) -> HttpResponse[ProviderTrace]:
23
+ ) -> HttpResponse[typing.Optional[ProviderTrace]]:
24
24
  """
25
25
  Parameters
26
26
  ----------
@@ -31,7 +31,7 @@ class RawTelemetryClient:
31
31
 
32
32
  Returns
33
33
  -------
34
- HttpResponse[ProviderTrace]
34
+ HttpResponse[typing.Optional[ProviderTrace]]
35
35
  Successful Response
36
36
  """
37
37
  _response = self._client_wrapper.httpx_client.request(
@@ -40,11 +40,13 @@ class RawTelemetryClient:
40
40
  request_options=request_options,
41
41
  )
42
42
  try:
43
+ if _response is None or not _response.text.strip():
44
+ return HttpResponse(response=_response, data=None)
43
45
  if 200 <= _response.status_code < 300:
44
46
  _data = typing.cast(
45
- ProviderTrace,
47
+ typing.Optional[ProviderTrace],
46
48
  construct_type(
47
- type_=ProviderTrace, # type: ignore
49
+ type_=typing.Optional[ProviderTrace], # type: ignore
48
50
  object_=_response.json(),
49
51
  ),
50
52
  )
@@ -72,7 +74,7 @@ class AsyncRawTelemetryClient:
72
74
 
73
75
  async def retrieve_provider_trace(
74
76
  self, step_id: str, *, request_options: typing.Optional[RequestOptions] = None
75
- ) -> AsyncHttpResponse[ProviderTrace]:
77
+ ) -> AsyncHttpResponse[typing.Optional[ProviderTrace]]:
76
78
  """
77
79
  Parameters
78
80
  ----------
@@ -83,7 +85,7 @@ class AsyncRawTelemetryClient:
83
85
 
84
86
  Returns
85
87
  -------
86
- AsyncHttpResponse[ProviderTrace]
88
+ AsyncHttpResponse[typing.Optional[ProviderTrace]]
87
89
  Successful Response
88
90
  """
89
91
  _response = await self._client_wrapper.httpx_client.request(
@@ -92,11 +94,13 @@ class AsyncRawTelemetryClient:
92
94
  request_options=request_options,
93
95
  )
94
96
  try:
97
+ if _response is None or not _response.text.strip():
98
+ return AsyncHttpResponse(response=_response, data=None)
95
99
  if 200 <= _response.status_code < 300:
96
100
  _data = typing.cast(
97
- ProviderTrace,
101
+ typing.Optional[ProviderTrace],
98
102
  construct_type(
99
- type_=ProviderTrace, # type: ignore
103
+ type_=typing.Optional[ProviderTrace], # type: ignore
100
104
  object_=_response.json(),
101
105
  ),
102
106
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.284
3
+ Version: 0.1.285
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -89,7 +89,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_list_clie
89
89
  letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item_policy_data_item_access_item.py,sha256=kNHfEWFl7u71Pu8NPqutod0a2NXfvq8il05Hqm0iBB4,284
90
90
  letta_client/core/__init__.py,sha256=tpn7rjb6C2UIkYZYIqdrNpI7Yax2jw88sXh2baxaxAI,1715
91
91
  letta_client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
92
- letta_client/core/client_wrapper.py,sha256=TKeosu9kI14Gv4VBIinenJ2JYhrJa3CED7XOBU4vkaM,2776
92
+ letta_client/core/client_wrapper.py,sha256=REbiH5wEvxfrWT0dVUL6-PWqIhXAVJZrHbfWFWcavL8,2776
93
93
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
94
94
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
95
95
  letta_client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
@@ -197,8 +197,8 @@ letta_client/tags/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4
197
197
  letta_client/tags/client.py,sha256=dzxJ8H9OGvKQ6g7uwXsVS77DFM5XkQCcFxRk159N9XQ,3367
198
198
  letta_client/tags/raw_client.py,sha256=DQXEgzOuCygBMbzX63Sc9UwfueALa5rUHH3c8jb4Okw,5219
199
199
  letta_client/telemetry/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
200
- letta_client/telemetry/client.py,sha256=N5bjIcLVT9FL5nGTbLxlNOOytXQlRWquyyuoWjPZS_g,2974
201
- letta_client/telemetry/raw_client.py,sha256=305pp86KAnZRtim9lrSyxEA0d8PyC8ZWuFNZgaNs8VA,4559
200
+ letta_client/telemetry/client.py,sha256=cHMxfLAFjbT-XLtG0o04tGMaRnabrPuixbfHV3HFitE,3042
201
+ letta_client/telemetry/raw_client.py,sha256=Zxs3KkYCfs6M1b4vJbzHunZs7SzSiYAiy4Nb7tFAKC8,4962
202
202
  letta_client/templates/__init__.py,sha256=oSoLLxT2-ptOxuKI6kPrrD9cqkgU2BzhlR8O-Xuh3VA,3736
203
203
  letta_client/templates/agents/__init__.py,sha256=Nb3AeDuJhSba_DbgHKuCUY1b3PT1jj3-YMJ7uW7RIAk,393
204
204
  letta_client/templates/agents/client.py,sha256=HCCEZZ3b0tGonxDNbiPuXadoZu_x1G_OtBdTHRBpG4M,7088
@@ -566,6 +566,6 @@ letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
566
566
  letta_client/voice/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
567
567
  letta_client/voice/client.py,sha256=EbIVOQh4HXqU9McATxwga08STk-HUwPEAUr_UHqyKHg,3748
568
568
  letta_client/voice/raw_client.py,sha256=KvM_3GXuSf51bubM0RVBnxvlf20qZTFMnaA_BzhXzjQ,5938
569
- letta_client-0.1.284.dist-info/METADATA,sha256=Xc8f2yVV4JOAdnPa2L6efVoKHH3u2VfKCHiHhf6pu9Q,5782
570
- letta_client-0.1.284.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
571
- letta_client-0.1.284.dist-info/RECORD,,
569
+ letta_client-0.1.285.dist-info/METADATA,sha256=9863hIS8qOxUowgyd9BEjQSPLhrVlcV-UsrFyyKqpEU,5782
570
+ letta_client-0.1.285.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
571
+ letta_client-0.1.285.dist-info/RECORD,,