Skip to content

Commit 200af22

Browse files
committed
Release 0.1.20
1 parent f9b657b commit 200af22

File tree

9 files changed

+98
-59
lines changed

9 files changed

+98
-59
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "letta-client"
33

44
[tool.poetry]
55
name = "letta-client"
6-
version = "0.1.19"
6+
version = "0.1.20"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ client.tools.list()
314314
<dl>
315315
<dd>
316316

317-
**cursor:** `typing.Optional[str]`
317+
**after:** `typing.Optional[str]`
318318

319319
</dd>
320320
</dl>
@@ -1482,7 +1482,15 @@ client.agents.list()
14821482
<dl>
14831483
<dd>
14841484

1485-
**cursor:** `typing.Optional[str]` — Cursor for pagination
1485+
**before:** `typing.Optional[str]` — Cursor for pagination
1486+
1487+
</dd>
1488+
</dl>
1489+
1490+
<dl>
1491+
<dd>
1492+
1493+
**after:** `typing.Optional[str]` — Cursor for pagination
14861494

14871495
</dd>
14881496
</dl>
@@ -3903,7 +3911,7 @@ client.providers.list_providers()
39033911
<dl>
39043912
<dd>
39053913

3906-
**cursor:** `typing.Optional[str]`
3914+
**after:** `typing.Optional[str]`
39073915

39083916
</dd>
39093917
</dl>
@@ -4436,9 +4444,10 @@ Get messages associated with a run with filtering options.
44364444

44374445
Args:
44384446
run_id: ID of the run
4439-
cursor: Cursor for pagination
4447+
before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
4448+
after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
44404449
limit: Maximum number of messages to return
4441-
ascending: Sort order by creation time
4450+
order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
44424451
role: Filter by role (user/assistant/system/tool)
44434452
return_message_object: Whether to return Message objects or LettaMessage objects
44444453
user_id: ID of the user making the request
@@ -4490,7 +4499,15 @@ client.runs.list_run_messages(
44904499
<dl>
44914500
<dd>
44924501

4493-
**cursor:** `typing.Optional[str]` — Cursor for pagination
4502+
**before:** `typing.Optional[str]` — Cursor for pagination
4503+
4504+
</dd>
4505+
</dl>
4506+
4507+
<dl>
4508+
<dd>
4509+
4510+
**after:** `typing.Optional[str]` — Cursor for pagination
44944511

44954512
</dd>
44964513
</dl>
@@ -4506,7 +4523,7 @@ client.runs.list_run_messages(
45064523
<dl>
45074524
<dd>
45084525

4509-
**ascending:** `typing.Optional[bool]` — Sort order by creation time
4526+
**order:** `typing.Optional[str]` — Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
45104527

45114528
</dd>
45124529
</dl>
@@ -4653,7 +4670,7 @@ client.tag.list_tags()
46534670
<dl>
46544671
<dd>
46554672

4656-
**cursor:** `typing.Optional[str]`
4673+
**after:** `typing.Optional[str]`
46574674

46584675
</dd>
46594676
</dl>
@@ -6776,7 +6793,7 @@ client.sources.files.list(
67766793
<dl>
67776794
<dd>
67786795

6779-
**cursor:** `typing.Optional[str]` — Pagination cursor to fetch the next set of results
6796+
**after:** `typing.Optional[str]` — Pagination cursor to fetch the next set of results
67806797

67816798
</dd>
67826799
</dl>

src/letta_client/agents/client.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ def list(
6363
name: typing.Optional[str] = None,
6464
tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
6565
match_all_tags: typing.Optional[bool] = None,
66-
cursor: typing.Optional[str] = None,
66+
before: typing.Optional[str] = None,
67+
after: typing.Optional[str] = None,
6768
limit: typing.Optional[int] = None,
6869
query_text: typing.Optional[str] = None,
6970
request_options: typing.Optional[RequestOptions] = None,
@@ -83,7 +84,10 @@ def list(
8384
match_all_tags : typing.Optional[bool]
8485
If True, only returns agents that match ALL given tags. Otherwise, return agents that have ANY of the passed in tags.
8586
86-
cursor : typing.Optional[str]
87+
before : typing.Optional[str]
88+
Cursor for pagination
89+
90+
after : typing.Optional[str]
8791
Cursor for pagination
8892
8993
limit : typing.Optional[int]
@@ -116,7 +120,8 @@ def list(
116120
"name": name,
117121
"tags": tags,
118122
"match_all_tags": match_all_tags,
119-
"cursor": cursor,
123+
"before": before,
124+
"after": after,
120125
"limit": limit,
121126
"query_text": query_text,
122127
},
@@ -1367,7 +1372,8 @@ async def list(
13671372
name: typing.Optional[str] = None,
13681373
tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
13691374
match_all_tags: typing.Optional[bool] = None,
1370-
cursor: typing.Optional[str] = None,
1375+
before: typing.Optional[str] = None,
1376+
after: typing.Optional[str] = None,
13711377
limit: typing.Optional[int] = None,
13721378
query_text: typing.Optional[str] = None,
13731379
request_options: typing.Optional[RequestOptions] = None,
@@ -1387,7 +1393,10 @@ async def list(
13871393
match_all_tags : typing.Optional[bool]
13881394
If True, only returns agents that match ALL given tags. Otherwise, return agents that have ANY of the passed in tags.
13891395
1390-
cursor : typing.Optional[str]
1396+
before : typing.Optional[str]
1397+
Cursor for pagination
1398+
1399+
after : typing.Optional[str]
13911400
Cursor for pagination
13921401
13931402
limit : typing.Optional[int]
@@ -1428,7 +1437,8 @@ async def main() -> None:
14281437
"name": name,
14291438
"tags": tags,
14301439
"match_all_tags": match_all_tags,
1431-
"cursor": cursor,
1440+
"before": before,
1441+
"after": after,
14321442
"limit": limit,
14331443
"query_text": query_text,
14341444
},

src/letta_client/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1616
headers: typing.Dict[str, str] = {
1717
"X-Fern-Language": "Python",
1818
"X-Fern-SDK-Name": "letta-client",
19-
"X-Fern-SDK-Version": "0.1.19",
19+
"X-Fern-SDK-Version": "0.1.20",
2020
}
2121
if self.token is not None:
2222
headers["Authorization"] = f"Bearer {self.token}"

src/letta_client/providers/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
2222
def list_providers(
2323
self,
2424
*,
25-
cursor: typing.Optional[str] = None,
25+
after: typing.Optional[str] = None,
2626
limit: typing.Optional[int] = None,
2727
request_options: typing.Optional[RequestOptions] = None,
2828
) -> typing.List[Provider]:
@@ -31,7 +31,7 @@ def list_providers(
3131
3232
Parameters
3333
----------
34-
cursor : typing.Optional[str]
34+
after : typing.Optional[str]
3535
3636
limit : typing.Optional[int]
3737
@@ -56,7 +56,7 @@ def list_providers(
5656
"v1/providers/",
5757
method="GET",
5858
params={
59-
"cursor": cursor,
59+
"after": after,
6060
"limit": limit,
6161
},
6262
request_options=request_options,
@@ -297,7 +297,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
297297
async def list_providers(
298298
self,
299299
*,
300-
cursor: typing.Optional[str] = None,
300+
after: typing.Optional[str] = None,
301301
limit: typing.Optional[int] = None,
302302
request_options: typing.Optional[RequestOptions] = None,
303303
) -> typing.List[Provider]:
@@ -306,7 +306,7 @@ async def list_providers(
306306
307307
Parameters
308308
----------
309-
cursor : typing.Optional[str]
309+
after : typing.Optional[str]
310310
311311
limit : typing.Optional[int]
312312
@@ -339,7 +339,7 @@ async def main() -> None:
339339
"v1/providers/",
340340
method="GET",
341341
params={
342-
"cursor": cursor,
342+
"after": after,
343343
"limit": limit,
344344
},
345345
request_options=request_options,

src/letta_client/runs/client.py

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,10 @@ def list_run_messages(
240240
self,
241241
run_id: str,
242242
*,
243-
cursor: typing.Optional[str] = None,
243+
before: typing.Optional[str] = None,
244+
after: typing.Optional[str] = None,
244245
limit: typing.Optional[int] = None,
245-
ascending: typing.Optional[bool] = None,
246+
order: typing.Optional[str] = None,
246247
role: typing.Optional[MessageRole] = None,
247248
request_options: typing.Optional[RequestOptions] = None,
248249
) -> typing.List[LettaMessageUnion]:
@@ -251,9 +252,10 @@ def list_run_messages(
251252
252253
Args:
253254
run_id: ID of the run
254-
cursor: Cursor for pagination
255+
before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
256+
after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
255257
limit: Maximum number of messages to return
256-
ascending: Sort order by creation time
258+
order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
257259
role: Filter by role (user/assistant/system/tool)
258260
return_message_object: Whether to return Message objects or LettaMessage objects
259261
user_id: ID of the user making the request
@@ -265,14 +267,17 @@ def list_run_messages(
265267
----------
266268
run_id : str
267269
268-
cursor : typing.Optional[str]
270+
before : typing.Optional[str]
271+
Cursor for pagination
272+
273+
after : typing.Optional[str]
269274
Cursor for pagination
270275
271276
limit : typing.Optional[int]
272277
Maximum number of messages to return
273278
274-
ascending : typing.Optional[bool]
275-
Sort order by creation time
279+
order : typing.Optional[str]
280+
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
276281
277282
role : typing.Optional[MessageRole]
278283
Filter by role
@@ -300,9 +305,10 @@ def list_run_messages(
300305
f"v1/runs/{jsonable_encoder(run_id)}/messages",
301306
method="GET",
302307
params={
303-
"cursor": cursor,
308+
"before": before,
309+
"after": after,
304310
"limit": limit,
305-
"ascending": ascending,
311+
"order": order,
306312
"role": role,
307313
},
308314
request_options=request_options,
@@ -646,9 +652,10 @@ async def list_run_messages(
646652
self,
647653
run_id: str,
648654
*,
649-
cursor: typing.Optional[str] = None,
655+
before: typing.Optional[str] = None,
656+
after: typing.Optional[str] = None,
650657
limit: typing.Optional[int] = None,
651-
ascending: typing.Optional[bool] = None,
658+
order: typing.Optional[str] = None,
652659
role: typing.Optional[MessageRole] = None,
653660
request_options: typing.Optional[RequestOptions] = None,
654661
) -> typing.List[LettaMessageUnion]:
@@ -657,9 +664,10 @@ async def list_run_messages(
657664
658665
Args:
659666
run_id: ID of the run
660-
cursor: Cursor for pagination
667+
before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
668+
after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
661669
limit: Maximum number of messages to return
662-
ascending: Sort order by creation time
670+
order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
663671
role: Filter by role (user/assistant/system/tool)
664672
return_message_object: Whether to return Message objects or LettaMessage objects
665673
user_id: ID of the user making the request
@@ -671,14 +679,17 @@ async def list_run_messages(
671679
----------
672680
run_id : str
673681
674-
cursor : typing.Optional[str]
682+
before : typing.Optional[str]
683+
Cursor for pagination
684+
685+
after : typing.Optional[str]
675686
Cursor for pagination
676687
677688
limit : typing.Optional[int]
678689
Maximum number of messages to return
679690
680-
ascending : typing.Optional[bool]
681-
Sort order by creation time
691+
order : typing.Optional[str]
692+
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
682693
683694
role : typing.Optional[MessageRole]
684695
Filter by role
@@ -714,9 +725,10 @@ async def main() -> None:
714725
f"v1/runs/{jsonable_encoder(run_id)}/messages",
715726
method="GET",
716727
params={
717-
"cursor": cursor,
728+
"before": before,
729+
"after": after,
718730
"limit": limit,
719-
"ascending": ascending,
731+
"order": order,
720732
"role": role,
721733
},
722734
request_options=request_options,

0 commit comments

Comments
 (0)