letta-client 0.1.65__py3-none-any.whl → 0.1.67__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 +92 -2
- letta_client/agents/__init__.py +36 -0
- letta_client/agents/messages/client.py +12 -10
- letta_client/agents/messages/types/messages_modify_response.py +7 -5
- letta_client/agents/types/__init__.py +68 -0
- letta_client/agents/types/agents_search_response_agents_item.py +2 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group.py +14 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids.py +37 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_manager_agent_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_manager_agent_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_manager_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_max_turns.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_max_turns_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_termination_token.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_termination_token_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids.py +37 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_manager_agent_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_manager_agent_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_manager_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_max_turns.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_max_turns_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_termination_token.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_termination_token_item.py +5 -0
- letta_client/base_client.py +4 -0
- letta_client/core/client_wrapper.py +1 -1
- letta_client/groups/__init__.py +2 -0
- letta_client/groups/client.py +1294 -0
- letta_client/templates/__init__.py +36 -0
- letta_client/templates/types/__init__.py +72 -0
- letta_client/templates/types/templates_create_agents_response_agents_item.py +4 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group.py +16 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids.py +41 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_manager_agent_id.py +13 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_manager_agent_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_manager_type.py +7 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_max_turns.py +13 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_max_turns_item.py +5 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_termination_token.py +13 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_termination_token_item.py +7 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item.py +10 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids.py +41 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_manager_agent_id.py +13 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_manager_agent_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_manager_type.py +7 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_max_turns.py +13 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_max_turns_item.py +7 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_termination_token.py +15 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_termination_token_item.py +7 -0
- letta_client/types/__init__.py +18 -2
- letta_client/types/agent_state.py +6 -0
- letta_client/types/assistant_message.py +14 -2
- letta_client/types/assistant_message_content.py +2 -2
- letta_client/types/{update_reasoning_message_reasoning.py → components_schemas_text_content.py} +1 -2
- letta_client/types/dynamic_manager.py +33 -0
- letta_client/types/group.py +53 -0
- letta_client/types/group_create.py +33 -0
- letta_client/types/group_create_manager_config.py +8 -0
- letta_client/types/letta_streaming_request.py +43 -0
- letta_client/types/manager_type.py +5 -0
- letta_client/types/message.py +5 -0
- letta_client/types/reasoning_message.py +2 -2
- letta_client/types/round_robin_manager.py +23 -0
- letta_client/types/supervisor_manager.py +23 -0
- letta_client/types/system_message.py +7 -4
- letta_client/types/system_message_content.py +2 -2
- letta_client/types/tool_call_message.py +2 -2
- letta_client/types/tool_return_message.py +3 -3
- letta_client/types/update_assistant_message.py +7 -4
- letta_client/types/update_assistant_message_content.py +2 -2
- letta_client/types/update_reasoning_message.py +2 -3
- letta_client/types/update_system_message.py +7 -4
- letta_client/types/update_system_message_content.py +2 -2
- letta_client/types/update_user_message.py +7 -4
- letta_client/types/update_user_message_content.py +2 -2
- letta_client/types/user_message.py +7 -4
- letta_client/types/user_message_content.py +2 -2
- {letta_client-0.1.65.dist-info → letta_client-0.1.67.dist-info}/METADATA +1 -1
- {letta_client-0.1.65.dist-info → letta_client-0.1.67.dist-info}/RECORD +80 -34
- {letta_client-0.1.65.dist-info → letta_client-0.1.67.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
from .manager_type import ManagerType
|
|
6
|
+
import typing
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Group(UncheckedBaseModel):
|
|
11
|
+
id: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The id of the group. Assigned by the database.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
manager_type: ManagerType = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
agent_ids: typing.List[str] = pydantic.Field()
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
description: str = pydantic.Field()
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
manager_agent_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
termination_token: typing.Optional[str] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
max_turns: typing.Optional[int] = pydantic.Field(default=None)
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
if IS_PYDANTIC_V2:
|
|
47
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
48
|
+
else:
|
|
49
|
+
|
|
50
|
+
class Config:
|
|
51
|
+
frozen = True
|
|
52
|
+
smart_union = True
|
|
53
|
+
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 .group_create_manager_config import GroupCreateManagerConfig
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GroupCreate(UncheckedBaseModel):
|
|
11
|
+
agent_ids: typing.List[str] = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
description: str = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
manager_config: typing.Optional[GroupCreateManagerConfig] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
|
|
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
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from .dynamic_manager import DynamicManager
|
|
5
|
+
from .round_robin_manager import RoundRobinManager
|
|
6
|
+
from .supervisor_manager import SupervisorManager
|
|
7
|
+
|
|
8
|
+
GroupCreateManagerConfig = typing.Union[DynamicManager, RoundRobinManager, SupervisorManager]
|
|
@@ -0,0 +1,43 @@
|
|
|
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 .message_create import MessageCreate
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class LettaStreamingRequest(UncheckedBaseModel):
|
|
11
|
+
messages: typing.List[MessageCreate] = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The messages to be sent to the agent.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
use_assistant_message: typing.Optional[bool] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
assistant_message_tool_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
The name of the designated message tool.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
assistant_message_tool_kwarg: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
The name of the message argument in the designated message tool.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
stream_tokens: typing.Optional[bool] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True).
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
if IS_PYDANTIC_V2:
|
|
37
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
38
|
+
else:
|
|
39
|
+
|
|
40
|
+
class Config:
|
|
41
|
+
frozen = True
|
|
42
|
+
smart_union = True
|
|
43
|
+
extra = pydantic.Extra.allow
|
letta_client/types/message.py
CHANGED
|
@@ -103,6 +103,11 @@ class Message(UncheckedBaseModel):
|
|
|
103
103
|
Tool execution return information for prior tool calls
|
|
104
104
|
"""
|
|
105
105
|
|
|
106
|
+
group_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
107
|
+
"""
|
|
108
|
+
The multi-agent group that the message was sent in
|
|
109
|
+
"""
|
|
110
|
+
|
|
106
111
|
if IS_PYDANTIC_V2:
|
|
107
112
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
108
113
|
else:
|
|
@@ -11,10 +11,10 @@ class ReasoningMessage(UncheckedBaseModel):
|
|
|
11
11
|
"""
|
|
12
12
|
Representation of an agent's internal reasoning.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
reasoning (str): The internal reasoning of the agent
|
|
14
|
+
Args:
|
|
16
15
|
id (str): The ID of the message
|
|
17
16
|
date (datetime): The date the message was created in ISO format
|
|
17
|
+
reasoning (str): The internal reasoning of the agent
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
id: str
|
|
@@ -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 RoundRobinManager(UncheckedBaseModel):
|
|
10
|
+
manager_type: typing.Literal["round_robin"] = "round_robin"
|
|
11
|
+
max_turns: typing.Optional[int] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
|
|
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,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 SupervisorManager(UncheckedBaseModel):
|
|
10
|
+
manager_type: typing.Literal["supervisor"] = "supervisor"
|
|
11
|
+
manager_agent_id: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
|
|
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
|
|
@@ -4,24 +4,27 @@ from ..core.unchecked_base_model import UncheckedBaseModel
|
|
|
4
4
|
import datetime as dt
|
|
5
5
|
import typing
|
|
6
6
|
from .system_message_content import SystemMessageContent
|
|
7
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
7
|
import pydantic
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class SystemMessage(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
A message generated by the system. Never streamed back on a response, only used for cursor pagination.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
content (Union[str, List[MessageContentUnion]]): The message content sent by the user (can be a string or an array of content parts)
|
|
15
|
+
Args:
|
|
17
16
|
id (str): The ID of the message
|
|
18
17
|
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)
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
id: str
|
|
22
22
|
date: dt.datetime
|
|
23
23
|
message_type: typing.Literal["system_message"] = "system_message"
|
|
24
|
-
content: SystemMessageContent
|
|
24
|
+
content: SystemMessageContent = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
The message content sent by the system (can be a string or an array of content parts)
|
|
27
|
+
"""
|
|
25
28
|
|
|
26
29
|
if IS_PYDANTIC_V2:
|
|
27
30
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -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 .
|
|
4
|
+
from .components_schemas_text_content import ComponentsSchemasTextContent
|
|
5
5
|
|
|
6
|
-
SystemMessageContent = typing.Union[
|
|
6
|
+
SystemMessageContent = typing.Union[typing.List[ComponentsSchemasTextContent], str]
|
|
@@ -12,10 +12,10 @@ class ToolCallMessage(UncheckedBaseModel):
|
|
|
12
12
|
"""
|
|
13
13
|
A message representing a request to call a tool (generated by the LLM to trigger tool execution).
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
tool_call (Union[ToolCall, ToolCallDelta]): The tool call
|
|
15
|
+
Args:
|
|
17
16
|
id (str): The ID of the message
|
|
18
17
|
date (datetime): The date the message was created in ISO format
|
|
18
|
+
tool_call (Union[ToolCall, ToolCallDelta]): The tool call
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
id: str
|
|
@@ -12,11 +12,11 @@ class ToolReturnMessage(UncheckedBaseModel):
|
|
|
12
12
|
"""
|
|
13
13
|
A message representing the return value of a tool call (generated by Letta executing the requested tool).
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
tool_return (str): The return value of the tool
|
|
17
|
-
status (Literal["success", "error"]): The status of the tool call
|
|
15
|
+
Args:
|
|
18
16
|
id (str): The ID of the message
|
|
19
17
|
date (datetime): The date the message was created in ISO format
|
|
18
|
+
tool_return (str): The return value of the tool
|
|
19
|
+
status (Literal["success", "error"]): The status of the tool call
|
|
20
20
|
tool_call_id (str): A unique identifier for the tool call that generated this message
|
|
21
21
|
stdout (Optional[List(str)]): Captured stdout (e.g. prints, logs) from the tool invocation
|
|
22
22
|
stderr (Optional[List(str)]): Captured stderr from the tool invocation
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
-
from .update_assistant_message_content import UpdateAssistantMessageContent
|
|
5
4
|
import typing
|
|
6
|
-
from
|
|
5
|
+
from .update_assistant_message_content import UpdateAssistantMessageContent
|
|
7
6
|
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class UpdateAssistantMessage(UncheckedBaseModel):
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
message_type: typing.Optional[typing.Literal["assistant_message"]] = None
|
|
12
|
+
content: UpdateAssistantMessageContent = pydantic.Field()
|
|
13
|
+
"""
|
|
14
|
+
The message content sent by the assistant (can be a string or an array of content parts)
|
|
15
|
+
"""
|
|
13
16
|
|
|
14
17
|
if IS_PYDANTIC_V2:
|
|
15
18
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -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 .
|
|
4
|
+
from .components_schemas_text_content import ComponentsSchemasTextContent
|
|
5
5
|
|
|
6
|
-
UpdateAssistantMessageContent = typing.Union[
|
|
6
|
+
UpdateAssistantMessageContent = typing.Union[typing.List[ComponentsSchemasTextContent], str]
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
-
from .update_reasoning_message_reasoning import UpdateReasoningMessageReasoning
|
|
5
4
|
import typing
|
|
6
5
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
6
|
import pydantic
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
class UpdateReasoningMessage(UncheckedBaseModel):
|
|
11
|
-
reasoning:
|
|
12
|
-
message_type: typing.Literal["reasoning_message"] =
|
|
10
|
+
reasoning: str
|
|
11
|
+
message_type: typing.Optional[typing.Literal["reasoning_message"]] = None
|
|
13
12
|
|
|
14
13
|
if IS_PYDANTIC_V2:
|
|
15
14
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
-
from .update_system_message_content import UpdateSystemMessageContent
|
|
5
4
|
import typing
|
|
6
|
-
from
|
|
5
|
+
from .update_system_message_content import UpdateSystemMessageContent
|
|
7
6
|
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class UpdateSystemMessage(UncheckedBaseModel):
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
message_type: typing.Optional[typing.Literal["system_message"]] = None
|
|
12
|
+
content: UpdateSystemMessageContent = pydantic.Field()
|
|
13
|
+
"""
|
|
14
|
+
The message content sent by the system (can be a string or an array of content parts)
|
|
15
|
+
"""
|
|
13
16
|
|
|
14
17
|
if IS_PYDANTIC_V2:
|
|
15
18
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -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 .
|
|
4
|
+
from .components_schemas_text_content import ComponentsSchemasTextContent
|
|
5
5
|
|
|
6
|
-
UpdateSystemMessageContent = typing.Union[
|
|
6
|
+
UpdateSystemMessageContent = typing.Union[typing.List[ComponentsSchemasTextContent], str]
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
-
from .update_user_message_content import UpdateUserMessageContent
|
|
5
4
|
import typing
|
|
6
|
-
from
|
|
5
|
+
from .update_user_message_content import UpdateUserMessageContent
|
|
7
6
|
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class UpdateUserMessage(UncheckedBaseModel):
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
message_type: typing.Optional[typing.Literal["user_message"]] = None
|
|
12
|
+
content: UpdateUserMessageContent = pydantic.Field()
|
|
13
|
+
"""
|
|
14
|
+
The message content sent by the user (can be a string or an array of content parts)
|
|
15
|
+
"""
|
|
13
16
|
|
|
14
17
|
if IS_PYDANTIC_V2:
|
|
15
18
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -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 .
|
|
4
|
+
from .components_schemas_text_content import ComponentsSchemasTextContent
|
|
5
5
|
|
|
6
|
-
UpdateUserMessageContent = typing.Union[
|
|
6
|
+
UpdateUserMessageContent = typing.Union[typing.List[ComponentsSchemasTextContent], str]
|
|
@@ -4,24 +4,27 @@ from ..core.unchecked_base_model import UncheckedBaseModel
|
|
|
4
4
|
import datetime as dt
|
|
5
5
|
import typing
|
|
6
6
|
from .user_message_content import UserMessageContent
|
|
7
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
7
|
import pydantic
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class UserMessage(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
A message sent by the user. Never streamed back on a response, only used for cursor pagination.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
content (Union[str, List[MessageContentUnion]]): The message content sent by the user (can be a string or an array of content parts)
|
|
15
|
+
Args:
|
|
17
16
|
id (str): The ID of the message
|
|
18
17
|
date (datetime): The date the message was created in ISO format
|
|
18
|
+
content (Union[str, List[LettaMessageContentUnion]]): The message content sent by the user (can be a string or an array of content parts)
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
id: str
|
|
22
22
|
date: dt.datetime
|
|
23
23
|
message_type: typing.Literal["user_message"] = "user_message"
|
|
24
|
-
content: UserMessageContent
|
|
24
|
+
content: UserMessageContent = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
The message content sent by the user (can be a string or an array of content parts)
|
|
27
|
+
"""
|
|
25
28
|
|
|
26
29
|
if IS_PYDANTIC_V2:
|
|
27
30
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -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 .
|
|
4
|
+
from .components_schemas_text_content import ComponentsSchemasTextContent
|
|
5
5
|
|
|
6
|
-
UserMessageContent = typing.Union[
|
|
6
|
+
UserMessageContent = typing.Union[typing.List[ComponentsSchemasTextContent], str]
|