letta-client 0.1.55__py3-none-any.whl → 0.1.57__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/__init__.py +4 -0
- letta_client/agents/client.py +18 -8
- letta_client/core/client_wrapper.py +1 -1
- letta_client/types/__init__.py +4 -0
- letta_client/types/message.py +11 -0
- letta_client/types/tool_return.py +33 -0
- letta_client/types/tool_return_status.py +5 -0
- {letta_client-0.1.55.dist-info → letta_client-0.1.57.dist-info}/METADATA +1 -1
- {letta_client-0.1.55.dist-info → letta_client-0.1.57.dist-info}/RECORD +10 -8
- {letta_client-0.1.55.dist-info → letta_client-0.1.57.dist-info}/WHEEL +0 -0
letta_client/__init__.py
CHANGED
|
@@ -152,8 +152,10 @@ from .types import (
|
|
|
152
152
|
ToolCallMessage,
|
|
153
153
|
ToolCallMessageToolCall,
|
|
154
154
|
ToolCreate,
|
|
155
|
+
ToolReturn,
|
|
155
156
|
ToolReturnMessage,
|
|
156
157
|
ToolReturnMessageStatus,
|
|
158
|
+
ToolReturnStatus,
|
|
157
159
|
ToolType,
|
|
158
160
|
UsageStatistics,
|
|
159
161
|
User,
|
|
@@ -1034,8 +1036,10 @@ __all__ = [
|
|
|
1034
1036
|
"ToolCallMessage",
|
|
1035
1037
|
"ToolCallMessageToolCall",
|
|
1036
1038
|
"ToolCreate",
|
|
1039
|
+
"ToolReturn",
|
|
1037
1040
|
"ToolReturnMessage",
|
|
1038
1041
|
"ToolReturnMessageStatus",
|
|
1042
|
+
"ToolReturnStatus",
|
|
1039
1043
|
"ToolType",
|
|
1040
1044
|
"UnprocessableEntityError",
|
|
1041
1045
|
"UpdateAgentToolRulesItem",
|
letta_client/agents/client.py
CHANGED
|
@@ -477,7 +477,8 @@ class AgentsClient:
|
|
|
477
477
|
self,
|
|
478
478
|
*,
|
|
479
479
|
file: core.File,
|
|
480
|
-
|
|
480
|
+
append_copy_suffix: typing.Optional[bool] = None,
|
|
481
|
+
override_existing_tools: typing.Optional[bool] = None,
|
|
481
482
|
request_options: typing.Optional[RequestOptions] = None,
|
|
482
483
|
) -> AgentState:
|
|
483
484
|
"""
|
|
@@ -488,8 +489,11 @@ class AgentsClient:
|
|
|
488
489
|
file : core.File
|
|
489
490
|
See core.File for more documentation
|
|
490
491
|
|
|
491
|
-
|
|
492
|
-
|
|
492
|
+
append_copy_suffix : typing.Optional[bool]
|
|
493
|
+
If set to True, appends "_copy" to the end of the agent name.
|
|
494
|
+
|
|
495
|
+
override_existing_tools : typing.Optional[bool]
|
|
496
|
+
If set to True, existing tools can get their source code overwritten by the uploaded tool definitions. Note that Letta core tools can never be updated externally.
|
|
493
497
|
|
|
494
498
|
request_options : typing.Optional[RequestOptions]
|
|
495
499
|
Request-specific configuration.
|
|
@@ -512,7 +516,8 @@ class AgentsClient:
|
|
|
512
516
|
"v1/agents/upload",
|
|
513
517
|
method="POST",
|
|
514
518
|
params={
|
|
515
|
-
"
|
|
519
|
+
"append_copy_suffix": append_copy_suffix,
|
|
520
|
+
"override_existing_tools": override_existing_tools,
|
|
516
521
|
},
|
|
517
522
|
data={},
|
|
518
523
|
files={
|
|
@@ -1560,7 +1565,8 @@ class AsyncAgentsClient:
|
|
|
1560
1565
|
self,
|
|
1561
1566
|
*,
|
|
1562
1567
|
file: core.File,
|
|
1563
|
-
|
|
1568
|
+
append_copy_suffix: typing.Optional[bool] = None,
|
|
1569
|
+
override_existing_tools: typing.Optional[bool] = None,
|
|
1564
1570
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1565
1571
|
) -> AgentState:
|
|
1566
1572
|
"""
|
|
@@ -1571,8 +1577,11 @@ class AsyncAgentsClient:
|
|
|
1571
1577
|
file : core.File
|
|
1572
1578
|
See core.File for more documentation
|
|
1573
1579
|
|
|
1574
|
-
|
|
1575
|
-
|
|
1580
|
+
append_copy_suffix : typing.Optional[bool]
|
|
1581
|
+
If set to True, appends "_copy" to the end of the agent name.
|
|
1582
|
+
|
|
1583
|
+
override_existing_tools : typing.Optional[bool]
|
|
1584
|
+
If set to True, existing tools can get their source code overwritten by the uploaded tool definitions. Note that Letta core tools can never be updated externally.
|
|
1576
1585
|
|
|
1577
1586
|
request_options : typing.Optional[RequestOptions]
|
|
1578
1587
|
Request-specific configuration.
|
|
@@ -1603,7 +1612,8 @@ class AsyncAgentsClient:
|
|
|
1603
1612
|
"v1/agents/upload",
|
|
1604
1613
|
method="POST",
|
|
1605
1614
|
params={
|
|
1606
|
-
"
|
|
1615
|
+
"append_copy_suffix": append_copy_suffix,
|
|
1616
|
+
"override_existing_tools": override_existing_tools,
|
|
1607
1617
|
},
|
|
1608
1618
|
data={},
|
|
1609
1619
|
files={
|
|
@@ -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.57",
|
|
20
20
|
}
|
|
21
21
|
if self.token is not None:
|
|
22
22
|
headers["Authorization"] = f"Bearer {self.token}"
|
letta_client/types/__init__.py
CHANGED
|
@@ -157,8 +157,10 @@ from .tool_call_delta import ToolCallDelta
|
|
|
157
157
|
from .tool_call_message import ToolCallMessage
|
|
158
158
|
from .tool_call_message_tool_call import ToolCallMessageToolCall
|
|
159
159
|
from .tool_create import ToolCreate
|
|
160
|
+
from .tool_return import ToolReturn
|
|
160
161
|
from .tool_return_message import ToolReturnMessage
|
|
161
162
|
from .tool_return_message_status import ToolReturnMessageStatus
|
|
163
|
+
from .tool_return_status import ToolReturnStatus
|
|
162
164
|
from .tool_type import ToolType
|
|
163
165
|
from .usage_statistics import UsageStatistics
|
|
164
166
|
from .user import User
|
|
@@ -321,8 +323,10 @@ __all__ = [
|
|
|
321
323
|
"ToolCallMessage",
|
|
322
324
|
"ToolCallMessageToolCall",
|
|
323
325
|
"ToolCreate",
|
|
326
|
+
"ToolReturn",
|
|
324
327
|
"ToolReturnMessage",
|
|
325
328
|
"ToolReturnMessageStatus",
|
|
329
|
+
"ToolReturnStatus",
|
|
326
330
|
"ToolType",
|
|
327
331
|
"UsageStatistics",
|
|
328
332
|
"User",
|
letta_client/types/message.py
CHANGED
|
@@ -7,6 +7,7 @@ import datetime as dt
|
|
|
7
7
|
from .message_role import MessageRole
|
|
8
8
|
from .text_content import TextContent
|
|
9
9
|
from .chat_completion_message_tool_call_output import ChatCompletionMessageToolCallOutput
|
|
10
|
+
from .tool_return import ToolReturn
|
|
10
11
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
11
12
|
|
|
12
13
|
|
|
@@ -92,6 +93,16 @@ class Message(UncheckedBaseModel):
|
|
|
92
93
|
The id of the step that this message was created in.
|
|
93
94
|
"""
|
|
94
95
|
|
|
96
|
+
otid: typing.Optional[str] = pydantic.Field(default=None)
|
|
97
|
+
"""
|
|
98
|
+
The offline threading id associated with this message
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
tool_returns: typing.Optional[typing.List[ToolReturn]] = pydantic.Field(default=None)
|
|
102
|
+
"""
|
|
103
|
+
Tool execution return information for prior tool calls
|
|
104
|
+
"""
|
|
105
|
+
|
|
95
106
|
if IS_PYDANTIC_V2:
|
|
96
107
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
97
108
|
else:
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
+
from .tool_return_status import ToolReturnStatus
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ToolReturn(UncheckedBaseModel):
|
|
11
|
+
status: ToolReturnStatus = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The status of the tool call
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
stdout: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
Captured stdout (e.g. prints, logs) from the tool invocation
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
stderr: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
Captured stderr from the tool invocation
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
if IS_PYDANTIC_V2:
|
|
27
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
28
|
+
else:
|
|
29
|
+
|
|
30
|
+
class Config:
|
|
31
|
+
frozen = True
|
|
32
|
+
smart_union = True
|
|
33
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
letta_client/__init__.py,sha256=
|
|
1
|
+
letta_client/__init__.py,sha256=Ip8Q9zmaujvKwA0wFliL-9AK0GlkgB6UgwZJhcQLJKs,56600
|
|
2
2
|
letta_client/agents/__init__.py,sha256=dsO71a7KQVSsJkkd31kf6RwxZOeJzjhvJZRQBS7Mlws,22384
|
|
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=1z1dQuyRENb23yV-IqAlQRZ3zlUIXTW-dlPZwrWcUKs,83441
|
|
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
|
|
@@ -209,7 +209,7 @@ letta_client/blocks/client.py,sha256=AeQQ-IdYhV-zqLTt3PTrJOtJ6XtBZcXNC108Y5EogVU
|
|
|
209
209
|
letta_client/client.py,sha256=xdSrD4IkWokZHujowd1r7zESBoVgKGNvo6RqgZ3f0Fg,12808
|
|
210
210
|
letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
|
|
211
211
|
letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
212
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
212
|
+
letta_client/core/client_wrapper.py,sha256=ZmJAEjqyrDpW9pFCxWE77I9ho9Qr-JdXa3Xa6QBJXpQ,1997
|
|
213
213
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
214
214
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
215
215
|
letta_client/core/http_client.py,sha256=siUQ6UV0ARZALlxubqWSSAAPC9B4VW8y6MGlHStfaeo,19552
|
|
@@ -422,7 +422,7 @@ letta_client/templates/types/templates_create_agents_response_agents_item_update
|
|
|
422
422
|
letta_client/templates/types/templates_create_agents_response_agents_item_updated_at_item.py,sha256=T3rYnv5m_cBAEPBnEjUkkHJLYtFZfXNMbb7a9FrIwKY,175
|
|
423
423
|
letta_client/tools/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
424
424
|
letta_client/tools/client.py,sha256=Oyds2HAtLITB0vGiSjAgJhv2EhJP_7JHj9X7zCAgJDk,55555
|
|
425
|
-
letta_client/types/__init__.py,sha256=
|
|
425
|
+
letta_client/types/__init__.py,sha256=dDV5Vpf6r4bZrAeIYVCOc9eV4G33GCYYk7C0pXgUr9I,15522
|
|
426
426
|
letta_client/types/action_model.py,sha256=y1e2XMv3skFaNJIBdYoBKgiORzGh05aOVvu-qVR9uHg,1240
|
|
427
427
|
letta_client/types/action_parameters_model.py,sha256=LgKf5aPZG3-OHGxFdXiSokIDgce8c02xPYIAY05VgW8,828
|
|
428
428
|
letta_client/types/action_response_model.py,sha256=yq2Fd9UU8j7vvtE3VqXUoRRvDzWcfJPj_95ynGdeHCs,824
|
|
@@ -532,7 +532,7 @@ letta_client/types/llm_config.py,sha256=B-LJpzPB5RNSPG-cag65yTIWc0mbD7iKg77N6ejP
|
|
|
532
532
|
letta_client/types/llm_config_model_endpoint_type.py,sha256=HOSM5kIZDCNAVCWmASvAk52K819plqGlD66yKQ1xFkI,620
|
|
533
533
|
letta_client/types/local_sandbox_config.py,sha256=jfe7akG_YrJJ8csLaLdev04Zg1x-PTN0XCAL4KifaZI,1387
|
|
534
534
|
letta_client/types/memory.py,sha256=KD5MkDQB-vbRPT9f_-yFBWY1WUW_NWxYEI0IiflG6P8,1035
|
|
535
|
-
letta_client/types/message.py,sha256=
|
|
535
|
+
letta_client/types/message.py,sha256=ljE4P8F3UIFlExlrNQhtn6Gzudv-sATN4Gg-ylXqlao,3476
|
|
536
536
|
letta_client/types/message_create.py,sha256=x80xQYxC3IUHs7PKCqHfeJkHRh02dx0oOc0PoJO8krc,1011
|
|
537
537
|
letta_client/types/message_create_content.py,sha256=N3W7IzbUk2RqEbL88noLCu4Bmbli5-yq35d0nfscGl8,185
|
|
538
538
|
letta_client/types/message_create_role.py,sha256=atjQEZ8iT4gTAmrFTFnRaM66f0MGsgfGq6hpx1Q-i44,159
|
|
@@ -574,8 +574,10 @@ letta_client/types/tool_call_delta.py,sha256=wGeZwJ9pwYHD5-f4Unf5-vJqefK40eHw9i0
|
|
|
574
574
|
letta_client/types/tool_call_message.py,sha256=PQEYtLzNMmqc86q7kqjEuALvJ4HdAC_8ODIYjArsoco,1096
|
|
575
575
|
letta_client/types/tool_call_message_tool_call.py,sha256=twtq5-vZIeh1nShqm8iTCN9YFtY7LUIL-bFYuUfhF1o,219
|
|
576
576
|
letta_client/types/tool_create.py,sha256=VSMd23Kkd77SPbLv2oRHEzXqR2Eexc0ervjxXYLHiqc,1522
|
|
577
|
+
letta_client/types/tool_return.py,sha256=f-6zaRo8Bwl0i0Q0rHl8vKOfzymFHN_tVRoC2lMWksI,984
|
|
577
578
|
letta_client/types/tool_return_message.py,sha256=hQ-17bvNGoSaCow4AvWSGLTa80fKuXP2bxXGNUXuX0w,1591
|
|
578
579
|
letta_client/types/tool_return_message_status.py,sha256=FvFOMaG9mnmgnHi2UBQVQQMtHFabbWnQnHTxGUDgVl0,167
|
|
580
|
+
letta_client/types/tool_return_status.py,sha256=TQjwYprn5F_jU9kIbrtiyk7Gw2SjcmFFZLjFbGDpBM0,160
|
|
579
581
|
letta_client/types/tool_type.py,sha256=Br4Lk5nEsc8wcWP1leTqGPaYnNVWo4xMmoAksUTVqOA,271
|
|
580
582
|
letta_client/types/usage_statistics.py,sha256=btEmMUxFVu7oQQtBCdQqFJ6XddgmR84799-AdlsHh0w,690
|
|
581
583
|
letta_client/types/user.py,sha256=z_v1uqQ6HYwV_Pp7wDDqS6QWhslHgdUH-AldV-jnmKQ,1349
|
|
@@ -590,6 +592,6 @@ letta_client/voice/__init__.py,sha256=ZrZEuXIukVGhsfM-i0dIFfqjeSOBMPeEgDva7Vvnip
|
|
|
590
592
|
letta_client/voice/client.py,sha256=j3feSlNzeTVFXE7RUKEHGeMl_w0TJFBRUI3pXpLpUEI,6148
|
|
591
593
|
letta_client/voice/types/__init__.py,sha256=hBLJcrom99DkDxxsVRU2ni8kPx6SsCy8gtAJvNOz26w,199
|
|
592
594
|
letta_client/voice/types/create_voice_chat_completions_request.py,sha256=K4__83rXRCshfdobyAmH-5fUDJQ_PeSQetTUeC4Abk0,381
|
|
593
|
-
letta_client-0.1.
|
|
594
|
-
letta_client-0.1.
|
|
595
|
-
letta_client-0.1.
|
|
595
|
+
letta_client-0.1.57.dist-info/METADATA,sha256=F7ev0HHKxiv-5hFQqoMADfPKXmO9JprY-sPLjBGAqGk,4942
|
|
596
|
+
letta_client-0.1.57.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
597
|
+
letta_client-0.1.57.dist-info/RECORD,,
|
|
File without changes
|