letta-client 0.1.19__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.
- letta_client/__init__.py +10 -0
- letta_client/agents/__init__.py +2 -1
- letta_client/agents/archival_memory/client.py +218 -25
- letta_client/agents/client.py +350 -1637
- letta_client/agents/core_memory/client.py +424 -97
- letta_client/agents/memory_variables/client.py +2 -2
- letta_client/agents/messages/__init__.py +2 -2
- letta_client/agents/messages/client.py +29 -14
- letta_client/agents/messages/types/__init__.py +2 -1
- letta_client/agents/messages/types/message_update_content.py +6 -0
- letta_client/blocks/client.py +127 -0
- letta_client/client.py +0 -4
- letta_client/core/client_wrapper.py +1 -1
- letta_client/providers/client.py +6 -6
- letta_client/runs/client.py +30 -18
- letta_client/sources/files/client.py +6 -6
- letta_client/tag/client.py +6 -6
- letta_client/tools/client.py +6 -36
- letta_client/types/__init__.py +10 -0
- letta_client/types/assistant_message.py +2 -1
- letta_client/types/assistant_message_content.py +6 -0
- letta_client/types/llm_config.py +6 -0
- letta_client/types/message.py +3 -2
- letta_client/types/message_create.py +3 -2
- letta_client/types/message_create_content.py +6 -0
- letta_client/types/system_message.py +3 -2
- letta_client/types/system_message_content.py +6 -0
- letta_client/types/text_content.py +23 -0
- letta_client/types/tool_create.py +0 -5
- letta_client/types/user_message.py +3 -2
- letta_client/types/user_message_content.py +6 -0
- {letta_client-0.1.19.dist-info → letta_client-0.1.22.dist-info}/METADATA +2 -2
- {letta_client-0.1.19.dist-info → letta_client-0.1.22.dist-info}/RECORD +34 -28
- {letta_client-0.1.19.dist-info → letta_client-0.1.22.dist-info}/WHEEL +0 -0
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,
|
|
@@ -242,7 +237,7 @@ class ToolsClient:
|
|
|
242
237
|
def list(
|
|
243
238
|
self,
|
|
244
239
|
*,
|
|
245
|
-
|
|
240
|
+
after: typing.Optional[str] = None,
|
|
246
241
|
limit: typing.Optional[int] = None,
|
|
247
242
|
request_options: typing.Optional[RequestOptions] = None,
|
|
248
243
|
) -> typing.List[Tool]:
|
|
@@ -251,7 +246,7 @@ class ToolsClient:
|
|
|
251
246
|
|
|
252
247
|
Parameters
|
|
253
248
|
----------
|
|
254
|
-
|
|
249
|
+
after : typing.Optional[str]
|
|
255
250
|
|
|
256
251
|
limit : typing.Optional[int]
|
|
257
252
|
|
|
@@ -276,7 +271,7 @@ class ToolsClient:
|
|
|
276
271
|
"v1/tools/",
|
|
277
272
|
method="GET",
|
|
278
273
|
params={
|
|
279
|
-
"
|
|
274
|
+
"after": after,
|
|
280
275
|
"limit": limit,
|
|
281
276
|
},
|
|
282
277
|
request_options=request_options,
|
|
@@ -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,
|
|
@@ -1055,7 +1035,7 @@ class AsyncToolsClient:
|
|
|
1055
1035
|
async def list(
|
|
1056
1036
|
self,
|
|
1057
1037
|
*,
|
|
1058
|
-
|
|
1038
|
+
after: typing.Optional[str] = None,
|
|
1059
1039
|
limit: typing.Optional[int] = None,
|
|
1060
1040
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1061
1041
|
) -> typing.List[Tool]:
|
|
@@ -1064,7 +1044,7 @@ class AsyncToolsClient:
|
|
|
1064
1044
|
|
|
1065
1045
|
Parameters
|
|
1066
1046
|
----------
|
|
1067
|
-
|
|
1047
|
+
after : typing.Optional[str]
|
|
1068
1048
|
|
|
1069
1049
|
limit : typing.Optional[int]
|
|
1070
1050
|
|
|
@@ -1097,7 +1077,7 @@ class AsyncToolsClient:
|
|
|
1097
1077
|
"v1/tools/",
|
|
1098
1078
|
method="GET",
|
|
1099
1079
|
params={
|
|
1100
|
-
"
|
|
1080
|
+
"after": after,
|
|
1101
1081
|
"limit": limit,
|
|
1102
1082
|
},
|
|
1103
1083
|
request_options=request_options,
|
|
@@ -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,
|
letta_client/types/__init__.py
CHANGED
|
@@ -11,6 +11,7 @@ from .app_auth_scheme import AppAuthScheme
|
|
|
11
11
|
from .app_auth_scheme_auth_mode import AppAuthSchemeAuthMode
|
|
12
12
|
from .app_model import AppModel
|
|
13
13
|
from .assistant_message import AssistantMessage
|
|
14
|
+
from .assistant_message_content import AssistantMessageContent
|
|
14
15
|
from .auth_request import AuthRequest
|
|
15
16
|
from .auth_response import AuthResponse
|
|
16
17
|
from .auth_scheme_field import AuthSchemeField
|
|
@@ -47,6 +48,7 @@ from .local_sandbox_config import LocalSandboxConfig
|
|
|
47
48
|
from .memory import Memory
|
|
48
49
|
from .message import Message
|
|
49
50
|
from .message_create import MessageCreate
|
|
51
|
+
from .message_create_content import MessageCreateContent
|
|
50
52
|
from .message_create_role import MessageCreateRole
|
|
51
53
|
from .message_role import MessageRole
|
|
52
54
|
from .not_found_error_body import NotFoundErrorBody
|
|
@@ -68,7 +70,9 @@ from .sandbox_environment_variable_update import SandboxEnvironmentVariableUpdat
|
|
|
68
70
|
from .sandbox_type import SandboxType
|
|
69
71
|
from .source import Source
|
|
70
72
|
from .system_message import SystemMessage
|
|
73
|
+
from .system_message_content import SystemMessageContent
|
|
71
74
|
from .terminal_tool_rule import TerminalToolRule
|
|
75
|
+
from .text_content import TextContent
|
|
72
76
|
from .tool import Tool
|
|
73
77
|
from .tool_call import ToolCall
|
|
74
78
|
from .tool_call_delta import ToolCallDelta
|
|
@@ -83,6 +87,7 @@ from .usage_statistics import UsageStatistics
|
|
|
83
87
|
from .user import User
|
|
84
88
|
from .user_create import UserCreate
|
|
85
89
|
from .user_message import UserMessage
|
|
90
|
+
from .user_message_content import UserMessageContent
|
|
86
91
|
from .user_update import UserUpdate
|
|
87
92
|
from .validation_error import ValidationError
|
|
88
93
|
from .validation_error_loc_item import ValidationErrorLocItem
|
|
@@ -99,6 +104,7 @@ __all__ = [
|
|
|
99
104
|
"AppAuthSchemeAuthMode",
|
|
100
105
|
"AppModel",
|
|
101
106
|
"AssistantMessage",
|
|
107
|
+
"AssistantMessageContent",
|
|
102
108
|
"AuthRequest",
|
|
103
109
|
"AuthResponse",
|
|
104
110
|
"AuthSchemeField",
|
|
@@ -135,6 +141,7 @@ __all__ = [
|
|
|
135
141
|
"Memory",
|
|
136
142
|
"Message",
|
|
137
143
|
"MessageCreate",
|
|
144
|
+
"MessageCreateContent",
|
|
138
145
|
"MessageCreateRole",
|
|
139
146
|
"MessageRole",
|
|
140
147
|
"NotFoundErrorBody",
|
|
@@ -156,7 +163,9 @@ __all__ = [
|
|
|
156
163
|
"SandboxType",
|
|
157
164
|
"Source",
|
|
158
165
|
"SystemMessage",
|
|
166
|
+
"SystemMessageContent",
|
|
159
167
|
"TerminalToolRule",
|
|
168
|
+
"TextContent",
|
|
160
169
|
"Tool",
|
|
161
170
|
"ToolCall",
|
|
162
171
|
"ToolCallDelta",
|
|
@@ -171,6 +180,7 @@ __all__ = [
|
|
|
171
180
|
"User",
|
|
172
181
|
"UserCreate",
|
|
173
182
|
"UserMessage",
|
|
183
|
+
"UserMessageContent",
|
|
174
184
|
"UserUpdate",
|
|
175
185
|
"ValidationError",
|
|
176
186
|
"ValidationErrorLocItem",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import datetime as dt
|
|
5
5
|
import typing
|
|
6
|
+
from .assistant_message_content import AssistantMessageContent
|
|
6
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
8
|
import pydantic
|
|
8
9
|
|
|
@@ -11,7 +12,7 @@ class AssistantMessage(UncheckedBaseModel):
|
|
|
11
12
|
id: str
|
|
12
13
|
date: dt.datetime
|
|
13
14
|
message_type: typing.Literal["assistant_message"] = "assistant_message"
|
|
14
|
-
|
|
15
|
+
content: AssistantMessageContent
|
|
15
16
|
|
|
16
17
|
if IS_PYDANTIC_V2:
|
|
17
18
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
letta_client/types/llm_config.py
CHANGED
|
@@ -18,6 +18,7 @@ class LlmConfig(UncheckedBaseModel):
|
|
|
18
18
|
model_wrapper (str): The wrapper for the model. This is used to wrap additional text around the input/output of the model. This is useful for text-to-text completions, such as the Completions API in OpenAI.
|
|
19
19
|
context_window (int): The context window size for the model.
|
|
20
20
|
put_inner_thoughts_in_kwargs (bool): Puts `inner_thoughts` as a kwarg in the function call if this is set to True. This helps with function calling performance and also the generation of inner thoughts.
|
|
21
|
+
temperature (float): The temperature to use when generating text with the model. A higher temperature will result in more random text.
|
|
21
22
|
"""
|
|
22
23
|
|
|
23
24
|
model: str = pydantic.Field()
|
|
@@ -55,6 +56,11 @@ class LlmConfig(UncheckedBaseModel):
|
|
|
55
56
|
The handle for this config, in the format provider/model-name.
|
|
56
57
|
"""
|
|
57
58
|
|
|
59
|
+
temperature: typing.Optional[float] = pydantic.Field(default=None)
|
|
60
|
+
"""
|
|
61
|
+
The temperature to use when generating text with the model. A higher temperature will result in more random text.
|
|
62
|
+
"""
|
|
63
|
+
|
|
58
64
|
if IS_PYDANTIC_V2:
|
|
59
65
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
60
66
|
else:
|
letta_client/types/message.py
CHANGED
|
@@ -5,6 +5,7 @@ import typing
|
|
|
5
5
|
import pydantic
|
|
6
6
|
import datetime as dt
|
|
7
7
|
from .message_role import MessageRole
|
|
8
|
+
from .text_content import TextContent
|
|
8
9
|
from .chat_completion_message_tool_call import ChatCompletionMessageToolCall
|
|
9
10
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
10
11
|
|
|
@@ -56,9 +57,9 @@ class Message(UncheckedBaseModel):
|
|
|
56
57
|
The role of the participant.
|
|
57
58
|
"""
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
content: typing.Optional[typing.List[TextContent]] = pydantic.Field(default=None)
|
|
60
61
|
"""
|
|
61
|
-
The
|
|
62
|
+
The content of the message.
|
|
62
63
|
"""
|
|
63
64
|
|
|
64
65
|
agent_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
from .message_create_role import MessageCreateRole
|
|
5
5
|
import pydantic
|
|
6
|
+
from .message_create_content import MessageCreateContent
|
|
6
7
|
import typing
|
|
7
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
9
|
|
|
@@ -17,9 +18,9 @@ class MessageCreate(UncheckedBaseModel):
|
|
|
17
18
|
The role of the participant.
|
|
18
19
|
"""
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
content: MessageCreateContent = pydantic.Field()
|
|
21
22
|
"""
|
|
22
|
-
The
|
|
23
|
+
The content of the message.
|
|
23
24
|
"""
|
|
24
25
|
|
|
25
26
|
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import datetime as dt
|
|
5
5
|
import typing
|
|
6
|
+
from .system_message_content import SystemMessageContent
|
|
6
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
8
|
import pydantic
|
|
8
9
|
|
|
@@ -12,7 +13,7 @@ class SystemMessage(UncheckedBaseModel):
|
|
|
12
13
|
A message generated by the system. Never streamed back on a response, only used for cursor pagination.
|
|
13
14
|
|
|
14
15
|
Attributes:
|
|
15
|
-
|
|
16
|
+
content (Union[str, List[MessageContentUnion]]): The message content sent by the user (can be a string or an array of content parts)
|
|
16
17
|
id (str): The ID of the message
|
|
17
18
|
date (datetime): The date the message was created in ISO format
|
|
18
19
|
"""
|
|
@@ -20,7 +21,7 @@ class SystemMessage(UncheckedBaseModel):
|
|
|
20
21
|
id: str
|
|
21
22
|
date: dt.datetime
|
|
22
23
|
message_type: typing.Literal["system_message"] = "system_message"
|
|
23
|
-
|
|
24
|
+
content: SystemMessageContent
|
|
24
25
|
|
|
25
26
|
if IS_PYDANTIC_V2:
|
|
26
27
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TextContent(UncheckedBaseModel):
|
|
10
|
+
type: typing.Literal["text"] = "text"
|
|
11
|
+
text: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The text content of the message.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -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.
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import datetime as dt
|
|
5
5
|
import typing
|
|
6
|
+
from .user_message_content import UserMessageContent
|
|
6
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
8
|
import pydantic
|
|
8
9
|
|
|
@@ -12,7 +13,7 @@ class UserMessage(UncheckedBaseModel):
|
|
|
12
13
|
A message sent by the user. Never streamed back on a response, only used for cursor pagination.
|
|
13
14
|
|
|
14
15
|
Attributes:
|
|
15
|
-
|
|
16
|
+
content (Union[str, List[MessageContentUnion]]): The message content sent by the user (can be a string or an array of content parts)
|
|
16
17
|
id (str): The ID of the message
|
|
17
18
|
date (datetime): The date the message was created in ISO format
|
|
18
19
|
"""
|
|
@@ -20,7 +21,7 @@ class UserMessage(UncheckedBaseModel):
|
|
|
20
21
|
id: str
|
|
21
22
|
date: dt.datetime
|
|
22
23
|
message_type: typing.Literal["user_message"] = "user_message"
|
|
23
|
-
|
|
24
|
+
content: UserMessageContent
|
|
24
25
|
|
|
25
26
|
if IS_PYDANTIC_V2:
|
|
26
27
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: letta-client
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.22
|
|
4
4
|
Summary:
|
|
5
5
|
Requires-Python: >=3.8,<4.0
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -110,7 +110,7 @@ response = client.agents.messages.create_stream(
|
|
|
110
110
|
messages=[
|
|
111
111
|
MessageCreate(
|
|
112
112
|
role="user",
|
|
113
|
-
|
|
113
|
+
content="content",
|
|
114
114
|
)
|
|
115
115
|
],
|
|
116
116
|
)
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
letta_client/__init__.py,sha256=
|
|
2
|
-
letta_client/agents/__init__.py,sha256=
|
|
1
|
+
letta_client/__init__.py,sha256=YvM8FezJKryBhS1xqiIgX7aUUSIcylczyyM8uCumkg0,5672
|
|
2
|
+
letta_client/agents/__init__.py,sha256=WWE2bmvdYKMnU15f4eCjCnAiuS6-BfArGMrpnHCT3pg,1610
|
|
3
3
|
letta_client/agents/archival_memory/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
4
|
-
letta_client/agents/archival_memory/client.py,sha256=
|
|
5
|
-
letta_client/agents/client.py,sha256=
|
|
4
|
+
letta_client/agents/archival_memory/client.py,sha256=VTlL-cGmYBYdVI5owY8Gbbj4dscUCtSzL34Gm_5Nvk4,14872
|
|
5
|
+
letta_client/agents/client.py,sha256=xr96uk3Jyw2maR2vVPKDfKhYncv6zmulqwP5i2kZm6E,54880
|
|
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
|
|
9
|
-
letta_client/agents/core_memory/client.py,sha256=
|
|
9
|
+
letta_client/agents/core_memory/client.py,sha256=iuqNRihbXDZ67C27CHfVQwJCsWXsQBYxCirKTgV1Rc4,27973
|
|
10
10
|
letta_client/agents/memory_variables/__init__.py,sha256=goz3kTaLM-v8g-hYEhzyqBYzIc3Vu6gDD_7RtkIrM50,155
|
|
11
|
-
letta_client/agents/memory_variables/client.py,sha256=
|
|
11
|
+
letta_client/agents/memory_variables/client.py,sha256=6qFVbR_tdfqj4HQ1h1HXR8DZCVzzJ8I82R92i35iadY,4965
|
|
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
|
-
letta_client/agents/messages/__init__.py,sha256=
|
|
15
|
-
letta_client/agents/messages/client.py,sha256=
|
|
16
|
-
letta_client/agents/messages/types/__init__.py,sha256=
|
|
14
|
+
letta_client/agents/messages/__init__.py,sha256=Wj8W908jYLC6n0QUG5TEIMWZh1vlI9m_LEtVqOeNFNc,237
|
|
15
|
+
letta_client/agents/messages/client.py,sha256=p2u1eahxiLeHASnqlYTck50VqxLhcnRyS7KmuO-0B_w,35103
|
|
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
|
+
letta_client/agents/messages/types/message_update_content.py,sha256=LjGu6xzHC1kRKNHWg203jzz9GF8jPeNMPS36bEfqS7I,194
|
|
18
19
|
letta_client/agents/messages/types/messages_list_response.py,sha256=J8gf7Z7ml8isusdzMJdiIE--I2zE3MzFN8WlIn4pPcU,268
|
|
19
20
|
letta_client/agents/sources/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
20
21
|
letta_client/agents/sources/client.py,sha256=VjmiI0L2RyT3AhqstHunapdbzygTBcNGoT1DiFGRg44,12799
|
|
@@ -38,11 +39,11 @@ letta_client/agents/types/create_agent_request_tool_rules_item.py,sha256=xSYFbxI
|
|
|
38
39
|
letta_client/agents/types/update_agent_tool_rules_item.py,sha256=5pYbFgeqxmXUHUTZpEWlZ7ODc1G6CpFGWljz_iBpWVA,408
|
|
39
40
|
letta_client/base_client.py,sha256=OapnOZBD94aLQa5uoPCbNIR4zDg55DVI5zBe-wWHYfs,7419
|
|
40
41
|
letta_client/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
41
|
-
letta_client/blocks/client.py,sha256=
|
|
42
|
-
letta_client/client.py,sha256=
|
|
42
|
+
letta_client/blocks/client.py,sha256=AeQQ-IdYhV-zqLTt3PTrJOtJ6XtBZcXNC108Y5EogVU,29178
|
|
43
|
+
letta_client/client.py,sha256=y2cXN0ApFul2Lz-fVh5TbeYbQ8oUjnXcwJ6wUczEf2c,2457
|
|
43
44
|
letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
|
|
44
45
|
letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
45
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
46
|
+
letta_client/core/client_wrapper.py,sha256=eZI16rLHnAVxZgQZA7eJ-9O_naxGhN9T16o6f-ATD7Q,1997
|
|
46
47
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
47
48
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
48
49
|
letta_client/core/http_client.py,sha256=siUQ6UV0ARZALlxubqWSSAAPC9B4VW8y6MGlHStfaeo,19552
|
|
@@ -66,21 +67,21 @@ letta_client/jobs/client.py,sha256=z1Zq6dGs2xbf3EAFuD3-m-qbpbUeqpCBYqtIFKkGoMk,1
|
|
|
66
67
|
letta_client/models/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
67
68
|
letta_client/models/client.py,sha256=Rd9IHjSdXRzzZyabpq8pDTc9XDnwLPnmm5by335g1D0,6306
|
|
68
69
|
letta_client/providers/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
69
|
-
letta_client/providers/client.py,sha256=
|
|
70
|
+
letta_client/providers/client.py,sha256=RLpTHd9iQ5wlZqYEG4cF8YsDCdaQZ0odCFprukauCuc,18228
|
|
70
71
|
letta_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
72
|
letta_client/runs/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
72
|
-
letta_client/runs/client.py,sha256=
|
|
73
|
+
letta_client/runs/client.py,sha256=F4yTdhwAA20Ftjr9UZ9tU7wc209n1RNVdJkw42eiBqY,27330
|
|
73
74
|
letta_client/sources/__init__.py,sha256=kswgCv4UdkSVk1Y4tsMM1HadOwvhh_Fr96VTSMV4Umc,128
|
|
74
75
|
letta_client/sources/client.py,sha256=GbMg3ZR0JufGPOfYiptr9yDWKJ0FgT6zLD_k6fET0zs,28223
|
|
75
76
|
letta_client/sources/files/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
76
|
-
letta_client/sources/files/client.py,sha256=
|
|
77
|
+
letta_client/sources/files/client.py,sha256=R-9zHK_wWtvW-2K7erQVVh9rR7a5JC4zxmTK3rrWJoU,13289
|
|
77
78
|
letta_client/sources/passages/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
78
79
|
letta_client/sources/passages/client.py,sha256=n0QVtLC0W1X6_SjhiEGSl9oZexocnsLZYeYRAqV2BCk,4767
|
|
79
80
|
letta_client/tag/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
80
|
-
letta_client/tag/client.py,sha256=
|
|
81
|
+
letta_client/tag/client.py,sha256=TBAotdb0e2_x2pANF4dOE1qmWY3GIgb7nOhvN7iZ3_4,5183
|
|
81
82
|
letta_client/tools/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
82
|
-
letta_client/tools/client.py,sha256=
|
|
83
|
-
letta_client/types/__init__.py,sha256=
|
|
83
|
+
letta_client/tools/client.py,sha256=ABqUGbxn8C1aDQ03PcaQWHYFQcB18GQ4P9DlidWVDqM,52999
|
|
84
|
+
letta_client/types/__init__.py,sha256=dL71l8TC9VNQolYQWhXHQ14CPZsvhJnNwQtFYnZqJsw,6447
|
|
84
85
|
letta_client/types/action_model.py,sha256=65eLvLD-9-zK9hrDun7wjVlXsCiI7zujv8aGPuIb3jE,1206
|
|
85
86
|
letta_client/types/action_parameters_model.py,sha256=zKzJkjtu1pt4BEA2GHlg9rMWja5a0uZygOpOx3FbgIM,749
|
|
86
87
|
letta_client/types/action_response_model.py,sha256=5OuImT0EQFkAnc81F6tZsVEwYG8rKbIrx_ydGiKqwog,745
|
|
@@ -91,7 +92,8 @@ letta_client/types/agent_type.py,sha256=iZ3Wa4BUddDeFSgcK3Z0WUKCQYDRCEo0aJICKsc3
|
|
|
91
92
|
letta_client/types/app_auth_scheme.py,sha256=_6FLlw3drQ3HDSP9SecStBwQyE0DgL6UvKFArCC4yp8,1242
|
|
92
93
|
letta_client/types/app_auth_scheme_auth_mode.py,sha256=Zafrac9piNVjCVppCv0CS34Yx4rFaFPieeNCrtaPSwk,225
|
|
93
94
|
letta_client/types/app_model.py,sha256=cypZdZ12NW9pbG23XW9qTtGnZNwNlJxoxBERaFcLmso,1519
|
|
94
|
-
letta_client/types/assistant_message.py,sha256=
|
|
95
|
+
letta_client/types/assistant_message.py,sha256=OWJz-tAsuiA1bZguDbvIBJezzjYiQWt8kWCxwxK-zN4,779
|
|
96
|
+
letta_client/types/assistant_message_content.py,sha256=2XtIgU1tzCHgp-NwWIkUFohOd1GClieiRk9OATTEcew,188
|
|
95
97
|
letta_client/types/auth_request.py,sha256=q63VMj39aCmljDuzUeAClXEqyaoa_HKv5IraSv8ry9M,683
|
|
96
98
|
letta_client/types/auth_response.py,sha256=jtG9Nn0voJcOWkBtvnuGGwhpUhYz9A8O7soOJZo_E_E,861
|
|
97
99
|
letta_client/types/auth_scheme_field.py,sha256=W4-qgKtKUSpBHaSvjLyzLybOIsGo7Ggk4VECpsoPnqQ,881
|
|
@@ -122,12 +124,13 @@ letta_client/types/letta_request.py,sha256=Xps139s6e0fc7HWi0YJHFz51AfY3iDAB9kh-y
|
|
|
122
124
|
letta_client/types/letta_request_config.py,sha256=b6K4QtDdHjcZKfBb1fugUuoPrT2N4d5TTB0PIRNI2SU,1085
|
|
123
125
|
letta_client/types/letta_response.py,sha256=i5gAUTgWzIst_RP8I_zSh0GSnLIS3z--1BmK6EF1mkQ,1315
|
|
124
126
|
letta_client/types/letta_usage_statistics.py,sha256=0BHM3ArfwH6WVJNHYja7LI2k3BZ3jt0o_COfgA4muWo,1537
|
|
125
|
-
letta_client/types/llm_config.py,sha256=
|
|
127
|
+
letta_client/types/llm_config.py,sha256=8Phumb-vTzIED8vi2tFMGP8kCITCgEtl5vv99p6vot8,2796
|
|
126
128
|
letta_client/types/llm_config_model_endpoint_type.py,sha256=zz7qt0dCqX06vu8mTN1vIvO7iPl1CNbKTFHd-Qg6q6E,524
|
|
127
129
|
letta_client/types/local_sandbox_config.py,sha256=Q4riu4FS69VmC6WsJYcN5YzRCPJwn0hRHRV9bEI_vHY,1044
|
|
128
130
|
letta_client/types/memory.py,sha256=KD5MkDQB-vbRPT9f_-yFBWY1WUW_NWxYEI0IiflG6P8,1035
|
|
129
|
-
letta_client/types/message.py,sha256=
|
|
130
|
-
letta_client/types/message_create.py,sha256=
|
|
131
|
+
letta_client/types/message.py,sha256=F-cQEwaEUvskygFdZ4GWP02iOI4lXbcwt0lGJ1odh5g,3118
|
|
132
|
+
letta_client/types/message_create.py,sha256=x80xQYxC3IUHs7PKCqHfeJkHRh02dx0oOc0PoJO8krc,1011
|
|
133
|
+
letta_client/types/message_create_content.py,sha256=N3W7IzbUk2RqEbL88noLCu4Bmbli5-yq35d0nfscGl8,185
|
|
131
134
|
letta_client/types/message_create_role.py,sha256=atjQEZ8iT4gTAmrFTFnRaM66f0MGsgfGq6hpx1Q-i44,159
|
|
132
135
|
letta_client/types/message_role.py,sha256=HKatrA1jt02oTObExloTY3rW8Urzn37kBTg0Z6MbwkQ,186
|
|
133
136
|
letta_client/types/not_found_error_body.py,sha256=_1esSlUdkBx6CRs6aAIJrxzh3VZKEG0xzeLbxebBuy0,615
|
|
@@ -148,14 +151,16 @@ letta_client/types/sandbox_environment_variable_create.py,sha256=AhGE8ITStXkPOfP
|
|
|
148
151
|
letta_client/types/sandbox_environment_variable_update.py,sha256=JMkX6nzvcBNEemjvBmyHDezci3Bn7epKhMnvFY_--EA,948
|
|
149
152
|
letta_client/types/sandbox_type.py,sha256=XSWmX3JIFFrDPQ4i89E8LauXY8kjmJEtaz6e_JheGm4,151
|
|
150
153
|
letta_client/types/source.py,sha256=7tLptZ4AZrvRPF6NqToM4Vf9i7TosS2_Ydks4zfvZx4,2239
|
|
151
|
-
letta_client/types/system_message.py,sha256=
|
|
154
|
+
letta_client/types/system_message.py,sha256=DUIgPbL_ya49sGN15DIEGO2t8OQ4pseHvbMcayygV0c,1155
|
|
155
|
+
letta_client/types/system_message_content.py,sha256=9VvwCUKMkNidcMUaPmuj6-WhzeJoEZCNvyn3oH-LR70,185
|
|
152
156
|
letta_client/types/terminal_tool_rule.py,sha256=LscdG_oQuMmpnS0WLIpN_cOuTBoqJ5Ccl3ha8xv-XQQ,899
|
|
157
|
+
letta_client/types/text_content.py,sha256=Z8UL4Sqqq2qClKU_nCgR9XFCj3dwYyhZMmvnnz1F0AE,670
|
|
153
158
|
letta_client/types/tool.py,sha256=0D7w3mGizkqczT92dnueu_LGJg-9gDkO0PS5cnLnynQ,2335
|
|
154
159
|
letta_client/types/tool_call.py,sha256=EKGAFwzoa6zMTpOkG55hWzFn_AgPrbLXSOu5M84x8WU,594
|
|
155
160
|
letta_client/types/tool_call_delta.py,sha256=wGeZwJ9pwYHD5-f4Unf5-vJqefK40eHw9i0w3bCjRoE,671
|
|
156
161
|
letta_client/types/tool_call_message.py,sha256=PQEYtLzNMmqc86q7kqjEuALvJ4HdAC_8ODIYjArsoco,1096
|
|
157
162
|
letta_client/types/tool_call_message_tool_call.py,sha256=twtq5-vZIeh1nShqm8iTCN9YFtY7LUIL-bFYuUfhF1o,219
|
|
158
|
-
letta_client/types/tool_create.py,sha256=
|
|
163
|
+
letta_client/types/tool_create.py,sha256=OHG0RqVSLi7O_C_vhbo-1AN5FPCy-JTbDc0a88_Z5XE,1347
|
|
159
164
|
letta_client/types/tool_return_message.py,sha256=hQ-17bvNGoSaCow4AvWSGLTa80fKuXP2bxXGNUXuX0w,1591
|
|
160
165
|
letta_client/types/tool_return_message_status.py,sha256=FvFOMaG9mnmgnHi2UBQVQQMtHFabbWnQnHTxGUDgVl0,167
|
|
161
166
|
letta_client/types/tool_rule_type.py,sha256=W6lVaYVYzSzhFHgqitmw6XLtxgxBhINgHZJfSnxg6ts,265
|
|
@@ -163,11 +168,12 @@ letta_client/types/tool_type.py,sha256=Y4fG_O_PLHIJHbqLl08mC_EmeWQ9bdP_D8OLAS8mw
|
|
|
163
168
|
letta_client/types/usage_statistics.py,sha256=btEmMUxFVu7oQQtBCdQqFJ6XddgmR84799-AdlsHh0w,690
|
|
164
169
|
letta_client/types/user.py,sha256=z_v1uqQ6HYwV_Pp7wDDqS6QWhslHgdUH-AldV-jnmKQ,1349
|
|
165
170
|
letta_client/types/user_create.py,sha256=prQea3xb2-Cm64wv6Y84OfhWNWrA2P8SH5yhUxejzOI,616
|
|
166
|
-
letta_client/types/user_message.py,sha256=
|
|
171
|
+
letta_client/types/user_message.py,sha256=KE3ZZMqAYeL9-o4vadHqymzM2uxvKg4Rk3mpUrOviis,1136
|
|
172
|
+
letta_client/types/user_message_content.py,sha256=qqNvpEusXfMaf_jKqVchqhKtAyahNAlRlqXSU1UIhBE,183
|
|
167
173
|
letta_client/types/user_update.py,sha256=0Bl1OjO7bfmlpsGQ36dSh6DH1UB_wJOTNewS0wDLkP4,731
|
|
168
174
|
letta_client/types/validation_error.py,sha256=ACDS7wL5nQbS8ymFhWljwbBJmbugNa8bs2O5xEZC3u4,680
|
|
169
175
|
letta_client/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPXjdtN9EB7HrLVo6EP0,128
|
|
170
176
|
letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
|
|
171
|
-
letta_client-0.1.
|
|
172
|
-
letta_client-0.1.
|
|
173
|
-
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
|