letta-client 0.1.101__py3-none-any.whl → 0.1.103__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 CHANGED
@@ -147,6 +147,7 @@ from .types import (
147
147
  OrganizationUpdate,
148
148
  ParameterProperties,
149
149
  ParametersSchema,
150
+ ParentToolRule,
150
151
  Passage,
151
152
  PipRequirement,
152
153
  Provider,
@@ -423,6 +424,7 @@ __all__ = [
423
424
  "OrganizationUpdate",
424
425
  "ParameterProperties",
425
426
  "ParametersSchema",
427
+ "ParentToolRule",
426
428
  "Passage",
427
429
  "PipRequirement",
428
430
  "Provider",
@@ -6,8 +6,15 @@ from ...types.child_tool_rule import ChildToolRule
6
6
  from ...types.continue_tool_rule import ContinueToolRule
7
7
  from ...types.terminal_tool_rule import TerminalToolRule
8
8
  from ...types.max_count_per_step_tool_rule import MaxCountPerStepToolRule
9
+ from ...types.parent_tool_rule import ParentToolRule
9
10
  from ...types.init_tool_rule import InitToolRule
10
11
 
11
12
  CreateAgentRequestToolRulesItem = typing.Union[
12
- ConditionalToolRule, ChildToolRule, ContinueToolRule, TerminalToolRule, MaxCountPerStepToolRule, InitToolRule
13
+ ConditionalToolRule,
14
+ ChildToolRule,
15
+ ContinueToolRule,
16
+ TerminalToolRule,
17
+ MaxCountPerStepToolRule,
18
+ ParentToolRule,
19
+ InitToolRule,
13
20
  ]
@@ -6,8 +6,15 @@ from ...types.child_tool_rule import ChildToolRule
6
6
  from ...types.continue_tool_rule import ContinueToolRule
7
7
  from ...types.terminal_tool_rule import TerminalToolRule
8
8
  from ...types.max_count_per_step_tool_rule import MaxCountPerStepToolRule
9
+ from ...types.parent_tool_rule import ParentToolRule
9
10
  from ...types.init_tool_rule import InitToolRule
10
11
 
11
12
  UpdateAgentToolRulesItem = typing.Union[
12
- ConditionalToolRule, ChildToolRule, ContinueToolRule, TerminalToolRule, MaxCountPerStepToolRule, InitToolRule
13
+ ConditionalToolRule,
14
+ ChildToolRule,
15
+ ContinueToolRule,
16
+ TerminalToolRule,
17
+ MaxCountPerStepToolRule,
18
+ ParentToolRule,
19
+ InitToolRule,
13
20
  ]
@@ -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.101",
19
+ "X-Fern-SDK-Version": "0.1.103",
20
20
  }
21
21
  if self.token is not None:
22
22
  headers["Authorization"] = f"Bearer {self.token}"
@@ -150,6 +150,7 @@ from .organization_create import OrganizationCreate
150
150
  from .organization_update import OrganizationUpdate
151
151
  from .parameter_properties import ParameterProperties
152
152
  from .parameters_schema import ParametersSchema
153
+ from .parent_tool_rule import ParentToolRule
153
154
  from .passage import Passage
154
155
  from .pip_requirement import PipRequirement
155
156
  from .provider import Provider
@@ -363,6 +364,7 @@ __all__ = [
363
364
  "OrganizationUpdate",
364
365
  "ParameterProperties",
365
366
  "ParametersSchema",
367
+ "ParentToolRule",
366
368
  "Passage",
367
369
  "PipRequirement",
368
370
  "Provider",
@@ -6,8 +6,15 @@ from .child_tool_rule import ChildToolRule
6
6
  from .continue_tool_rule import ContinueToolRule
7
7
  from .terminal_tool_rule import TerminalToolRule
8
8
  from .max_count_per_step_tool_rule import MaxCountPerStepToolRule
9
+ from .parent_tool_rule import ParentToolRule
9
10
  from .init_tool_rule import InitToolRule
10
11
 
11
12
  AgentStateToolRulesItem = typing.Union[
12
- ConditionalToolRule, ChildToolRule, ContinueToolRule, TerminalToolRule, MaxCountPerStepToolRule, InitToolRule
13
+ ConditionalToolRule,
14
+ ChildToolRule,
15
+ ContinueToolRule,
16
+ TerminalToolRule,
17
+ MaxCountPerStepToolRule,
18
+ ParentToolRule,
19
+ InitToolRule,
13
20
  ]
@@ -53,39 +53,39 @@ class Message(UncheckedBaseModel):
53
53
  The human-friendly ID of the Message
54
54
  """
55
55
 
56
- role: MessageRole = pydantic.Field()
56
+ agent_id: typing.Optional[str] = pydantic.Field(default=None)
57
57
  """
58
- The role of the participant.
58
+ The unique identifier of the agent.
59
59
  """
60
60
 
61
- content: typing.Optional[typing.List[MessageContentItem]] = pydantic.Field(default=None)
61
+ model: typing.Optional[str] = pydantic.Field(default=None)
62
62
  """
63
- The content of the message.
63
+ The model used to make the function call.
64
64
  """
65
65
 
66
- agent_id: typing.Optional[str] = pydantic.Field(default=None)
66
+ role: MessageRole = pydantic.Field()
67
67
  """
68
- The unique identifier of the agent.
68
+ The role of the participant.
69
69
  """
70
70
 
71
- model: typing.Optional[str] = pydantic.Field(default=None)
71
+ content: typing.Optional[typing.List[MessageContentItem]] = pydantic.Field(default=None)
72
72
  """
73
- The model used to make the function call.
73
+ The content of the message.
74
74
  """
75
75
 
76
76
  name: typing.Optional[str] = pydantic.Field(default=None)
77
77
  """
78
- The name of the participant.
78
+ For role user/assistant: the (optional) name of the participant. For role tool/function: the name of the function called.
79
79
  """
80
80
 
81
81
  tool_calls: typing.Optional[typing.List[ChatCompletionMessageToolCall]] = pydantic.Field(default=None)
82
82
  """
83
- The list of tool calls requested.
83
+ The list of tool calls requested. Only applicable for role assistant.
84
84
  """
85
85
 
86
86
  tool_call_id: typing.Optional[str] = pydantic.Field(default=None)
87
87
  """
88
- The id of the tool call.
88
+ The ID of the tool call. Only applicable for role tool.
89
89
  """
90
90
 
91
91
  step_id: typing.Optional[str] = pydantic.Field(default=None)
@@ -0,0 +1,32 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ import pydantic
5
+ import typing
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class ParentToolRule(UncheckedBaseModel):
10
+ """
11
+ A ToolRule that only allows a child tool to be called if the parent has been called.
12
+ """
13
+
14
+ tool_name: str = pydantic.Field()
15
+ """
16
+ The name of the tool. Must exist in the database for the user's organization.
17
+ """
18
+
19
+ type: typing.Literal["parent_last_tool"] = "parent_last_tool"
20
+ children: typing.List[str] = pydantic.Field()
21
+ """
22
+ The children tools that can be invoked.
23
+ """
24
+
25
+ if IS_PYDANTIC_V2:
26
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
+ else:
28
+
29
+ class Config:
30
+ frozen = True
31
+ smart_union = True
32
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.101
3
+ Version: 0.1.103
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,4 +1,4 @@
1
- letta_client/__init__.py,sha256=9uCx4KMFIArh1ADJkT-Yqzkf09Y1xlzXBdNlb4Gc7ak,14271
1
+ letta_client/__init__.py,sha256=7ugIsCugujtSzOf2YYd4uZNYLJ5Mckl96-3PvjSkjdc,14313
2
2
  letta_client/agents/__init__.py,sha256=CveigJGrnkw3yZ8S9yZ2DpK1HV0v1fU-khsiLJJ0uaU,1452
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
@@ -36,15 +36,15 @@ letta_client/agents/types/agents_search_request_search_item_operator.py,sha256=q
36
36
  letta_client/agents/types/agents_search_request_search_item_two.py,sha256=YBC-rhz_ToN948VyRy5VB1yT4JqtYcLD_V9hNrkgnfQ,690
37
37
  letta_client/agents/types/agents_search_request_search_item_zero.py,sha256=tGjwnFqSofFMBSAogmPLEflDQZ2rMqoMfFUtaIpND18,630
38
38
  letta_client/agents/types/agents_search_response.py,sha256=AQJVKps-bjCx2ujqESzW1Iy9ZYFS17hH_UFIeBeK4S8,815
39
- letta_client/agents/types/create_agent_request_tool_rules_item.py,sha256=P5vANIz2x0rWUAqHIgbXNA03fuTtJ8sWYimldw3NEnI,595
40
- letta_client/agents/types/update_agent_tool_rules_item.py,sha256=O0W83nOK8oMx_6NI8AWwUHTWH9X5QQ3JfpkqW8b9h_I,588
39
+ letta_client/agents/types/create_agent_request_tool_rules_item.py,sha256=L3FNsFTG9kVmuPbQhbCKNg3H2E5bB2Rgp92gWmGd-LM,689
40
+ letta_client/agents/types/update_agent_tool_rules_item.py,sha256=k9MmcVPsK-EGl8XlT3JQwdlBNLgpGw528jmi8fCFS7g,682
41
41
  letta_client/base_client.py,sha256=bF1nEcPGrhNqelaWz3DgROYdroGsBFCjpAHHri0uq7I,8629
42
42
  letta_client/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
43
43
  letta_client/blocks/client.py,sha256=LE9dsHaBxFLC3G035f0VpNDG7XKWRK8y9OXpeFCMvUw,30082
44
44
  letta_client/client.py,sha256=k2mZqqEWciVmEQHgipjCK4kQILk74hpSqzcdNwdql9A,21212
45
45
  letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
46
46
  letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
47
- letta_client/core/client_wrapper.py,sha256=BjLyo0-ZdGAb0s0pt-T0WrAOnV1S1Haeo3pFE6Iv7nQ,1998
47
+ letta_client/core/client_wrapper.py,sha256=m0uPjA6pG-uu3TgcKmh8NXZ8mIlmqgaArwoT2w5bJ5I,1998
48
48
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
49
49
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
50
50
  letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
@@ -106,7 +106,7 @@ letta_client/tools/types/add_mcp_server_request.py,sha256=EieZjfOT95sjkpxXdqy7gl
106
106
  letta_client/tools/types/add_mcp_server_response_item.py,sha256=TWdsKqGb1INhYtpGnAckz0Pw4nZShumSp4pfocRfxCA,270
107
107
  letta_client/tools/types/delete_mcp_server_response_item.py,sha256=MeZObU-7tMSCd-S5yuUjNDse6A1hUz1LLjbko0pXaro,273
108
108
  letta_client/tools/types/list_mcp_servers_response_value.py,sha256=AIoXu4bO8QNSU7zjL1jj0Rg4313wVtPaTt13W0aevLQ,273
109
- letta_client/types/__init__.py,sha256=mvsrVjScPnFriGz71-UsgicwQqMfPZeU0YDscVQ72QU,19156
109
+ letta_client/types/__init__.py,sha256=wvEXDQXF3Dx66mFVxP3Upy57HA9c6aHmDRxJqsvURJA,19223
110
110
  letta_client/types/action_model.py,sha256=y1e2XMv3skFaNJIBdYoBKgiORzGh05aOVvu-qVR9uHg,1240
111
111
  letta_client/types/action_parameters_model.py,sha256=LgKf5aPZG3-OHGxFdXiSokIDgce8c02xPYIAY05VgW8,828
112
112
  letta_client/types/action_response_model.py,sha256=yq2Fd9UU8j7vvtE3VqXUoRRvDzWcfJPj_95ynGdeHCs,824
@@ -114,7 +114,7 @@ letta_client/types/agent_environment_variable.py,sha256=vutZLcR0yETltgOZ7E_o9kR4
114
114
  letta_client/types/agent_schema.py,sha256=uTSjFAsnEYdOX-PRD2vHbn69JBe8GKbctvlDOP85k_U,1784
115
115
  letta_client/types/agent_schema_tool_rules_item.py,sha256=TTP7uKYPSe-EAl4p03j0Kd-W9tG5T6gfaWIUBAOVv9U,482
116
116
  letta_client/types/agent_state.py,sha256=8HlqbdcES-fgdk_rRCoStUoeJo0AWH0L1Vkri8IHpLc,5366
117
- letta_client/types/agent_state_tool_rules_item.py,sha256=jrcYmhULwLq704i85rCxW2GJLdz8XnBK0HxBLSkgs6k,539
117
+ letta_client/types/agent_state_tool_rules_item.py,sha256=WB-N4uyDTfhYBjQYDcLZDxDj73Xu1mQasBkdofUM-XU,625
118
118
  letta_client/types/agent_type.py,sha256=ywCn-ii7Xu0-N1tkK7oQaONlx42wcTVB-8oP71fNbw0,190
119
119
  letta_client/types/app_auth_scheme.py,sha256=_6FLlw3drQ3HDSP9SecStBwQyE0DgL6UvKFArCC4yp8,1242
120
120
  letta_client/types/app_auth_scheme_auth_mode.py,sha256=cEj9XAxLgFcang_Irw6h3koWac9A0tpNeBG05NUeGlw,387
@@ -235,7 +235,7 @@ letta_client/types/max_count_per_step_tool_rule_schema.py,sha256=1Zq4vblRTqFycqk
235
235
  letta_client/types/mcp_server_type.py,sha256=Hv45mKMPzmey2UVjwrTAvWXP1sDd13UwAtvtogBloLo,153
236
236
  letta_client/types/mcp_tool.py,sha256=_GSTb0k8l-IUEflRkQ6-v45UnbTcA4Nv1N8sgmExJQ0,912
237
237
  letta_client/types/memory.py,sha256=KD5MkDQB-vbRPT9f_-yFBWY1WUW_NWxYEI0IiflG6P8,1035
238
- letta_client/types/message.py,sha256=g7iDdt_ZZRsTAtDylSgzlJJjttjczjVmXLELYzTEgcI,3617
238
+ letta_client/types/message.py,sha256=AqByBZj_7Q_EvAFJNF5_VSA3Xh2vlkagzpA6ga4JBCs,3777
239
239
  letta_client/types/message_content_item.py,sha256=mg2npSBRXsH7-fAwhx9YhkVbeCF3cM8pE6fPYtUDIyc,550
240
240
  letta_client/types/message_create.py,sha256=CyiRbarJjzm4VeqwX5diMhppWGqsXy6mB_OSxIHtX3c,1148
241
241
  letta_client/types/message_create_content.py,sha256=KL3XAVKVrdsh4DZwdxKofUyehS-vnOT_VJNVzZDpE20,226
@@ -253,6 +253,7 @@ letta_client/types/organization_create.py,sha256=qi37VLCejxTYpJe9gC1slhENIdz6B4D
253
253
  letta_client/types/organization_update.py,sha256=uCQAcWm8az3VbMtCEidPBZLh6Qyo4Z0FQco1Hdrk4LY,814
254
254
  letta_client/types/parameter_properties.py,sha256=KVQGp_csoiNzyf9XsL083fwlX_a2Tc8GsCKyWB323C8,609
255
255
  letta_client/types/parameters_schema.py,sha256=ptXcwjuaCwqRhfizeiWAsu3pqT87Jcj_P3YaEkL4asM,748
256
+ letta_client/types/parent_tool_rule.py,sha256=zPTfn5epS8spEIw71HUbbSX2KYxlIPB-cGJ52UQmQ_M,964
256
257
  letta_client/types/passage.py,sha256=1OM19TyVCQEL1P3BC58hmzWfawZM4vejiKr0P11dOUk,3034
257
258
  letta_client/types/pip_requirement.py,sha256=Hmh7VpJhdSfFkafh6QwAehCp0MQUBXv1YAoYP-2wV2M,773
258
259
  letta_client/types/provider.py,sha256=RvdE9dzGFJ4hcmyvk2xeO7RNpxQvXhB_S9DNy8t_z-E,1053
@@ -323,6 +324,6 @@ letta_client/voice/__init__.py,sha256=7hX85553PiRMtIMM12a0DSoFzsglNiUziYR2ekS84Q
323
324
  letta_client/voice/client.py,sha256=STjswa5oOLoP59QwTJvQwi73kgn0UzKOaXc2CsTRI4k,6912
324
325
  letta_client/voice/types/__init__.py,sha256=FRc3iKRTONE4N8Lf1IqvnqWZ2kXdrFFvkL7PxVcR8Ew,212
325
326
  letta_client/voice/types/create_voice_chat_completions_request_body.py,sha256=ZLfKgNK1T6IAwLEvaBVFfy7jEAoPUXP28n-nfmHkklc,391
326
- letta_client-0.1.101.dist-info/METADATA,sha256=cgPoJMk5KnSIqQFvDV3M_WJu2KrDEmM_Qqqr6sTXesg,5042
327
- letta_client-0.1.101.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
328
- letta_client-0.1.101.dist-info/RECORD,,
327
+ letta_client-0.1.103.dist-info/METADATA,sha256=36aPlWz1YkjObMMVpgSzluiNvuVJU2ZyxBJ8Ei5O-Ss,5042
328
+ letta_client-0.1.103.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
329
+ letta_client-0.1.103.dist-info/RECORD,,