letta-client 0.1.113__py3-none-any.whl → 0.1.114__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.
- letta_client/agents/client.py +124 -0
- letta_client/core/client_wrapper.py +1 -1
- {letta_client-0.1.113.dist-info → letta_client-0.1.114.dist-info}/METADATA +1 -1
- {letta_client-0.1.113.dist-info → letta_client-0.1.114.dist-info}/RECORD +5 -5
- {letta_client-0.1.113.dist-info → letta_client-0.1.114.dist-info}/WHEEL +0 -0
letta_client/agents/client.py
CHANGED
|
@@ -1237,6 +1237,64 @@ class AgentsClient:
|
|
|
1237
1237
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1238
1238
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1239
1239
|
|
|
1240
|
+
def retrieve_batch_message_request(
|
|
1241
|
+
self, batch_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1242
|
+
) -> LettaBatchResponse:
|
|
1243
|
+
"""
|
|
1244
|
+
Retrieve the result or current status of a previously submitted batch message request.
|
|
1245
|
+
|
|
1246
|
+
Parameters
|
|
1247
|
+
----------
|
|
1248
|
+
batch_id : str
|
|
1249
|
+
|
|
1250
|
+
request_options : typing.Optional[RequestOptions]
|
|
1251
|
+
Request-specific configuration.
|
|
1252
|
+
|
|
1253
|
+
Returns
|
|
1254
|
+
-------
|
|
1255
|
+
LettaBatchResponse
|
|
1256
|
+
Successful Response
|
|
1257
|
+
|
|
1258
|
+
Examples
|
|
1259
|
+
--------
|
|
1260
|
+
from letta_client import Letta
|
|
1261
|
+
|
|
1262
|
+
client = Letta(
|
|
1263
|
+
token="YOUR_TOKEN",
|
|
1264
|
+
)
|
|
1265
|
+
client.agents.retrieve_batch_message_request(
|
|
1266
|
+
batch_id="batch_id",
|
|
1267
|
+
)
|
|
1268
|
+
"""
|
|
1269
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
1270
|
+
f"v1/agents/messages/batches/{jsonable_encoder(batch_id)}",
|
|
1271
|
+
method="GET",
|
|
1272
|
+
request_options=request_options,
|
|
1273
|
+
)
|
|
1274
|
+
try:
|
|
1275
|
+
if 200 <= _response.status_code < 300:
|
|
1276
|
+
return typing.cast(
|
|
1277
|
+
LettaBatchResponse,
|
|
1278
|
+
construct_type(
|
|
1279
|
+
type_=LettaBatchResponse, # type: ignore
|
|
1280
|
+
object_=_response.json(),
|
|
1281
|
+
),
|
|
1282
|
+
)
|
|
1283
|
+
if _response.status_code == 422:
|
|
1284
|
+
raise UnprocessableEntityError(
|
|
1285
|
+
typing.cast(
|
|
1286
|
+
HttpValidationError,
|
|
1287
|
+
construct_type(
|
|
1288
|
+
type_=HttpValidationError, # type: ignore
|
|
1289
|
+
object_=_response.json(),
|
|
1290
|
+
),
|
|
1291
|
+
)
|
|
1292
|
+
)
|
|
1293
|
+
_response_json = _response.json()
|
|
1294
|
+
except JSONDecodeError:
|
|
1295
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1296
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1297
|
+
|
|
1240
1298
|
def search(
|
|
1241
1299
|
self,
|
|
1242
1300
|
*,
|
|
@@ -2596,6 +2654,72 @@ class AsyncAgentsClient:
|
|
|
2596
2654
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2597
2655
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2598
2656
|
|
|
2657
|
+
async def retrieve_batch_message_request(
|
|
2658
|
+
self, batch_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2659
|
+
) -> LettaBatchResponse:
|
|
2660
|
+
"""
|
|
2661
|
+
Retrieve the result or current status of a previously submitted batch message request.
|
|
2662
|
+
|
|
2663
|
+
Parameters
|
|
2664
|
+
----------
|
|
2665
|
+
batch_id : str
|
|
2666
|
+
|
|
2667
|
+
request_options : typing.Optional[RequestOptions]
|
|
2668
|
+
Request-specific configuration.
|
|
2669
|
+
|
|
2670
|
+
Returns
|
|
2671
|
+
-------
|
|
2672
|
+
LettaBatchResponse
|
|
2673
|
+
Successful Response
|
|
2674
|
+
|
|
2675
|
+
Examples
|
|
2676
|
+
--------
|
|
2677
|
+
import asyncio
|
|
2678
|
+
|
|
2679
|
+
from letta_client import AsyncLetta
|
|
2680
|
+
|
|
2681
|
+
client = AsyncLetta(
|
|
2682
|
+
token="YOUR_TOKEN",
|
|
2683
|
+
)
|
|
2684
|
+
|
|
2685
|
+
|
|
2686
|
+
async def main() -> None:
|
|
2687
|
+
await client.agents.retrieve_batch_message_request(
|
|
2688
|
+
batch_id="batch_id",
|
|
2689
|
+
)
|
|
2690
|
+
|
|
2691
|
+
|
|
2692
|
+
asyncio.run(main())
|
|
2693
|
+
"""
|
|
2694
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
2695
|
+
f"v1/agents/messages/batches/{jsonable_encoder(batch_id)}",
|
|
2696
|
+
method="GET",
|
|
2697
|
+
request_options=request_options,
|
|
2698
|
+
)
|
|
2699
|
+
try:
|
|
2700
|
+
if 200 <= _response.status_code < 300:
|
|
2701
|
+
return typing.cast(
|
|
2702
|
+
LettaBatchResponse,
|
|
2703
|
+
construct_type(
|
|
2704
|
+
type_=LettaBatchResponse, # type: ignore
|
|
2705
|
+
object_=_response.json(),
|
|
2706
|
+
),
|
|
2707
|
+
)
|
|
2708
|
+
if _response.status_code == 422:
|
|
2709
|
+
raise UnprocessableEntityError(
|
|
2710
|
+
typing.cast(
|
|
2711
|
+
HttpValidationError,
|
|
2712
|
+
construct_type(
|
|
2713
|
+
type_=HttpValidationError, # type: ignore
|
|
2714
|
+
object_=_response.json(),
|
|
2715
|
+
),
|
|
2716
|
+
)
|
|
2717
|
+
)
|
|
2718
|
+
_response_json = _response.json()
|
|
2719
|
+
except JSONDecodeError:
|
|
2720
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2721
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2722
|
+
|
|
2599
2723
|
async def search(
|
|
2600
2724
|
self,
|
|
2601
2725
|
*,
|
|
@@ -16,7 +16,7 @@ class BaseClientWrapper:
|
|
|
16
16
|
headers: typing.Dict[str, str] = {
|
|
17
17
|
"X-Fern-Language": "Python",
|
|
18
18
|
"X-Fern-SDK-Name": "letta-client",
|
|
19
|
-
"X-Fern-SDK-Version": "0.1.
|
|
19
|
+
"X-Fern-SDK-Version": "0.1.114",
|
|
20
20
|
}
|
|
21
21
|
if self.token is not None:
|
|
22
22
|
headers["Authorization"] = f"Bearer {self.token}"
|
|
@@ -2,7 +2,7 @@ letta_client/__init__.py,sha256=d1gnZZWntFsL6yIr_dKOqcnHqMkHuHvkiXC35I5vrUs,1466
|
|
|
2
2
|
letta_client/agents/__init__.py,sha256=CveigJGrnkw3yZ8S9yZ2DpK1HV0v1fU-khsiLJJ0uaU,1452
|
|
3
3
|
letta_client/agents/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
4
4
|
letta_client/agents/blocks/client.py,sha256=u5zvutxoH_DqfSLWhRtNSRBC9_ezQDx682cxkxDz3JA,23822
|
|
5
|
-
letta_client/agents/client.py,sha256=
|
|
5
|
+
letta_client/agents/client.py,sha256=VGKkSVTJ5j52fIh7PSNmMBD7gd0ZBu3dYcDPRoYU6as,103492
|
|
6
6
|
letta_client/agents/context/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
7
7
|
letta_client/agents/context/client.py,sha256=GKKvoG4N_K8Biz9yDjeIHpFG0C8Cwc7tHmEX3pTL_9U,4815
|
|
8
8
|
letta_client/agents/core_memory/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
@@ -44,7 +44,7 @@ letta_client/blocks/client.py,sha256=LE9dsHaBxFLC3G035f0VpNDG7XKWRK8y9OXpeFCMvUw
|
|
|
44
44
|
letta_client/client.py,sha256=k2mZqqEWciVmEQHgipjCK4kQILk74hpSqzcdNwdql9A,21212
|
|
45
45
|
letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
|
|
46
46
|
letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
47
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
47
|
+
letta_client/core/client_wrapper.py,sha256=J-2xR0tPxzouI60voBOA1Cj19O7nBlMt7WXGhSqr9Qs,1998
|
|
48
48
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
49
49
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
50
50
|
letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
|
|
@@ -330,6 +330,6 @@ letta_client/voice/__init__.py,sha256=7hX85553PiRMtIMM12a0DSoFzsglNiUziYR2ekS84Q
|
|
|
330
330
|
letta_client/voice/client.py,sha256=STjswa5oOLoP59QwTJvQwi73kgn0UzKOaXc2CsTRI4k,6912
|
|
331
331
|
letta_client/voice/types/__init__.py,sha256=FRc3iKRTONE4N8Lf1IqvnqWZ2kXdrFFvkL7PxVcR8Ew,212
|
|
332
332
|
letta_client/voice/types/create_voice_chat_completions_request_body.py,sha256=ZLfKgNK1T6IAwLEvaBVFfy7jEAoPUXP28n-nfmHkklc,391
|
|
333
|
-
letta_client-0.1.
|
|
334
|
-
letta_client-0.1.
|
|
335
|
-
letta_client-0.1.
|
|
333
|
+
letta_client-0.1.114.dist-info/METADATA,sha256=1wNYLSLYEtjzRn9GgYNSvEcrCbdtBISBKPaDjpuAw_0,5042
|
|
334
|
+
letta_client-0.1.114.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
335
|
+
letta_client-0.1.114.dist-info/RECORD,,
|
|
File without changes
|