letta-client 0.1.69__py3-none-any.whl → 0.1.71__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.

Files changed (39) hide show
  1. letta_client/__init__.py +36 -4
  2. letta_client/agents/client.py +25 -24
  3. letta_client/agents/messages/client.py +40 -24
  4. letta_client/core/client_wrapper.py +1 -1
  5. letta_client/groups/client.py +24 -8
  6. letta_client/types/__init__.py +36 -4
  7. letta_client/types/agent_schema.py +51 -0
  8. letta_client/types/assistant_message.py +3 -1
  9. letta_client/types/core_memory_block_schema.py +33 -0
  10. letta_client/types/letta_message_content_union.py +12 -0
  11. letta_client/types/message.py +2 -2
  12. letta_client/types/message_content_item.py +13 -0
  13. letta_client/types/message_create_content.py +2 -2
  14. letta_client/types/message_schema.py +30 -0
  15. letta_client/types/omitted_reasoning_content.py +23 -0
  16. letta_client/types/parameter_properties.py +20 -0
  17. letta_client/types/parameters_schema.py +22 -0
  18. letta_client/types/reasoning_content.py +33 -0
  19. letta_client/types/reasoning_message.py +6 -0
  20. letta_client/types/reasoning_message_source.py +5 -0
  21. letta_client/types/redacted_reasoning_content.py +23 -0
  22. letta_client/types/system_message.py +5 -4
  23. letta_client/types/tag_schema.py +19 -0
  24. letta_client/types/tool_call_content.py +33 -0
  25. letta_client/types/tool_call_message.py +2 -0
  26. letta_client/types/tool_env_var_schema.py +24 -0
  27. letta_client/types/tool_json_schema.py +24 -0
  28. letta_client/types/tool_return_content.py +33 -0
  29. letta_client/types/tool_return_message.py +2 -0
  30. letta_client/types/tool_rule_schema.py +20 -0
  31. letta_client/types/tool_schema.py +31 -0
  32. letta_client/types/update_system_message.py +2 -3
  33. letta_client/types/update_user_message.py +1 -1
  34. letta_client/types/user_message.py +4 -2
  35. {letta_client-0.1.69.dist-info → letta_client-0.1.71.dist-info}/METADATA +7 -3
  36. {letta_client-0.1.69.dist-info → letta_client-0.1.71.dist-info}/RECORD +37 -21
  37. letta_client/types/system_message_content.py +0 -6
  38. letta_client/types/update_system_message_content.py +0 -6
  39. {letta_client-0.1.69.dist-info → letta_client-0.1.71.dist-info}/WHEEL +0 -0
@@ -4,6 +4,7 @@ from .action_model import ActionModel
4
4
  from .action_parameters_model import ActionParametersModel
5
5
  from .action_response_model import ActionResponseModel
6
6
  from .agent_environment_variable import AgentEnvironmentVariable
7
+ from .agent_schema import AgentSchema
7
8
  from .agent_state import AgentState
8
9
  from .agent_state_tool_rules_item import AgentStateToolRulesItem
9
10
  from .agent_type import AgentType
@@ -72,6 +73,7 @@ from .conditional_tool_rule import ConditionalToolRule
72
73
  from .conflict_error_body import ConflictErrorBody
73
74
  from .context_window_overview import ContextWindowOverview
74
75
  from .continue_tool_rule import ContinueToolRule
76
+ from .core_memory_block_schema import CoreMemoryBlockSchema
75
77
  from .create_block import CreateBlock
76
78
  from .dynamic_manager import DynamicManager
77
79
  from .e_2_b_sandbox_config import E2BSandboxConfig
@@ -106,6 +108,7 @@ from .job import Job
106
108
  from .job_status import JobStatus
107
109
  from .job_type import JobType
108
110
  from .json_schema import JsonSchema
111
+ from .letta_message_content_union import LettaMessageContentUnion
109
112
  from .letta_message_union import LettaMessageUnion
110
113
  from .letta_request import LettaRequest
111
114
  from .letta_request_config import LettaRequestConfig
@@ -120,12 +123,15 @@ from .mcp_server_type import McpServerType
120
123
  from .mcp_tool import McpTool
121
124
  from .memory import Memory
122
125
  from .message import Message
126
+ from .message_content_item import MessageContentItem
123
127
  from .message_create import MessageCreate
124
128
  from .message_create_content import MessageCreateContent
125
129
  from .message_create_role import MessageCreateRole
126
130
  from .message_role import MessageRole
131
+ from .message_schema import MessageSchema
127
132
  from .not_found_error_body import NotFoundErrorBody
128
133
  from .not_found_error_body_message import NotFoundErrorBodyMessage
134
+ from .omitted_reasoning_content import OmittedReasoningContent
129
135
  from .openai_types_chat_chat_completion_message_tool_call_param_function import (
130
136
  OpenaiTypesChatChatCompletionMessageToolCallParamFunction,
131
137
  )
@@ -135,10 +141,15 @@ from .openai_types_chat_chat_completion_named_tool_choice_param_function import
135
141
  from .openai_types_chat_completion_create_params_function import OpenaiTypesChatCompletionCreateParamsFunction
136
142
  from .organization import Organization
137
143
  from .organization_create import OrganizationCreate
144
+ from .parameter_properties import ParameterProperties
145
+ from .parameters_schema import ParametersSchema
138
146
  from .passage import Passage
139
147
  from .pip_requirement import PipRequirement
140
148
  from .provider import Provider
149
+ from .reasoning_content import ReasoningContent
141
150
  from .reasoning_message import ReasoningMessage
151
+ from .reasoning_message_source import ReasoningMessageSource
152
+ from .redacted_reasoning_content import RedactedReasoningContent
142
153
  from .response_format_json_object import ResponseFormatJsonObject
143
154
  from .response_format_json_schema import ResponseFormatJsonSchema
144
155
  from .response_format_text import ResponseFormatText
@@ -159,25 +170,30 @@ from .stdio_server_config import StdioServerConfig
159
170
  from .step import Step
160
171
  from .supervisor_manager import SupervisorManager
161
172
  from .system_message import SystemMessage
162
- from .system_message_content import SystemMessageContent
173
+ from .tag_schema import TagSchema
163
174
  from .terminal_tool_rule import TerminalToolRule
164
175
  from .text_content import TextContent
165
176
  from .tool import Tool
166
177
  from .tool_call import ToolCall
178
+ from .tool_call_content import ToolCallContent
167
179
  from .tool_call_delta import ToolCallDelta
168
180
  from .tool_call_message import ToolCallMessage
169
181
  from .tool_call_message_tool_call import ToolCallMessageToolCall
170
182
  from .tool_create import ToolCreate
183
+ from .tool_env_var_schema import ToolEnvVarSchema
184
+ from .tool_json_schema import ToolJsonSchema
171
185
  from .tool_return import ToolReturn
186
+ from .tool_return_content import ToolReturnContent
172
187
  from .tool_return_message import ToolReturnMessage
173
188
  from .tool_return_message_status import ToolReturnMessageStatus
174
189
  from .tool_return_status import ToolReturnStatus
190
+ from .tool_rule_schema import ToolRuleSchema
191
+ from .tool_schema import ToolSchema
175
192
  from .tool_type import ToolType
176
193
  from .update_assistant_message import UpdateAssistantMessage
177
194
  from .update_assistant_message_content import UpdateAssistantMessageContent
178
195
  from .update_reasoning_message import UpdateReasoningMessage
179
196
  from .update_system_message import UpdateSystemMessage
180
- from .update_system_message_content import UpdateSystemMessageContent
181
197
  from .update_user_message import UpdateUserMessage
182
198
  from .update_user_message_content import UpdateUserMessageContent
183
199
  from .usage_statistics import UsageStatistics
@@ -198,6 +214,7 @@ __all__ = [
198
214
  "ActionParametersModel",
199
215
  "ActionResponseModel",
200
216
  "AgentEnvironmentVariable",
217
+ "AgentSchema",
201
218
  "AgentState",
202
219
  "AgentStateToolRulesItem",
203
220
  "AgentType",
@@ -266,6 +283,7 @@ __all__ = [
266
283
  "ConflictErrorBody",
267
284
  "ContextWindowOverview",
268
285
  "ContinueToolRule",
286
+ "CoreMemoryBlockSchema",
269
287
  "CreateBlock",
270
288
  "DynamicManager",
271
289
  "E2BSandboxConfig",
@@ -300,6 +318,7 @@ __all__ = [
300
318
  "JobStatus",
301
319
  "JobType",
302
320
  "JsonSchema",
321
+ "LettaMessageContentUnion",
303
322
  "LettaMessageUnion",
304
323
  "LettaRequest",
305
324
  "LettaRequestConfig",
@@ -314,21 +333,29 @@ __all__ = [
314
333
  "McpTool",
315
334
  "Memory",
316
335
  "Message",
336
+ "MessageContentItem",
317
337
  "MessageCreate",
318
338
  "MessageCreateContent",
319
339
  "MessageCreateRole",
320
340
  "MessageRole",
341
+ "MessageSchema",
321
342
  "NotFoundErrorBody",
322
343
  "NotFoundErrorBodyMessage",
344
+ "OmittedReasoningContent",
323
345
  "OpenaiTypesChatChatCompletionMessageToolCallParamFunction",
324
346
  "OpenaiTypesChatChatCompletionNamedToolChoiceParamFunction",
325
347
  "OpenaiTypesChatCompletionCreateParamsFunction",
326
348
  "Organization",
327
349
  "OrganizationCreate",
350
+ "ParameterProperties",
351
+ "ParametersSchema",
328
352
  "Passage",
329
353
  "PipRequirement",
330
354
  "Provider",
355
+ "ReasoningContent",
331
356
  "ReasoningMessage",
357
+ "ReasoningMessageSource",
358
+ "RedactedReasoningContent",
332
359
  "ResponseFormatJsonObject",
333
360
  "ResponseFormatJsonSchema",
334
361
  "ResponseFormatText",
@@ -349,25 +376,30 @@ __all__ = [
349
376
  "Step",
350
377
  "SupervisorManager",
351
378
  "SystemMessage",
352
- "SystemMessageContent",
379
+ "TagSchema",
353
380
  "TerminalToolRule",
354
381
  "TextContent",
355
382
  "Tool",
356
383
  "ToolCall",
384
+ "ToolCallContent",
357
385
  "ToolCallDelta",
358
386
  "ToolCallMessage",
359
387
  "ToolCallMessageToolCall",
360
388
  "ToolCreate",
389
+ "ToolEnvVarSchema",
390
+ "ToolJsonSchema",
361
391
  "ToolReturn",
392
+ "ToolReturnContent",
362
393
  "ToolReturnMessage",
363
394
  "ToolReturnMessageStatus",
364
395
  "ToolReturnStatus",
396
+ "ToolRuleSchema",
397
+ "ToolSchema",
365
398
  "ToolType",
366
399
  "UpdateAssistantMessage",
367
400
  "UpdateAssistantMessageContent",
368
401
  "UpdateReasoningMessage",
369
402
  "UpdateSystemMessage",
370
- "UpdateSystemMessageContent",
371
403
  "UpdateUserMessage",
372
404
  "UpdateUserMessageContent",
373
405
  "UsageStatistics",
@@ -0,0 +1,51 @@
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
+ from .core_memory_block_schema import CoreMemoryBlockSchema
6
+ from .embedding_config import EmbeddingConfig
7
+ from .llm_config import LlmConfig
8
+ from .message_schema import MessageSchema
9
+ import typing_extensions
10
+ from ..core.serialization import FieldMetadata
11
+ from .tag_schema import TagSchema
12
+ from .tool_env_var_schema import ToolEnvVarSchema
13
+ from .tool_rule_schema import ToolRuleSchema
14
+ from .tool_schema import ToolSchema
15
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
16
+ import pydantic
17
+
18
+
19
+ class AgentSchema(UncheckedBaseModel):
20
+ agent_type: str
21
+ core_memory: typing.List[CoreMemoryBlockSchema]
22
+ created_at: str
23
+ description: str
24
+ embedding_config: EmbeddingConfig
25
+ groups: typing.List[typing.Optional[typing.Any]]
26
+ identities: typing.List[typing.Optional[typing.Any]]
27
+ is_deleted: bool
28
+ llm_config: LlmConfig
29
+ message_buffer_autoclear: bool
30
+ messages: typing.List[MessageSchema]
31
+ metadata: typing_extensions.Annotated[
32
+ typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="metadata_")
33
+ ]
34
+ multi_agent_group: typing.Optional[typing.Any] = None
35
+ name: str
36
+ system: str
37
+ tags: typing.List[TagSchema]
38
+ tool_exec_environment_variables: typing.List[ToolEnvVarSchema]
39
+ tool_rules: typing.List[ToolRuleSchema]
40
+ tools: typing.List[ToolSchema]
41
+ updated_at: str
42
+ version: str
43
+
44
+ if IS_PYDANTIC_V2:
45
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
46
+ else:
47
+
48
+ class Config:
49
+ frozen = True
50
+ smart_union = True
51
+ extra = pydantic.Extra.allow
@@ -15,11 +15,13 @@ class AssistantMessage(UncheckedBaseModel):
15
15
  Args:
16
16
  id (str): The ID of the message
17
17
  date (datetime): The date the message was created in ISO format
18
- content (Union[str, List[LettaMessageContentUnion]]): The message content sent by the agent (can be a string or an array of content parts)
18
+ name (Optional[str]): The name of the sender of the message
19
+ content (Union[str, List[LettaAssistantMessageContentUnion]]): The message content sent by the agent (can be a string or an array of content parts)
19
20
  """
20
21
 
21
22
  id: str
22
23
  date: dt.datetime
24
+ name: typing.Optional[str] = None
23
25
  message_type: typing.Literal["assistant_message"] = "assistant_message"
24
26
  content: AssistantMessageContent = pydantic.Field()
25
27
  """
@@ -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
+ import typing
5
+ import typing_extensions
6
+ from ..core.serialization import FieldMetadata
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import pydantic
9
+
10
+
11
+ class CoreMemoryBlockSchema(UncheckedBaseModel):
12
+ created_at: str
13
+ description: typing.Optional[str] = None
14
+ identities: typing.List[typing.Optional[typing.Any]]
15
+ is_deleted: bool
16
+ is_template: bool
17
+ label: str
18
+ limit: int
19
+ metadata: typing_extensions.Annotated[
20
+ typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="metadata_")
21
+ ] = None
22
+ template_name: typing.Optional[str] = None
23
+ updated_at: str
24
+ value: str
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
@@ -0,0 +1,12 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .text_content import TextContent
5
+ from .tool_call_content import ToolCallContent
6
+ from .reasoning_content import ReasoningContent
7
+ from .redacted_reasoning_content import RedactedReasoningContent
8
+ from .omitted_reasoning_content import OmittedReasoningContent
9
+
10
+ LettaMessageContentUnion = typing.Union[
11
+ TextContent, ToolCallContent, ReasoningContent, RedactedReasoningContent, OmittedReasoningContent
12
+ ]
@@ -5,7 +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
+ from .message_content_item import MessageContentItem
9
9
  from .chat_completion_message_tool_call import ChatCompletionMessageToolCall
10
10
  from .tool_return import ToolReturn
11
11
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -58,7 +58,7 @@ class Message(UncheckedBaseModel):
58
58
  The role of the participant.
59
59
  """
60
60
 
61
- content: typing.Optional[typing.List[TextContent]] = pydantic.Field(default=None)
61
+ content: typing.Optional[typing.List[MessageContentItem]] = pydantic.Field(default=None)
62
62
  """
63
63
  The content of the message.
64
64
  """
@@ -0,0 +1,13 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .omitted_reasoning_content import OmittedReasoningContent
5
+ from .reasoning_content import ReasoningContent
6
+ from .redacted_reasoning_content import RedactedReasoningContent
7
+ from .text_content import TextContent
8
+ from .tool_call_content import ToolCallContent
9
+ from .tool_return_content import ToolReturnContent
10
+
11
+ MessageContentItem = typing.Union[
12
+ OmittedReasoningContent, ReasoningContent, RedactedReasoningContent, TextContent, ToolCallContent, ToolReturnContent
13
+ ]
@@ -1,6 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  import typing
4
- from .text_content import TextContent
4
+ from .letta_message_content_union import LettaMessageContentUnion
5
5
 
6
- MessageCreateContent = typing.Union[str, typing.List[TextContent]]
6
+ MessageCreateContent = typing.Union[typing.List[LettaMessageContentUnion], str]
@@ -0,0 +1,30 @@
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
+ from .text_content import TextContent
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import pydantic
8
+
9
+
10
+ class MessageSchema(UncheckedBaseModel):
11
+ created_at: str
12
+ group_id: typing.Optional[str] = None
13
+ in_context: bool
14
+ model: typing.Optional[str] = None
15
+ name: typing.Optional[str] = None
16
+ role: str
17
+ content: typing.List[TextContent]
18
+ tool_call_id: typing.Optional[str] = None
19
+ tool_calls: typing.List[typing.Optional[typing.Any]]
20
+ tool_returns: typing.List[typing.Optional[typing.Any]]
21
+ updated_at: str
22
+
23
+ if IS_PYDANTIC_V2:
24
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
25
+ else:
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ extra = pydantic.Extra.allow
@@ -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 OmittedReasoningContent(UncheckedBaseModel):
10
+ type: typing.Literal["omitted_reasoning"] = "omitted_reasoning"
11
+ tokens: int = pydantic.Field()
12
+ """
13
+ The reasoning token count for intermediate reasoning content.
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
@@ -0,0 +1,20 @@
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
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import pydantic
7
+
8
+
9
+ class ParameterProperties(UncheckedBaseModel):
10
+ type: str
11
+ description: typing.Optional[str] = None
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
+ else:
16
+
17
+ class Config:
18
+ frozen = True
19
+ smart_union = True
20
+ extra = pydantic.Extra.allow
@@ -0,0 +1,22 @@
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
+ from .parameter_properties import ParameterProperties
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import pydantic
8
+
9
+
10
+ class ParametersSchema(UncheckedBaseModel):
11
+ type: typing.Optional[str] = None
12
+ properties: typing.Dict[str, ParameterProperties]
13
+ required: typing.Optional[typing.List[str]] = None
14
+
15
+ if IS_PYDANTIC_V2:
16
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
+ else:
18
+
19
+ class Config:
20
+ frozen = True
21
+ smart_union = True
22
+ extra = pydantic.Extra.allow
@@ -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
+ import typing
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class ReasoningContent(UncheckedBaseModel):
10
+ type: typing.Literal["reasoning"] = "reasoning"
11
+ is_native: bool = pydantic.Field()
12
+ """
13
+ Whether the reasoning content was generated by a reasoner model that processed this step.
14
+ """
15
+
16
+ reasoning: str = pydantic.Field()
17
+ """
18
+ The intermediate reasoning or thought process content.
19
+ """
20
+
21
+ signature: typing.Optional[str] = pydantic.Field(default=None)
22
+ """
23
+ A unique identifier for this reasoning step.
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
@@ -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 .reasoning_message_source import ReasoningMessageSource
6
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
8
  import pydantic
8
9
 
@@ -14,12 +15,17 @@ class ReasoningMessage(UncheckedBaseModel):
14
15
  Args:
15
16
  id (str): The ID of the message
16
17
  date (datetime): The date the message was created in ISO format
18
+ name (Optional[str]): The name of the sender of the message
19
+ source (Literal["reasoner_model", "non_reasoner_model"]): Whether the reasoning
20
+ content was generated natively by a reasoner model or derived via prompting
17
21
  reasoning (str): The internal reasoning of the agent
18
22
  """
19
23
 
20
24
  id: str
21
25
  date: dt.datetime
26
+ name: typing.Optional[str] = None
22
27
  message_type: typing.Literal["reasoning_message"] = "reasoning_message"
28
+ source: typing.Optional[ReasoningMessageSource] = None
23
29
  reasoning: str
24
30
 
25
31
  if IS_PYDANTIC_V2:
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ ReasoningMessageSource = typing.Union[typing.Literal["reasoner_model", "non_reasoner_model"], typing.Any]
@@ -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 RedactedReasoningContent(UncheckedBaseModel):
10
+ type: typing.Literal["redacted_reasoning"] = "redacted_reasoning"
11
+ data: str = pydantic.Field()
12
+ """
13
+ The redacted or filtered intermediate reasoning content.
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
@@ -3,7 +3,6 @@
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
7
6
  import pydantic
8
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
8
 
@@ -15,15 +14,17 @@ class SystemMessage(UncheckedBaseModel):
15
14
  Args:
16
15
  id (str): The ID of the message
17
16
  date (datetime): The date the message was created in ISO format
18
- content (Union[str, List[LettaMessageContentUnion]]): The message content sent by the system (can be a string or an array of content parts)
17
+ name (Optional[str]): The name of the sender of the message
18
+ content (str): The message content sent by the system
19
19
  """
20
20
 
21
21
  id: str
22
22
  date: dt.datetime
23
+ name: typing.Optional[str] = None
23
24
  message_type: typing.Literal["system_message"] = "system_message"
24
- content: SystemMessageContent = pydantic.Field()
25
+ content: str = pydantic.Field()
25
26
  """
26
- The message content sent by the system (can be a string or an array of content parts)
27
+ The message content sent by the system
27
28
  """
28
29
 
29
30
  if IS_PYDANTIC_V2:
@@ -0,0 +1,19 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
+ import pydantic
7
+
8
+
9
+ class TagSchema(UncheckedBaseModel):
10
+ tag: str
11
+
12
+ if IS_PYDANTIC_V2:
13
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
14
+ else:
15
+
16
+ class Config:
17
+ frozen = True
18
+ smart_union = True
19
+ extra = pydantic.Extra.allow
@@ -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
+ import typing
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class ToolCallContent(UncheckedBaseModel):
10
+ type: typing.Literal["tool_return"] = "tool_return"
11
+ id: str = pydantic.Field()
12
+ """
13
+ A unique identifier for this specific tool call instance.
14
+ """
15
+
16
+ name: str = pydantic.Field()
17
+ """
18
+ The name of the tool being called.
19
+ """
20
+
21
+ input: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
22
+ """
23
+ The parameters being passed to the tool, structured as a dictionary of parameter names to values.
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
@@ -15,11 +15,13 @@ class ToolCallMessage(UncheckedBaseModel):
15
15
  Args:
16
16
  id (str): The ID of the message
17
17
  date (datetime): The date the message was created in ISO format
18
+ name (Optional[str]): The name of the sender of the message
18
19
  tool_call (Union[ToolCall, ToolCallDelta]): The tool call
19
20
  """
20
21
 
21
22
  id: str
22
23
  date: dt.datetime
24
+ name: typing.Optional[str] = None
23
25
  message_type: typing.Literal["tool_call_message"] = "tool_call_message"
24
26
  tool_call: ToolCallMessageToolCall
25
27
 
@@ -0,0 +1,24 @@
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
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import pydantic
7
+
8
+
9
+ class ToolEnvVarSchema(UncheckedBaseModel):
10
+ created_at: str
11
+ description: typing.Optional[str] = None
12
+ is_deleted: bool
13
+ key: str
14
+ updated_at: str
15
+ value: str
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
19
+ else:
20
+
21
+ class Config:
22
+ frozen = True
23
+ smart_union = True
24
+ extra = pydantic.Extra.allow
@@ -0,0 +1,24 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ from .parameters_schema import ParametersSchema
5
+ import typing
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import pydantic
8
+
9
+
10
+ class ToolJsonSchema(UncheckedBaseModel):
11
+ name: str
12
+ description: str
13
+ parameters: ParametersSchema
14
+ type: typing.Optional[str] = None
15
+ required: typing.Optional[typing.List[str]] = None
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
19
+ else:
20
+
21
+ class Config:
22
+ frozen = True
23
+ smart_union = True
24
+ extra = pydantic.Extra.allow