letta-client 0.1.6__py3-none-any.whl → 0.1.9__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/__init__.py +28 -27
- letta/agents/__init__.py +40 -29
- letta/agents/archival_memory/client.py +17 -17
- letta/agents/client.py +405 -1721
- letta/agents/context/client.py +5 -5
- letta/agents/core_memory/client.py +1080 -0
- letta/agents/memory_variables/__init__.py +5 -0
- letta/agents/{memory → memory_variables}/client.py +41 -40
- letta/agents/memory_variables/types/__init__.py +5 -0
- letta/agents/{types/agents_get_agent_variables_response.py → memory_variables/types/memory_variables_get_response.py} +3 -3
- letta/agents/messages/client.py +232 -17
- letta/agents/messages/types/letta_streaming_response.py +21 -16
- letta/agents/messages/types/messages_list_response_item.py +19 -14
- letta/agents/recall_memory/client.py +5 -5
- letta/agents/sources/client.py +5 -5
- letta/agents/templates/__init__.py +5 -0
- letta/agents/templates/client.py +578 -0
- letta/agents/templates/types/__init__.py +5 -0
- letta/agents/{types/agents_migrate_response.py → templates/types/templates_migrate_response.py} +3 -3
- letta/agents/tools/client.py +13 -13
- letta/agents/types/__init__.py +23 -37
- letta/agents/types/agents_search_request_combinator.py +5 -0
- letta/agents/types/{agents_search_deployed_agents_request_search_item.py → agents_search_request_search_item.py} +17 -20
- letta/agents/types/{agents_search_deployed_agents_request_search_item_name.py → agents_search_request_search_item_name.py} +4 -6
- letta/agents/types/agents_search_request_search_item_name_operator.py +5 -0
- letta/agents/types/agents_search_request_search_item_order_by.py +22 -0
- letta/agents/types/agents_search_request_search_item_order_by_direction.py +5 -0
- letta/agents/types/agents_search_request_search_item_order_by_value.py +5 -0
- letta/agents/types/{agents_search_deployed_agents_request_search_item_version.py → agents_search_request_search_item_version.py} +2 -2
- letta/blocks/client.py +25 -25
- letta/client.py +4 -0
- letta/core/__init__.py +4 -0
- letta/core/client_wrapper.py +1 -1
- letta/core/unchecked_base_model.py +305 -0
- letta/health/client.py +3 -3
- letta/jobs/client.py +17 -17
- letta/models/client.py +5 -5
- letta/providers/client.py +597 -0
- letta/sources/client.py +33 -33
- letta/sources/files/client.py +11 -11
- letta/sources/passages/client.py +5 -5
- letta/tools/client.py +77 -57
- letta/types/__init__.py +4 -0
- letta/types/action_model.py +2 -2
- letta/types/action_parameters_model.py +2 -2
- letta/types/action_response_model.py +2 -2
- letta/types/agent_environment_variable.py +2 -7
- letta/types/agent_state.py +5 -8
- letta/types/agent_type.py +1 -2
- letta/types/app_auth_scheme.py +2 -2
- letta/types/app_model.py +2 -2
- letta/types/archival_memory_summary.py +2 -2
- letta/types/assistant_file.py +2 -2
- letta/types/assistant_message_input.py +2 -2
- letta/types/assistant_message_output.py +2 -2
- letta/types/auth_request.py +2 -2
- letta/types/auth_response.py +2 -2
- letta/types/auth_scheme_field.py +2 -2
- letta/types/block.py +2 -7
- letta/types/block_update.py +2 -2
- letta/types/chat_completion_request.py +2 -2
- letta/types/chat_completion_response.py +2 -2
- letta/types/child_tool_rule.py +2 -2
- letta/types/choice.py +2 -2
- letta/types/conditional_tool_rule.py +2 -2
- letta/types/conflict_error_body.py +2 -2
- letta/types/context_window_overview.py +2 -2
- letta/types/create_assistant_file_request.py +2 -2
- letta/types/create_assistant_request.py +2 -2
- letta/types/create_block.py +2 -2
- letta/types/delete_assistant_file_response.py +2 -2
- letta/types/delete_assistant_response.py +2 -2
- letta/types/e_2_b_sandbox_config.py +2 -2
- letta/types/embedding_config.py +2 -2
- letta/types/file_metadata.py +2 -7
- letta/types/function_call_input.py +2 -2
- letta/types/function_call_output.py +2 -2
- letta/types/function_schema.py +2 -2
- letta/types/health.py +2 -2
- letta/types/http_validation_error.py +2 -2
- letta/types/init_tool_rule.py +2 -2
- letta/types/internal_server_error_body.py +2 -2
- letta/types/job.py +2 -7
- letta/types/letta_request.py +7 -2
- letta/types/letta_response.py +2 -2
- letta/types/letta_response_messages_item.py +19 -14
- letta/types/letta_schemas_letta_message_tool_call.py +2 -2
- letta/types/letta_schemas_message_message.py +2 -7
- letta/types/letta_schemas_openai_chat_completion_request_tool.py +2 -2
- letta/types/letta_schemas_openai_chat_completion_request_tool_call.py +2 -2
- letta/types/letta_schemas_openai_chat_completion_request_tool_call_function.py +2 -2
- letta/types/letta_schemas_openai_chat_completion_response_message.py +2 -2
- letta/types/letta_schemas_openai_chat_completion_response_tool_call.py +2 -2
- letta/types/letta_schemas_openai_chat_completions_tool_call_function.py +2 -2
- letta/types/letta_schemas_openai_chat_completions_tool_call_input.py +2 -2
- letta/types/letta_schemas_openai_chat_completions_tool_call_output.py +2 -2
- letta/types/letta_schemas_tool_tool.py +9 -8
- letta/types/letta_usage_statistics.py +2 -2
- letta/types/llm_config.py +2 -2
- letta/types/local_sandbox_config.py +2 -2
- letta/types/log_prob_token.py +2 -2
- letta/types/memory.py +2 -2
- letta/types/message_content_log_prob.py +2 -2
- letta/types/message_create.py +2 -2
- letta/types/not_found_error_body.py +2 -2
- letta/types/open_ai_assistant.py +2 -2
- letta/types/organization.py +2 -2
- letta/types/organization_create.py +2 -2
- letta/types/passage.py +2 -7
- letta/types/provider.py +38 -0
- letta/types/reasoning_message.py +2 -2
- letta/types/recall_memory_summary.py +2 -2
- letta/types/response_format.py +2 -2
- letta/types/sandbox_config.py +2 -7
- letta/types/sandbox_config_create.py +2 -2
- letta/types/sandbox_config_update.py +2 -2
- letta/types/sandbox_environment_variable.py +2 -7
- letta/types/sandbox_environment_variable_create.py +2 -2
- letta/types/sandbox_environment_variable_update.py +2 -2
- letta/types/source.py +2 -7
- letta/types/system_message_input.py +2 -2
- letta/types/system_message_output.py +2 -2
- letta/types/terminal_tool_rule.py +2 -2
- letta/types/tool_call_delta.py +2 -2
- letta/types/tool_call_function_output.py +2 -2
- letta/types/tool_call_message.py +2 -2
- letta/types/tool_create.py +2 -2
- letta/types/tool_function_choice.py +2 -2
- letta/types/tool_input.py +2 -2
- letta/types/tool_message.py +2 -2
- letta/types/tool_return_message.py +2 -2
- letta/types/tool_type.py +5 -0
- letta/types/usage_statistics.py +2 -2
- letta/types/user.py +2 -7
- letta/types/user_create.py +2 -7
- letta/types/user_message_input.py +2 -2
- letta/types/user_message_output.py +2 -2
- letta/types/user_update.py +2 -7
- letta/types/validation_error.py +2 -2
- {letta_client-0.1.6.dist-info → letta_client-0.1.9.dist-info}/METADATA +1 -1
- letta_client-0.1.9.dist-info/RECORD +200 -0
- letta/agents/memory/__init__.py +0 -5
- letta/agents/memory/messages/client.py +0 -147
- letta/agents/memory_blocks/client.py +0 -364
- letta/agents/types/agents_search_deployed_agents_request_combinator.py +0 -5
- letta/agents/types/agents_search_deployed_agents_request_search_item_name_operator.py +0 -7
- letta/agents/types/agents_search_deployed_agents_request_search_item_order_by.py +0 -26
- letta/agents/types/agents_search_deployed_agents_request_search_item_order_by_direction.py +0 -5
- letta/agents/types/agents_search_deployed_agents_request_search_item_order_by_value.py +0 -7
- letta_client-0.1.6.dist-info/RECORD +0 -193
- /letta/agents/{memory/messages → core_memory}/__init__.py +0 -0
- /letta/{agents/memory_blocks → providers}/__init__.py +0 -0
- {letta_client-0.1.6.dist-info → letta_client-0.1.9.dist-info}/WHEEL +0 -0
letta/types/letta_request.py
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from .message_create import MessageCreate
|
|
6
6
|
import pydantic
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class LettaRequest(
|
|
10
|
+
class LettaRequest(UncheckedBaseModel):
|
|
11
11
|
messages: typing.List[MessageCreate] = pydantic.Field()
|
|
12
12
|
"""
|
|
13
13
|
The messages to be sent to the agent.
|
|
14
14
|
"""
|
|
15
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
|
+
|
|
16
21
|
assistant_message_tool_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
22
|
"""
|
|
18
23
|
The name of the designated message tool.
|
letta/types/letta_response.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from .letta_response_messages_item import LettaResponseMessagesItem
|
|
6
6
|
import pydantic
|
|
@@ -8,7 +8,7 @@ from .letta_usage_statistics import LettaUsageStatistics
|
|
|
8
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class LettaResponse(
|
|
11
|
+
class LettaResponse(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
Response object from an agent interaction, consisting of the new messages generated by the agent and usage statistics.
|
|
14
14
|
The type of the returned messages can be either `Message` or `LettaMessage`, depending on what was specified in the request.
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from ..core.
|
|
4
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
5
5
|
import typing
|
|
6
6
|
import datetime as dt
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
import pydantic
|
|
9
9
|
from .tool_call_message_tool_call import ToolCallMessageToolCall
|
|
10
10
|
from .tool_return_message_status import ToolReturnMessageStatus
|
|
11
|
+
import typing_extensions
|
|
12
|
+
from ..core.unchecked_base_model import UnionMetadata
|
|
11
13
|
|
|
12
14
|
|
|
13
|
-
class LettaResponseMessagesItem_SystemMessage(
|
|
15
|
+
class LettaResponseMessagesItem_SystemMessage(UncheckedBaseModel):
|
|
14
16
|
message_type: typing.Literal["system_message"] = "system_message"
|
|
15
17
|
id: str
|
|
16
18
|
date: dt.datetime
|
|
@@ -26,7 +28,7 @@ class LettaResponseMessagesItem_SystemMessage(UniversalBaseModel):
|
|
|
26
28
|
extra = pydantic.Extra.allow
|
|
27
29
|
|
|
28
30
|
|
|
29
|
-
class LettaResponseMessagesItem_UserMessage(
|
|
31
|
+
class LettaResponseMessagesItem_UserMessage(UncheckedBaseModel):
|
|
30
32
|
message_type: typing.Literal["user_message"] = "user_message"
|
|
31
33
|
id: str
|
|
32
34
|
date: dt.datetime
|
|
@@ -42,7 +44,7 @@ class LettaResponseMessagesItem_UserMessage(UniversalBaseModel):
|
|
|
42
44
|
extra = pydantic.Extra.allow
|
|
43
45
|
|
|
44
46
|
|
|
45
|
-
class LettaResponseMessagesItem_ReasoningMessage(
|
|
47
|
+
class LettaResponseMessagesItem_ReasoningMessage(UncheckedBaseModel):
|
|
46
48
|
message_type: typing.Literal["reasoning_message"] = "reasoning_message"
|
|
47
49
|
id: str
|
|
48
50
|
date: dt.datetime
|
|
@@ -58,7 +60,7 @@ class LettaResponseMessagesItem_ReasoningMessage(UniversalBaseModel):
|
|
|
58
60
|
extra = pydantic.Extra.allow
|
|
59
61
|
|
|
60
62
|
|
|
61
|
-
class LettaResponseMessagesItem_ToolCallMessage(
|
|
63
|
+
class LettaResponseMessagesItem_ToolCallMessage(UncheckedBaseModel):
|
|
62
64
|
message_type: typing.Literal["tool_call_message"] = "tool_call_message"
|
|
63
65
|
id: str
|
|
64
66
|
date: dt.datetime
|
|
@@ -74,7 +76,7 @@ class LettaResponseMessagesItem_ToolCallMessage(UniversalBaseModel):
|
|
|
74
76
|
extra = pydantic.Extra.allow
|
|
75
77
|
|
|
76
78
|
|
|
77
|
-
class LettaResponseMessagesItem_ToolReturnMessage(
|
|
79
|
+
class LettaResponseMessagesItem_ToolReturnMessage(UncheckedBaseModel):
|
|
78
80
|
message_type: typing.Literal["tool_return_message"] = "tool_return_message"
|
|
79
81
|
id: str
|
|
80
82
|
date: dt.datetime
|
|
@@ -94,7 +96,7 @@ class LettaResponseMessagesItem_ToolReturnMessage(UniversalBaseModel):
|
|
|
94
96
|
extra = pydantic.Extra.allow
|
|
95
97
|
|
|
96
98
|
|
|
97
|
-
class LettaResponseMessagesItem_AssistantMessage(
|
|
99
|
+
class LettaResponseMessagesItem_AssistantMessage(UncheckedBaseModel):
|
|
98
100
|
message_type: typing.Literal["assistant_message"] = "assistant_message"
|
|
99
101
|
id: str
|
|
100
102
|
date: dt.datetime
|
|
@@ -110,11 +112,14 @@ class LettaResponseMessagesItem_AssistantMessage(UniversalBaseModel):
|
|
|
110
112
|
extra = pydantic.Extra.allow
|
|
111
113
|
|
|
112
114
|
|
|
113
|
-
LettaResponseMessagesItem =
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
LettaResponseMessagesItem = typing_extensions.Annotated[
|
|
116
|
+
typing.Union[
|
|
117
|
+
LettaResponseMessagesItem_SystemMessage,
|
|
118
|
+
LettaResponseMessagesItem_UserMessage,
|
|
119
|
+
LettaResponseMessagesItem_ReasoningMessage,
|
|
120
|
+
LettaResponseMessagesItem_ToolCallMessage,
|
|
121
|
+
LettaResponseMessagesItem_ToolReturnMessage,
|
|
122
|
+
LettaResponseMessagesItem_AssistantMessage,
|
|
123
|
+
],
|
|
124
|
+
UnionMetadata(discriminant="message_type"),
|
|
120
125
|
]
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
5
|
import typing
|
|
6
6
|
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class LettaSchemasLettaMessageToolCall(
|
|
9
|
+
class LettaSchemasLettaMessageToolCall(UncheckedBaseModel):
|
|
10
10
|
name: str
|
|
11
11
|
arguments: str
|
|
12
12
|
tool_call_id: str
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
import pydantic
|
|
6
6
|
import datetime as dt
|
|
@@ -9,7 +9,7 @@ from .letta_schemas_openai_chat_completions_tool_call_output import LettaSchemas
|
|
|
9
9
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class LettaSchemasMessageMessage(
|
|
12
|
+
class LettaSchemasMessageMessage(UncheckedBaseModel):
|
|
13
13
|
"""
|
|
14
14
|
Letta's internal representation of a message. Includes methods to convert to/from LLM provider formats.
|
|
15
15
|
|
|
@@ -61,11 +61,6 @@ class LettaSchemasMessageMessage(UniversalBaseModel):
|
|
|
61
61
|
The text of the message.
|
|
62
62
|
"""
|
|
63
63
|
|
|
64
|
-
organization_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
65
|
-
"""
|
|
66
|
-
The unique identifier of the organization.
|
|
67
|
-
"""
|
|
68
|
-
|
|
69
64
|
agent_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
70
65
|
"""
|
|
71
66
|
The unique identifier of the agent.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from .function_schema import FunctionSchema
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
import pydantic
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class LettaSchemasOpenaiChatCompletionRequestTool(
|
|
10
|
+
class LettaSchemasOpenaiChatCompletionRequestTool(UncheckedBaseModel):
|
|
11
11
|
type: typing.Optional[typing.Literal["function"]] = None
|
|
12
12
|
function: FunctionSchema
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from .letta_schemas_openai_chat_completion_request_tool_call_function import (
|
|
6
6
|
LettaSchemasOpenaiChatCompletionRequestToolCallFunction,
|
|
@@ -9,7 +9,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
9
9
|
import pydantic
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class LettaSchemasOpenaiChatCompletionRequestToolCall(
|
|
12
|
+
class LettaSchemasOpenaiChatCompletionRequestToolCall(UncheckedBaseModel):
|
|
13
13
|
id: str
|
|
14
14
|
type: typing.Optional[typing.Literal["function"]] = None
|
|
15
15
|
function: LettaSchemasOpenaiChatCompletionRequestToolCallFunction
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
5
|
import typing
|
|
6
6
|
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class LettaSchemasOpenaiChatCompletionRequestToolCallFunction(
|
|
9
|
+
class LettaSchemasOpenaiChatCompletionRequestToolCallFunction(UncheckedBaseModel):
|
|
10
10
|
name: str
|
|
11
11
|
arguments: str
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from .letta_schemas_openai_chat_completion_response_tool_call import LettaSchemasOpenaiChatCompletionResponseToolCall
|
|
6
6
|
from .function_call_output import FunctionCallOutput
|
|
@@ -8,7 +8,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
8
8
|
import pydantic
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class LettaSchemasOpenaiChatCompletionResponseMessage(
|
|
11
|
+
class LettaSchemasOpenaiChatCompletionResponseMessage(UncheckedBaseModel):
|
|
12
12
|
content: typing.Optional[str] = None
|
|
13
13
|
tool_calls: typing.Optional[typing.List[LettaSchemasOpenaiChatCompletionResponseToolCall]] = None
|
|
14
14
|
role: str
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from .function_call_output import FunctionCallOutput
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
import pydantic
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class LettaSchemasOpenaiChatCompletionResponseToolCall(
|
|
10
|
+
class LettaSchemasOpenaiChatCompletionResponseToolCall(UncheckedBaseModel):
|
|
11
11
|
id: str
|
|
12
12
|
type: typing.Optional[typing.Literal["function"]] = None
|
|
13
13
|
function: FunctionCallOutput
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import pydantic
|
|
5
5
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
6
|
import typing
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class LettaSchemasOpenaiChatCompletionsToolCallFunction(
|
|
9
|
+
class LettaSchemasOpenaiChatCompletionsToolCallFunction(UncheckedBaseModel):
|
|
10
10
|
name: str = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
The name of the function to call
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import pydantic
|
|
5
5
|
import typing
|
|
6
6
|
from .letta_schemas_openai_chat_completions_tool_call_function import LettaSchemasOpenaiChatCompletionsToolCallFunction
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class LettaSchemasOpenaiChatCompletionsToolCallInput(
|
|
10
|
+
class LettaSchemasOpenaiChatCompletionsToolCallInput(UncheckedBaseModel):
|
|
11
11
|
id: str = pydantic.Field()
|
|
12
12
|
"""
|
|
13
13
|
The ID of the tool call
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import pydantic
|
|
5
5
|
import typing
|
|
6
6
|
from .tool_call_function_output import ToolCallFunctionOutput
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class LettaSchemasOpenaiChatCompletionsToolCallOutput(
|
|
10
|
+
class LettaSchemasOpenaiChatCompletionsToolCallOutput(UncheckedBaseModel):
|
|
11
11
|
id: str = pydantic.Field()
|
|
12
12
|
"""
|
|
13
13
|
The ID of the tool call
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
import pydantic
|
|
6
|
+
from .tool_type import ToolType
|
|
6
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
class LettaSchemasToolTool(
|
|
10
|
+
class LettaSchemasToolTool(UncheckedBaseModel):
|
|
10
11
|
"""
|
|
11
12
|
Representation of a tool, which is a function that can be called by the agent.
|
|
12
13
|
|
|
@@ -23,6 +24,11 @@ class LettaSchemasToolTool(UniversalBaseModel):
|
|
|
23
24
|
The human-friendly ID of the Tool
|
|
24
25
|
"""
|
|
25
26
|
|
|
27
|
+
tool_type: typing.Optional[ToolType] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
The type of the tool.
|
|
30
|
+
"""
|
|
31
|
+
|
|
26
32
|
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
33
|
"""
|
|
28
34
|
The description of the tool.
|
|
@@ -38,11 +44,6 @@ class LettaSchemasToolTool(UniversalBaseModel):
|
|
|
38
44
|
The module of the function.
|
|
39
45
|
"""
|
|
40
46
|
|
|
41
|
-
organization_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
42
|
-
"""
|
|
43
|
-
The unique identifier of the organization associated with the tool.
|
|
44
|
-
"""
|
|
45
|
-
|
|
46
47
|
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
47
48
|
"""
|
|
48
49
|
The name of the function.
|
|
@@ -53,7 +54,7 @@ class LettaSchemasToolTool(UniversalBaseModel):
|
|
|
53
54
|
Metadata tags.
|
|
54
55
|
"""
|
|
55
56
|
|
|
56
|
-
source_code: str = pydantic.Field()
|
|
57
|
+
source_code: typing.Optional[str] = pydantic.Field(default=None)
|
|
57
58
|
"""
|
|
58
59
|
The source code of the function.
|
|
59
60
|
"""
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class LettaUsageStatistics(
|
|
9
|
+
class LettaUsageStatistics(UncheckedBaseModel):
|
|
10
10
|
"""
|
|
11
11
|
Usage statistics for the agent interaction.
|
|
12
12
|
|
letta/types/llm_config.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import pydantic
|
|
5
5
|
from .llm_config_model_endpoint_type import LlmConfigModelEndpointType
|
|
6
6
|
import typing
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class LlmConfig(
|
|
10
|
+
class LlmConfig(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
Configuration for a Language Model (LLM) model. This object specifies all the information necessary to access an LLM model to usage with Letta, except for secret keys.
|
|
13
13
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import pydantic
|
|
5
5
|
import typing
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class LocalSandboxConfig(
|
|
9
|
+
class LocalSandboxConfig(UncheckedBaseModel):
|
|
10
10
|
sandbox_dir: str = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
Directory for the sandbox environment.
|
letta/types/log_prob_token.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
6
|
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class LogProbToken(
|
|
9
|
+
class LogProbToken(UncheckedBaseModel):
|
|
10
10
|
token: str
|
|
11
11
|
logprob: float
|
|
12
12
|
bytes: typing.Optional[typing.List[int]] = None
|
letta/types/memory.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from .block import Block
|
|
6
6
|
import pydantic
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class Memory(
|
|
10
|
+
class Memory(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
Represents the in-context memory (i.e. Core memory) of the agent. This includes both the `Block` objects (labelled by sections), as well as tools to edit the blocks.
|
|
13
13
|
"""
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from .log_prob_token import LogProbToken
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
import pydantic
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class MessageContentLogProb(
|
|
10
|
+
class MessageContentLogProb(UncheckedBaseModel):
|
|
11
11
|
token: str
|
|
12
12
|
logprob: float
|
|
13
13
|
bytes: typing.Optional[typing.List[int]] = None
|
letta/types/message_create.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
from .message_create_role import MessageCreateRole
|
|
5
5
|
import pydantic
|
|
6
6
|
import typing
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class MessageCreate(
|
|
10
|
+
class MessageCreate(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
Request to create a message
|
|
13
13
|
"""
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
6
|
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class NotFoundErrorBody(
|
|
9
|
+
class NotFoundErrorBody(UncheckedBaseModel):
|
|
10
10
|
message: typing.Literal["Agent not found"] = "Agent not found"
|
|
11
11
|
|
|
12
12
|
if IS_PYDANTIC_V2:
|
letta/types/open_ai_assistant.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import pydantic
|
|
5
5
|
import typing
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class OpenAiAssistant(
|
|
9
|
+
class OpenAiAssistant(UncheckedBaseModel):
|
|
10
10
|
"""
|
|
11
11
|
Represents an OpenAI assistant (equivalent to Letta preset)
|
|
12
12
|
"""
|
letta/types/organization.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
import pydantic
|
|
6
6
|
import datetime as dt
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class Organization(
|
|
10
|
+
class Organization(UncheckedBaseModel):
|
|
11
11
|
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
12
12
|
"""
|
|
13
13
|
The human-friendly ID of the Org
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class OrganizationCreate(
|
|
9
|
+
class OrganizationCreate(UncheckedBaseModel):
|
|
10
10
|
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
11
|
"""
|
|
12
12
|
The name of the organization.
|
letta/types/passage.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
import pydantic
|
|
6
6
|
import datetime as dt
|
|
@@ -10,7 +10,7 @@ from .embedding_config import EmbeddingConfig
|
|
|
10
10
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class Passage(
|
|
13
|
+
class Passage(UncheckedBaseModel):
|
|
14
14
|
"""
|
|
15
15
|
Representation of a passage, which is stored in archival memory.
|
|
16
16
|
|
|
@@ -50,11 +50,6 @@ class Passage(UniversalBaseModel):
|
|
|
50
50
|
Whether this passage is deleted or not.
|
|
51
51
|
"""
|
|
52
52
|
|
|
53
|
-
organization_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
54
|
-
"""
|
|
55
|
-
The unique identifier of the user associated with the passage.
|
|
56
|
-
"""
|
|
57
|
-
|
|
58
53
|
agent_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
59
54
|
"""
|
|
60
55
|
The unique identifier of the agent associated with the passage.
|
letta/types/provider.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
import datetime as dt
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Provider(UncheckedBaseModel):
|
|
11
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
The id of the provider, lazily created by the database manager.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
name: str = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
The name of the provider
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
api_key: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
API key used for requests to the provider.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
The last update timestamp of the provider.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
if IS_PYDANTIC_V2:
|
|
32
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
33
|
+
else:
|
|
34
|
+
|
|
35
|
+
class Config:
|
|
36
|
+
frozen = True
|
|
37
|
+
smart_union = True
|
|
38
|
+
extra = pydantic.Extra.allow
|
letta/types/reasoning_message.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import datetime as dt
|
|
5
5
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
6
|
import typing
|
|
7
7
|
import pydantic
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class ReasoningMessage(
|
|
10
|
+
class ReasoningMessage(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
Representation of an agent's internal reasoning.
|
|
13
13
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import pydantic
|
|
5
5
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
6
|
import typing
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class RecallMemorySummary(
|
|
9
|
+
class RecallMemorySummary(UncheckedBaseModel):
|
|
10
10
|
size: int = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
Number of rows in recall memory
|
letta/types/response_format.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ..core.
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
6
|
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class ResponseFormat(
|
|
9
|
+
class ResponseFormat(UncheckedBaseModel):
|
|
10
10
|
type: typing.Optional[str] = None
|
|
11
11
|
|
|
12
12
|
if IS_PYDANTIC_V2:
|