letta-client 0.1.249__py3-none-any.whl → 0.1.251__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 +20 -4
- letta_client/agents/raw_client.py +20 -2
- letta_client/core/client_wrapper.py +2 -2
- letta_client/templates/types/templates_list_response.py +1 -3
- letta_client/templates/types/templates_list_response_templates_item.py +6 -0
- {letta_client-0.1.249.dist-info → letta_client-0.1.251.dist-info}/METADATA +1 -1
- {letta_client-0.1.249.dist-info → letta_client-0.1.251.dist-info}/RECORD +8 -8
- {letta_client-0.1.249.dist-info → letta_client-0.1.251.dist-info}/WHEEL +0 -0
letta_client/agents/client.py
CHANGED
|
@@ -461,7 +461,13 @@ class AgentsClient:
|
|
|
461
461
|
_response = self._raw_client.count(request_options=request_options)
|
|
462
462
|
return _response.data
|
|
463
463
|
|
|
464
|
-
def export_file(
|
|
464
|
+
def export_file(
|
|
465
|
+
self,
|
|
466
|
+
agent_id: str,
|
|
467
|
+
*,
|
|
468
|
+
max_steps: typing.Optional[int] = None,
|
|
469
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
470
|
+
) -> str:
|
|
465
471
|
"""
|
|
466
472
|
Export the serialized JSON representation of an agent, formatted with indentation.
|
|
467
473
|
|
|
@@ -469,6 +475,8 @@ class AgentsClient:
|
|
|
469
475
|
----------
|
|
470
476
|
agent_id : str
|
|
471
477
|
|
|
478
|
+
max_steps : typing.Optional[int]
|
|
479
|
+
|
|
472
480
|
request_options : typing.Optional[RequestOptions]
|
|
473
481
|
Request-specific configuration.
|
|
474
482
|
|
|
@@ -489,7 +497,7 @@ class AgentsClient:
|
|
|
489
497
|
agent_id="agent_id",
|
|
490
498
|
)
|
|
491
499
|
"""
|
|
492
|
-
_response = self._raw_client.export_file(agent_id, request_options=request_options)
|
|
500
|
+
_response = self._raw_client.export_file(agent_id, max_steps=max_steps, request_options=request_options)
|
|
493
501
|
return _response.data
|
|
494
502
|
|
|
495
503
|
def import_file(
|
|
@@ -1367,7 +1375,13 @@ class AsyncAgentsClient:
|
|
|
1367
1375
|
_response = await self._raw_client.count(request_options=request_options)
|
|
1368
1376
|
return _response.data
|
|
1369
1377
|
|
|
1370
|
-
async def export_file(
|
|
1378
|
+
async def export_file(
|
|
1379
|
+
self,
|
|
1380
|
+
agent_id: str,
|
|
1381
|
+
*,
|
|
1382
|
+
max_steps: typing.Optional[int] = None,
|
|
1383
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1384
|
+
) -> str:
|
|
1371
1385
|
"""
|
|
1372
1386
|
Export the serialized JSON representation of an agent, formatted with indentation.
|
|
1373
1387
|
|
|
@@ -1375,6 +1389,8 @@ class AsyncAgentsClient:
|
|
|
1375
1389
|
----------
|
|
1376
1390
|
agent_id : str
|
|
1377
1391
|
|
|
1392
|
+
max_steps : typing.Optional[int]
|
|
1393
|
+
|
|
1378
1394
|
request_options : typing.Optional[RequestOptions]
|
|
1379
1395
|
Request-specific configuration.
|
|
1380
1396
|
|
|
@@ -1403,7 +1419,7 @@ class AsyncAgentsClient:
|
|
|
1403
1419
|
|
|
1404
1420
|
asyncio.run(main())
|
|
1405
1421
|
"""
|
|
1406
|
-
_response = await self._raw_client.export_file(agent_id, request_options=request_options)
|
|
1422
|
+
_response = await self._raw_client.export_file(agent_id, max_steps=max_steps, request_options=request_options)
|
|
1407
1423
|
return _response.data
|
|
1408
1424
|
|
|
1409
1425
|
async def import_file(
|
|
@@ -493,7 +493,11 @@ class RawAgentsClient:
|
|
|
493
493
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
494
494
|
|
|
495
495
|
def export_file(
|
|
496
|
-
self,
|
|
496
|
+
self,
|
|
497
|
+
agent_id: str,
|
|
498
|
+
*,
|
|
499
|
+
max_steps: typing.Optional[int] = None,
|
|
500
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
497
501
|
) -> HttpResponse[str]:
|
|
498
502
|
"""
|
|
499
503
|
Export the serialized JSON representation of an agent, formatted with indentation.
|
|
@@ -502,6 +506,8 @@ class RawAgentsClient:
|
|
|
502
506
|
----------
|
|
503
507
|
agent_id : str
|
|
504
508
|
|
|
509
|
+
max_steps : typing.Optional[int]
|
|
510
|
+
|
|
505
511
|
request_options : typing.Optional[RequestOptions]
|
|
506
512
|
Request-specific configuration.
|
|
507
513
|
|
|
@@ -513,6 +519,9 @@ class RawAgentsClient:
|
|
|
513
519
|
_response = self._client_wrapper.httpx_client.request(
|
|
514
520
|
f"v1/agents/{jsonable_encoder(agent_id)}/export",
|
|
515
521
|
method="GET",
|
|
522
|
+
params={
|
|
523
|
+
"max_steps": max_steps,
|
|
524
|
+
},
|
|
516
525
|
request_options=request_options,
|
|
517
526
|
)
|
|
518
527
|
try:
|
|
@@ -1535,7 +1544,11 @@ class AsyncRawAgentsClient:
|
|
|
1535
1544
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1536
1545
|
|
|
1537
1546
|
async def export_file(
|
|
1538
|
-
self,
|
|
1547
|
+
self,
|
|
1548
|
+
agent_id: str,
|
|
1549
|
+
*,
|
|
1550
|
+
max_steps: typing.Optional[int] = None,
|
|
1551
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1539
1552
|
) -> AsyncHttpResponse[str]:
|
|
1540
1553
|
"""
|
|
1541
1554
|
Export the serialized JSON representation of an agent, formatted with indentation.
|
|
@@ -1544,6 +1557,8 @@ class AsyncRawAgentsClient:
|
|
|
1544
1557
|
----------
|
|
1545
1558
|
agent_id : str
|
|
1546
1559
|
|
|
1560
|
+
max_steps : typing.Optional[int]
|
|
1561
|
+
|
|
1547
1562
|
request_options : typing.Optional[RequestOptions]
|
|
1548
1563
|
Request-specific configuration.
|
|
1549
1564
|
|
|
@@ -1555,6 +1570,9 @@ class AsyncRawAgentsClient:
|
|
|
1555
1570
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1556
1571
|
f"v1/agents/{jsonable_encoder(agent_id)}/export",
|
|
1557
1572
|
method="GET",
|
|
1573
|
+
params={
|
|
1574
|
+
"max_steps": max_steps,
|
|
1575
|
+
},
|
|
1558
1576
|
request_options=request_options,
|
|
1559
1577
|
)
|
|
1560
1578
|
try:
|
|
@@ -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.
|
|
27
|
+
"User-Agent": "letta-client/0.1.251",
|
|
28
28
|
"X-Fern-Language": "Python",
|
|
29
29
|
"X-Fern-SDK-Name": "letta-client",
|
|
30
|
-
"X-Fern-SDK-Version": "0.1.
|
|
30
|
+
"X-Fern-SDK-Version": "0.1.251",
|
|
31
31
|
**(self.get_custom_headers() or {}),
|
|
32
32
|
}
|
|
33
33
|
if self._project is not None:
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
5
|
import pydantic
|
|
6
|
-
import typing_extensions
|
|
7
6
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
-
from ...core.serialization import FieldMetadata
|
|
9
7
|
from ...core.unchecked_base_model import UncheckedBaseModel
|
|
10
8
|
from .templates_list_response_templates_item import TemplatesListResponseTemplatesItem
|
|
11
9
|
|
|
12
10
|
|
|
13
11
|
class TemplatesListResponse(UncheckedBaseModel):
|
|
14
12
|
templates: typing.List[TemplatesListResponseTemplatesItem]
|
|
15
|
-
has_next_page:
|
|
13
|
+
has_next_page: bool
|
|
16
14
|
|
|
17
15
|
if IS_PYDANTIC_V2:
|
|
18
16
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -10,6 +10,12 @@ from ...core.unchecked_base_model import UncheckedBaseModel
|
|
|
10
10
|
class TemplatesListResponseTemplatesItem(UncheckedBaseModel):
|
|
11
11
|
name: str
|
|
12
12
|
id: str
|
|
13
|
+
project_id: str
|
|
14
|
+
project_slug: str
|
|
15
|
+
template_deployment_slug: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
The full name of the template, including version and project slug
|
|
18
|
+
"""
|
|
13
19
|
|
|
14
20
|
if IS_PYDANTIC_V2:
|
|
15
21
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -3,7 +3,7 @@ letta_client/agents/__init__.py,sha256=JkuWGGNJsCfnMr2DFzQ1SiqEB1tcFZnafdidODi0_
|
|
|
3
3
|
letta_client/agents/blocks/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
4
4
|
letta_client/agents/blocks/client.py,sha256=Akx-1SYEXkmdtLtytPtdFNhVts8JkjC2aMQnnWgd8Ug,14735
|
|
5
5
|
letta_client/agents/blocks/raw_client.py,sha256=7tdlieWtGyMe1G5Ne9Rcujvr43DbD4K3hVJ7eiJNuFo,24454
|
|
6
|
-
letta_client/agents/client.py,sha256=
|
|
6
|
+
letta_client/agents/client.py,sha256=mcY4WFizpN2ynNLocoje8rY1hixrFBTQcGSd4T8JUNY,69054
|
|
7
7
|
letta_client/agents/context/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
8
8
|
letta_client/agents/context/client.py,sha256=fhpJFWRs6INGreRyEw9gsFnlUWR48vIHbN_jVIHIBrw,3052
|
|
9
9
|
letta_client/agents/context/raw_client.py,sha256=j2gko-oEFWuCgPkcX9jCv31OWvR6sTOtAYcSWllXYDs,4747
|
|
@@ -35,7 +35,7 @@ letta_client/agents/messages/types/messages_preview_raw_payload_request.py,sha25
|
|
|
35
35
|
letta_client/agents/passages/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
36
36
|
letta_client/agents/passages/client.py,sha256=XHPpqOH2BDjHkegTRM9MRdDVxW5VH40ERSFvWchWT48,16785
|
|
37
37
|
letta_client/agents/passages/raw_client.py,sha256=TnNrFsnrexrPVmemkFbRIBfFMcq1Iap2qk23L7mr1Z0,25710
|
|
38
|
-
letta_client/agents/raw_client.py,sha256=
|
|
38
|
+
letta_client/agents/raw_client.py,sha256=uJx2SSkm0VlNnT5hcDRnaHZiWiFSnL5An6sAEpQ38fg,90483
|
|
39
39
|
letta_client/agents/sources/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
40
40
|
letta_client/agents/sources/client.py,sha256=lCqB6FF9svrwf0oZSFs41WKlMXc-YRhUeb4FZkHbicM,6868
|
|
41
41
|
letta_client/agents/sources/raw_client.py,sha256=ts4c5UBuXzrHU-lFWWrYniQqrMEc8SN0rfiqNXJLP5Y,12399
|
|
@@ -92,7 +92,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_list_clie
|
|
|
92
92
|
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
|
|
93
93
|
letta_client/core/__init__.py,sha256=tpn7rjb6C2UIkYZYIqdrNpI7Yax2jw88sXh2baxaxAI,1715
|
|
94
94
|
letta_client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
|
|
95
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
95
|
+
letta_client/core/client_wrapper.py,sha256=821t2hlyix0-w0LCIeeBUMNU-3gIF9gdfvWrR-qTrao,2776
|
|
96
96
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
97
97
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
98
98
|
letta_client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
|
|
@@ -212,8 +212,8 @@ letta_client/templates/agents/types/agents_create_response.py,sha256=P5sppbD_qW7
|
|
|
212
212
|
letta_client/templates/client.py,sha256=-U27Wp3m2xQetgHOZ4awwAboyfJkhn2eHccG05ENdys,3826
|
|
213
213
|
letta_client/templates/raw_client.py,sha256=SnmeCCODOmXYtTu_xb5QVswl5nZ1AYAgoi5vgcUe0mM,4437
|
|
214
214
|
letta_client/templates/types/__init__.py,sha256=dYa1-Xhxgs1FUtz6gkhZhY59EZuhmBDqh2A7Z4cSBYw,306
|
|
215
|
-
letta_client/templates/types/templates_list_response.py,sha256=
|
|
216
|
-
letta_client/templates/types/templates_list_response_templates_item.py,sha256=
|
|
215
|
+
letta_client/templates/types/templates_list_response.py,sha256=M2vTXGuqbQBEsh-lO0OWLRaYk5VgWD7pUTfOeERAyXk,729
|
|
216
|
+
letta_client/templates/types/templates_list_response_templates_item.py,sha256=qplmgPLb_EtucsvkZ9GFj7BCq6D7OSqtVQ2rnMacO_g,775
|
|
217
217
|
letta_client/tools/__init__.py,sha256=ZR4ev9ZmyWZl9iJPXK_FRk79YjgIytkA_2TlNS1PaQI,725
|
|
218
218
|
letta_client/tools/client.py,sha256=KiKplM1UMmdbsYyV1DgRycWJrtBncR8s3in_YQ4gT44,58657
|
|
219
219
|
letta_client/tools/raw_client.py,sha256=Gq40VjZJOzEQd6e8eLvU8eBx7vxC9iHhdS6irpaNp2A,104979
|
|
@@ -501,6 +501,6 @@ letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
|
|
|
501
501
|
letta_client/voice/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
502
502
|
letta_client/voice/client.py,sha256=EbIVOQh4HXqU9McATxwga08STk-HUwPEAUr_UHqyKHg,3748
|
|
503
503
|
letta_client/voice/raw_client.py,sha256=KvM_3GXuSf51bubM0RVBnxvlf20qZTFMnaA_BzhXzjQ,5938
|
|
504
|
-
letta_client-0.1.
|
|
505
|
-
letta_client-0.1.
|
|
506
|
-
letta_client-0.1.
|
|
504
|
+
letta_client-0.1.251.dist-info/METADATA,sha256=ehiH0-KIa0ByL9D4zeXO0lR8S9Qu16wqmAVPt8ZPffI,5781
|
|
505
|
+
letta_client-0.1.251.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
506
|
+
letta_client-0.1.251.dist-info/RECORD,,
|
|
File without changes
|