letta-client 0.1.21__py3-none-any.whl → 0.1.22__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/messages/client.py +10 -0
- letta_client/client.py +0 -4
- letta_client/core/client_wrapper.py +1 -1
- letta_client/tools/client.py +0 -30
- letta_client/types/tool_create.py +0 -5
- {letta_client-0.1.21.dist-info → letta_client-0.1.22.dist-info}/METADATA +1 -1
- {letta_client-0.1.21.dist-info → letta_client-0.1.22.dist-info}/RECORD +8 -8
- {letta_client-0.1.21.dist-info → letta_client-0.1.22.dist-info}/WHEEL +0 -0
|
@@ -36,6 +36,7 @@ class MessagesClient:
|
|
|
36
36
|
self,
|
|
37
37
|
agent_id: str,
|
|
38
38
|
*,
|
|
39
|
+
after: typing.Optional[str] = None,
|
|
39
40
|
before: typing.Optional[str] = None,
|
|
40
41
|
limit: typing.Optional[int] = None,
|
|
41
42
|
msg_object: typing.Optional[bool] = None,
|
|
@@ -50,6 +51,9 @@ class MessagesClient:
|
|
|
50
51
|
----------
|
|
51
52
|
agent_id : str
|
|
52
53
|
|
|
54
|
+
after : typing.Optional[str]
|
|
55
|
+
Message after which to retrieve the returned messages.
|
|
56
|
+
|
|
53
57
|
before : typing.Optional[str]
|
|
54
58
|
Message before which to retrieve the returned messages.
|
|
55
59
|
|
|
@@ -88,6 +92,7 @@ class MessagesClient:
|
|
|
88
92
|
f"v1/agents/{jsonable_encoder(agent_id)}/messages",
|
|
89
93
|
method="GET",
|
|
90
94
|
params={
|
|
95
|
+
"after": after,
|
|
91
96
|
"before": before,
|
|
92
97
|
"limit": limit,
|
|
93
98
|
"msg_object": msg_object,
|
|
@@ -502,6 +507,7 @@ class AsyncMessagesClient:
|
|
|
502
507
|
self,
|
|
503
508
|
agent_id: str,
|
|
504
509
|
*,
|
|
510
|
+
after: typing.Optional[str] = None,
|
|
505
511
|
before: typing.Optional[str] = None,
|
|
506
512
|
limit: typing.Optional[int] = None,
|
|
507
513
|
msg_object: typing.Optional[bool] = None,
|
|
@@ -516,6 +522,9 @@ class AsyncMessagesClient:
|
|
|
516
522
|
----------
|
|
517
523
|
agent_id : str
|
|
518
524
|
|
|
525
|
+
after : typing.Optional[str]
|
|
526
|
+
Message after which to retrieve the returned messages.
|
|
527
|
+
|
|
519
528
|
before : typing.Optional[str]
|
|
520
529
|
Message before which to retrieve the returned messages.
|
|
521
530
|
|
|
@@ -562,6 +571,7 @@ class AsyncMessagesClient:
|
|
|
562
571
|
f"v1/agents/{jsonable_encoder(agent_id)}/messages",
|
|
563
572
|
method="GET",
|
|
564
573
|
params={
|
|
574
|
+
"after": after,
|
|
565
575
|
"before": before,
|
|
566
576
|
"limit": limit,
|
|
567
577
|
"msg_object": msg_object,
|
letta_client/client.py
CHANGED
|
@@ -31,7 +31,6 @@ class ToolsClient(ToolsClientBase):
|
|
|
31
31
|
self,
|
|
32
32
|
*,
|
|
33
33
|
func: typing.Callable,
|
|
34
|
-
name: typing.Optional[str] = OMIT,
|
|
35
34
|
description: typing.Optional[str] = OMIT,
|
|
36
35
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
37
36
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -44,7 +43,6 @@ class ToolsClient(ToolsClientBase):
|
|
|
44
43
|
source_code = dedent(inspect.getsource(func))
|
|
45
44
|
return self.create(
|
|
46
45
|
source_code=source_code,
|
|
47
|
-
name=name,
|
|
48
46
|
description=description,
|
|
49
47
|
tags=tags,
|
|
50
48
|
source_type=source_type,
|
|
@@ -57,7 +55,6 @@ class ToolsClient(ToolsClientBase):
|
|
|
57
55
|
self,
|
|
58
56
|
*,
|
|
59
57
|
func: typing.Callable,
|
|
60
|
-
name: typing.Optional[str] = OMIT,
|
|
61
58
|
description: typing.Optional[str] = OMIT,
|
|
62
59
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
63
60
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -70,7 +67,6 @@ class ToolsClient(ToolsClientBase):
|
|
|
70
67
|
source_code = dedent(inspect.getsource(func))
|
|
71
68
|
return self.upsert(
|
|
72
69
|
source_code=source_code,
|
|
73
|
-
name=name,
|
|
74
70
|
description=description,
|
|
75
71
|
tags=tags,
|
|
76
72
|
source_type=source_type,
|
|
@@ -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.22",
|
|
20
20
|
}
|
|
21
21
|
if self.token is not None:
|
|
22
22
|
headers["Authorization"] = f"Bearer {self.token}"
|
letta_client/tools/client.py
CHANGED
|
@@ -142,7 +142,6 @@ class ToolsClient:
|
|
|
142
142
|
tool_id: str,
|
|
143
143
|
*,
|
|
144
144
|
description: typing.Optional[str] = OMIT,
|
|
145
|
-
name: typing.Optional[str] = OMIT,
|
|
146
145
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
147
146
|
source_code: typing.Optional[str] = OMIT,
|
|
148
147
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -160,9 +159,6 @@ class ToolsClient:
|
|
|
160
159
|
description : typing.Optional[str]
|
|
161
160
|
The description of the tool.
|
|
162
161
|
|
|
163
|
-
name : typing.Optional[str]
|
|
164
|
-
The name of the function.
|
|
165
|
-
|
|
166
162
|
tags : typing.Optional[typing.Sequence[str]]
|
|
167
163
|
Metadata tags.
|
|
168
164
|
|
|
@@ -202,7 +198,6 @@ class ToolsClient:
|
|
|
202
198
|
method="PATCH",
|
|
203
199
|
json={
|
|
204
200
|
"description": description,
|
|
205
|
-
"name": name,
|
|
206
201
|
"tags": tags,
|
|
207
202
|
"source_code": source_code,
|
|
208
203
|
"source_type": source_type,
|
|
@@ -309,7 +304,6 @@ class ToolsClient:
|
|
|
309
304
|
self,
|
|
310
305
|
*,
|
|
311
306
|
source_code: str,
|
|
312
|
-
name: typing.Optional[str] = OMIT,
|
|
313
307
|
description: typing.Optional[str] = OMIT,
|
|
314
308
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
315
309
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -325,9 +319,6 @@ class ToolsClient:
|
|
|
325
319
|
source_code : str
|
|
326
320
|
The source code of the function.
|
|
327
321
|
|
|
328
|
-
name : typing.Optional[str]
|
|
329
|
-
The name of the function (auto-generated from source_code if not provided).
|
|
330
|
-
|
|
331
322
|
description : typing.Optional[str]
|
|
332
323
|
The description of the tool.
|
|
333
324
|
|
|
@@ -366,7 +357,6 @@ class ToolsClient:
|
|
|
366
357
|
"v1/tools/",
|
|
367
358
|
method="POST",
|
|
368
359
|
json={
|
|
369
|
-
"name": name,
|
|
370
360
|
"description": description,
|
|
371
361
|
"tags": tags,
|
|
372
362
|
"source_code": source_code,
|
|
@@ -405,7 +395,6 @@ class ToolsClient:
|
|
|
405
395
|
self,
|
|
406
396
|
*,
|
|
407
397
|
source_code: str,
|
|
408
|
-
name: typing.Optional[str] = OMIT,
|
|
409
398
|
description: typing.Optional[str] = OMIT,
|
|
410
399
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
411
400
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -421,9 +410,6 @@ class ToolsClient:
|
|
|
421
410
|
source_code : str
|
|
422
411
|
The source code of the function.
|
|
423
412
|
|
|
424
|
-
name : typing.Optional[str]
|
|
425
|
-
The name of the function (auto-generated from source_code if not provided).
|
|
426
|
-
|
|
427
413
|
description : typing.Optional[str]
|
|
428
414
|
The description of the tool.
|
|
429
415
|
|
|
@@ -462,7 +448,6 @@ class ToolsClient:
|
|
|
462
448
|
"v1/tools/",
|
|
463
449
|
method="PUT",
|
|
464
450
|
json={
|
|
465
|
-
"name": name,
|
|
466
451
|
"description": description,
|
|
467
452
|
"tags": tags,
|
|
468
453
|
"source_code": source_code,
|
|
@@ -947,7 +932,6 @@ class AsyncToolsClient:
|
|
|
947
932
|
tool_id: str,
|
|
948
933
|
*,
|
|
949
934
|
description: typing.Optional[str] = OMIT,
|
|
950
|
-
name: typing.Optional[str] = OMIT,
|
|
951
935
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
952
936
|
source_code: typing.Optional[str] = OMIT,
|
|
953
937
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -965,9 +949,6 @@ class AsyncToolsClient:
|
|
|
965
949
|
description : typing.Optional[str]
|
|
966
950
|
The description of the tool.
|
|
967
951
|
|
|
968
|
-
name : typing.Optional[str]
|
|
969
|
-
The name of the function.
|
|
970
|
-
|
|
971
952
|
tags : typing.Optional[typing.Sequence[str]]
|
|
972
953
|
Metadata tags.
|
|
973
954
|
|
|
@@ -1015,7 +996,6 @@ class AsyncToolsClient:
|
|
|
1015
996
|
method="PATCH",
|
|
1016
997
|
json={
|
|
1017
998
|
"description": description,
|
|
1018
|
-
"name": name,
|
|
1019
999
|
"tags": tags,
|
|
1020
1000
|
"source_code": source_code,
|
|
1021
1001
|
"source_type": source_type,
|
|
@@ -1130,7 +1110,6 @@ class AsyncToolsClient:
|
|
|
1130
1110
|
self,
|
|
1131
1111
|
*,
|
|
1132
1112
|
source_code: str,
|
|
1133
|
-
name: typing.Optional[str] = OMIT,
|
|
1134
1113
|
description: typing.Optional[str] = OMIT,
|
|
1135
1114
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1136
1115
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -1146,9 +1125,6 @@ class AsyncToolsClient:
|
|
|
1146
1125
|
source_code : str
|
|
1147
1126
|
The source code of the function.
|
|
1148
1127
|
|
|
1149
|
-
name : typing.Optional[str]
|
|
1150
|
-
The name of the function (auto-generated from source_code if not provided).
|
|
1151
|
-
|
|
1152
1128
|
description : typing.Optional[str]
|
|
1153
1129
|
The description of the tool.
|
|
1154
1130
|
|
|
@@ -1195,7 +1171,6 @@ class AsyncToolsClient:
|
|
|
1195
1171
|
"v1/tools/",
|
|
1196
1172
|
method="POST",
|
|
1197
1173
|
json={
|
|
1198
|
-
"name": name,
|
|
1199
1174
|
"description": description,
|
|
1200
1175
|
"tags": tags,
|
|
1201
1176
|
"source_code": source_code,
|
|
@@ -1234,7 +1209,6 @@ class AsyncToolsClient:
|
|
|
1234
1209
|
self,
|
|
1235
1210
|
*,
|
|
1236
1211
|
source_code: str,
|
|
1237
|
-
name: typing.Optional[str] = OMIT,
|
|
1238
1212
|
description: typing.Optional[str] = OMIT,
|
|
1239
1213
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1240
1214
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -1250,9 +1224,6 @@ class AsyncToolsClient:
|
|
|
1250
1224
|
source_code : str
|
|
1251
1225
|
The source code of the function.
|
|
1252
1226
|
|
|
1253
|
-
name : typing.Optional[str]
|
|
1254
|
-
The name of the function (auto-generated from source_code if not provided).
|
|
1255
|
-
|
|
1256
1227
|
description : typing.Optional[str]
|
|
1257
1228
|
The description of the tool.
|
|
1258
1229
|
|
|
@@ -1299,7 +1270,6 @@ class AsyncToolsClient:
|
|
|
1299
1270
|
"v1/tools/",
|
|
1300
1271
|
method="PUT",
|
|
1301
1272
|
json={
|
|
1302
|
-
"name": name,
|
|
1303
1273
|
"description": description,
|
|
1304
1274
|
"tags": tags,
|
|
1305
1275
|
"source_code": source_code,
|
|
@@ -7,11 +7,6 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ToolCreate(UncheckedBaseModel):
|
|
10
|
-
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
|
-
"""
|
|
12
|
-
The name of the function (auto-generated from source_code if not provided).
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
10
|
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
11
|
"""
|
|
17
12
|
The description of the tool.
|
|
@@ -12,7 +12,7 @@ letta_client/agents/memory_variables/client.py,sha256=6qFVbR_tdfqj4HQ1h1HXR8DZCV
|
|
|
12
12
|
letta_client/agents/memory_variables/types/__init__.py,sha256=EoznK0WvhCyFYd4KDdU-cGDQWpSXmq79BSkqVHN-j7A,180
|
|
13
13
|
letta_client/agents/memory_variables/types/memory_variables_list_response.py,sha256=bsF__n_B4ZXEHzg--OVD6tHHXt_aM-FjHm2x1ZXPnL0,599
|
|
14
14
|
letta_client/agents/messages/__init__.py,sha256=Wj8W908jYLC6n0QUG5TEIMWZh1vlI9m_LEtVqOeNFNc,237
|
|
15
|
-
letta_client/agents/messages/client.py,sha256=
|
|
15
|
+
letta_client/agents/messages/client.py,sha256=p2u1eahxiLeHASnqlYTck50VqxLhcnRyS7KmuO-0B_w,35103
|
|
16
16
|
letta_client/agents/messages/types/__init__.py,sha256=iaja58P-gB2f6q3c6Q6Waa1ZEpXJwXiz_fwektcBKCg,326
|
|
17
17
|
letta_client/agents/messages/types/letta_streaming_response.py,sha256=MdE2PxQ1x1AviakHXsWVcFv97a3RchzzzIiD77w4EC8,665
|
|
18
18
|
letta_client/agents/messages/types/message_update_content.py,sha256=LjGu6xzHC1kRKNHWg203jzz9GF8jPeNMPS36bEfqS7I,194
|
|
@@ -40,10 +40,10 @@ letta_client/agents/types/update_agent_tool_rules_item.py,sha256=5pYbFgeqxmXUHUT
|
|
|
40
40
|
letta_client/base_client.py,sha256=OapnOZBD94aLQa5uoPCbNIR4zDg55DVI5zBe-wWHYfs,7419
|
|
41
41
|
letta_client/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
42
42
|
letta_client/blocks/client.py,sha256=AeQQ-IdYhV-zqLTt3PTrJOtJ6XtBZcXNC108Y5EogVU,29178
|
|
43
|
-
letta_client/client.py,sha256=
|
|
43
|
+
letta_client/client.py,sha256=y2cXN0ApFul2Lz-fVh5TbeYbQ8oUjnXcwJ6wUczEf2c,2457
|
|
44
44
|
letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
|
|
45
45
|
letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
46
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
46
|
+
letta_client/core/client_wrapper.py,sha256=eZI16rLHnAVxZgQZA7eJ-9O_naxGhN9T16o6f-ATD7Q,1997
|
|
47
47
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
48
48
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
49
49
|
letta_client/core/http_client.py,sha256=siUQ6UV0ARZALlxubqWSSAAPC9B4VW8y6MGlHStfaeo,19552
|
|
@@ -80,7 +80,7 @@ letta_client/sources/passages/client.py,sha256=n0QVtLC0W1X6_SjhiEGSl9oZexocnsLZY
|
|
|
80
80
|
letta_client/tag/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
81
81
|
letta_client/tag/client.py,sha256=TBAotdb0e2_x2pANF4dOE1qmWY3GIgb7nOhvN7iZ3_4,5183
|
|
82
82
|
letta_client/tools/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
83
|
-
letta_client/tools/client.py,sha256=
|
|
83
|
+
letta_client/tools/client.py,sha256=ABqUGbxn8C1aDQ03PcaQWHYFQcB18GQ4P9DlidWVDqM,52999
|
|
84
84
|
letta_client/types/__init__.py,sha256=dL71l8TC9VNQolYQWhXHQ14CPZsvhJnNwQtFYnZqJsw,6447
|
|
85
85
|
letta_client/types/action_model.py,sha256=65eLvLD-9-zK9hrDun7wjVlXsCiI7zujv8aGPuIb3jE,1206
|
|
86
86
|
letta_client/types/action_parameters_model.py,sha256=zKzJkjtu1pt4BEA2GHlg9rMWja5a0uZygOpOx3FbgIM,749
|
|
@@ -160,7 +160,7 @@ letta_client/types/tool_call.py,sha256=EKGAFwzoa6zMTpOkG55hWzFn_AgPrbLXSOu5M84x8
|
|
|
160
160
|
letta_client/types/tool_call_delta.py,sha256=wGeZwJ9pwYHD5-f4Unf5-vJqefK40eHw9i0w3bCjRoE,671
|
|
161
161
|
letta_client/types/tool_call_message.py,sha256=PQEYtLzNMmqc86q7kqjEuALvJ4HdAC_8ODIYjArsoco,1096
|
|
162
162
|
letta_client/types/tool_call_message_tool_call.py,sha256=twtq5-vZIeh1nShqm8iTCN9YFtY7LUIL-bFYuUfhF1o,219
|
|
163
|
-
letta_client/types/tool_create.py,sha256=
|
|
163
|
+
letta_client/types/tool_create.py,sha256=OHG0RqVSLi7O_C_vhbo-1AN5FPCy-JTbDc0a88_Z5XE,1347
|
|
164
164
|
letta_client/types/tool_return_message.py,sha256=hQ-17bvNGoSaCow4AvWSGLTa80fKuXP2bxXGNUXuX0w,1591
|
|
165
165
|
letta_client/types/tool_return_message_status.py,sha256=FvFOMaG9mnmgnHi2UBQVQQMtHFabbWnQnHTxGUDgVl0,167
|
|
166
166
|
letta_client/types/tool_rule_type.py,sha256=W6lVaYVYzSzhFHgqitmw6XLtxgxBhINgHZJfSnxg6ts,265
|
|
@@ -174,6 +174,6 @@ letta_client/types/user_update.py,sha256=0Bl1OjO7bfmlpsGQ36dSh6DH1UB_wJOTNewS0wD
|
|
|
174
174
|
letta_client/types/validation_error.py,sha256=ACDS7wL5nQbS8ymFhWljwbBJmbugNa8bs2O5xEZC3u4,680
|
|
175
175
|
letta_client/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPXjdtN9EB7HrLVo6EP0,128
|
|
176
176
|
letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
|
|
177
|
-
letta_client-0.1.
|
|
178
|
-
letta_client-0.1.
|
|
179
|
-
letta_client-0.1.
|
|
177
|
+
letta_client-0.1.22.dist-info/METADATA,sha256=bVRfwXJRTf0E_b9fcwPXbHxPnpNkYx7dds_AlcQLkFY,4942
|
|
178
|
+
letta_client-0.1.22.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
179
|
+
letta_client-0.1.22.dist-info/RECORD,,
|
|
File without changes
|