letta-client 0.1.4__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.
- letta/__init__.py +44 -21
- letta/agents/__init__.py +71 -24
- letta/agents/archival_memory/client.py +17 -17
- letta/agents/client.py +424 -1700
- 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/__init__.py +36 -2
- letta/agents/messages/client.py +278 -17
- letta/agents/messages/types/__init__.py +37 -3
- letta/agents/messages/types/letta_streaming_response.py +139 -16
- letta/agents/messages/types/messages_list_response_item.py +121 -9
- 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/templates/types/templates_migrate_response.py +19 -0
- letta/agents/tools/client.py +13 -13
- letta/agents/types/__init__.py +23 -29
- letta/agents/types/agents_search_request_combinator.py +5 -0
- letta/agents/types/agents_search_request_search_item.py +64 -0
- letta/agents/types/{agents_search_deployed_agents_request_search_item_zero.py → agents_search_request_search_item_name.py} +5 -4
- 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_migrate_response.py → agents_search_request_search_item_version.py} +3 -3
- letta/blocks/client.py +25 -25
- letta/client.py +8 -4
- letta/core/__init__.py +4 -0
- letta/core/client_wrapper.py +7 -18
- 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 +22 -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 +63 -0
- letta/types/agent_state.py +19 -16
- 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 +3 -4
- 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 +11 -16
- 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 +7 -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 +10 -10
- 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 +7 -12
- letta/types/letta_request.py +7 -2
- letta/types/letta_response.py +6 -5
- letta/types/letta_response_messages_item.py +125 -0
- letta/types/letta_schemas_letta_message_tool_call.py +2 -2
- letta/types/letta_schemas_message_message.py +12 -17
- 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 +14 -13
- letta/types/letta_usage_statistics.py +6 -7
- letta/types/llm_config.py +9 -9
- 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 +10 -15
- letta/types/provider.py +38 -0
- letta/types/reasoning_message.py +6 -7
- 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 -6
- letta/types/source.py +8 -13
- letta/types/system_message_input.py +2 -2
- letta/types/system_message_output.py +6 -7
- 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 +6 -7
- 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 +10 -11
- letta/types/tool_type.py +5 -0
- letta/types/usage_statistics.py +2 -2
- letta/types/user.py +5 -10
- letta/types/user_create.py +2 -7
- letta/types/user_message_input.py +2 -2
- letta/types/user_message_output.py +6 -7
- letta/types/user_update.py +2 -7
- letta/types/validation_error.py +2 -2
- {letta_client-0.1.4.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.py +0 -16
- letta/agents/types/agents_search_deployed_agents_request_search_item_direction.py +0 -27
- letta/agents/types/agents_search_deployed_agents_request_search_item_direction_direction.py +0 -5
- letta/agents/types/agents_search_deployed_agents_request_search_item_direction_value.py +0 -7
- letta/agents/types/agents_search_deployed_agents_request_search_item_operator.py +0 -24
- letta/agents/types/agents_search_deployed_agents_request_search_item_operator_operator.py +0 -7
- letta_client-0.1.4.dist-info/RECORD +0 -191
- /letta/agents/{memory/messages → core_memory}/__init__.py +0 -0
- /letta/{agents/memory_blocks → providers}/__init__.py +0 -0
- {letta_client-0.1.4.dist-info → letta_client-0.1.9.dist-info}/WHEEL +0 -0
letta/types/llm_config.py
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
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
|
|
|
14
14
|
Attributes:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
model (str): The name of the LLM model.
|
|
16
|
+
model_endpoint_type (str): The endpoint type for the model.
|
|
17
|
+
model_endpoint (str): The endpoint for the model.
|
|
18
|
+
model_wrapper (str): The wrapper for the model. This is used to wrap additional text around the input/output of the model. This is useful for text-to-text completions, such as the Completions API in OpenAI.
|
|
19
|
+
context_window (int): The context window size for the model.
|
|
20
|
+
put_inner_thoughts_in_kwargs (bool): Puts `inner_thoughts` as a kwarg in the function call if this is set to True. This helps with function calling performance and also the generation of inner thoughts.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
model: str = pydantic.Field()
|
|
24
24
|
"""
|
|
25
|
-
LLM model name.
|
|
25
|
+
LLM model name.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
model_endpoint_type: LlmConfigModelEndpointType = pydantic.Field()
|
|
@@ -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,19 +10,19 @@ 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
|
|
|
17
17
|
Parameters:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
text (str): The text of the passage.
|
|
19
|
+
embedding (List[float]): The embedding of the passage.
|
|
20
|
+
embedding_config (EmbeddingConfig): The embedding configuration used by the passage.
|
|
21
|
+
created_at (datetime): The creation date of the passage.
|
|
22
|
+
user_id (str): The unique identifier of the user associated with the passage.
|
|
23
|
+
agent_id (str): The unique identifier of the agent associated with the passage.
|
|
24
|
+
source_id (str): The data source of the passage.
|
|
25
|
+
file_id (str): The unique identifier of the file associated with the passage.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
created_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
@@ -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,25 +1,24 @@
|
|
|
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
|
-
import typing
|
|
6
5
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
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
|
|
|
14
14
|
Attributes:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
reasoning (str): The internal reasoning of the agent
|
|
16
|
+
id (str): The ID of the message
|
|
17
|
+
date (datetime): The date the message was created in ISO format
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
id: str
|
|
21
21
|
date: dt.datetime
|
|
22
|
-
message_type: typing.Literal["reasoning_message"] = "reasoning_message"
|
|
23
22
|
reasoning: str
|
|
24
23
|
|
|
25
24
|
if IS_PYDANTIC_V2:
|
|
@@ -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:
|
letta/types/sandbox_config.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
|
|
@@ -8,7 +8,7 @@ from .sandbox_type import SandboxType
|
|
|
8
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class SandboxConfig(
|
|
11
|
+
class SandboxConfig(UncheckedBaseModel):
|
|
12
12
|
created_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
13
13
|
"""
|
|
14
14
|
The id of the user that made this object.
|
|
@@ -39,11 +39,6 @@ class SandboxConfig(UniversalBaseModel):
|
|
|
39
39
|
The type of sandbox.
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
|
-
organization_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
43
|
-
"""
|
|
44
|
-
The unique identifier of the organization associated with the sandbox.
|
|
45
|
-
"""
|
|
46
|
-
|
|
47
42
|
config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
48
43
|
"""
|
|
49
44
|
The JSON sandbox settings data.
|
|
@@ -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 .sandbox_config_create_config import SandboxConfigCreateConfig
|
|
5
5
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
import typing
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class SandboxConfigCreate(
|
|
10
|
+
class SandboxConfigCreate(UncheckedBaseModel):
|
|
11
11
|
config: SandboxConfigCreateConfig = pydantic.Field()
|
|
12
12
|
"""
|
|
13
13
|
The configuration for the sandbox.
|
|
@@ -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 .sandbox_config_update_config import SandboxConfigUpdateConfig
|
|
6
6
|
import pydantic
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class SandboxConfigUpdate(
|
|
10
|
+
class SandboxConfigUpdate(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
Pydantic model for updating SandboxConfig fields.
|
|
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
|
import pydantic
|
|
6
6
|
import datetime as dt
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class SandboxEnvironmentVariable(
|
|
10
|
+
class SandboxEnvironmentVariable(UncheckedBaseModel):
|
|
11
11
|
created_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
12
12
|
"""
|
|
13
13
|
The id of the user that made this object.
|
|
@@ -53,11 +53,6 @@ class SandboxEnvironmentVariable(UniversalBaseModel):
|
|
|
53
53
|
The ID of the sandbox config this environment variable belongs to.
|
|
54
54
|
"""
|
|
55
55
|
|
|
56
|
-
organization_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
57
|
-
"""
|
|
58
|
-
The ID of the organization this environment variable belongs to.
|
|
59
|
-
"""
|
|
60
|
-
|
|
61
56
|
if IS_PYDANTIC_V2:
|
|
62
57
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
63
58
|
else:
|
|
@@ -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 SandboxEnvironmentVariableCreate(
|
|
9
|
+
class SandboxEnvironmentVariableCreate(UncheckedBaseModel):
|
|
10
10
|
key: str = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
The name of the environment variable.
|
|
@@ -1,16 +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 SandboxEnvironmentVariableUpdate(
|
|
10
|
-
"""
|
|
11
|
-
Pydantic model for updating SandboxEnvironmentVariable fields.
|
|
12
|
-
"""
|
|
13
|
-
|
|
9
|
+
class SandboxEnvironmentVariableUpdate(UncheckedBaseModel):
|
|
14
10
|
key: typing.Optional[str] = pydantic.Field(default=None)
|
|
15
11
|
"""
|
|
16
12
|
The name of the environment variable.
|
letta/types/source.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
|
from .embedding_config import EmbeddingConfig
|
|
@@ -10,17 +10,17 @@ import datetime as dt
|
|
|
10
10
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class Source(
|
|
13
|
+
class Source(UncheckedBaseModel):
|
|
14
14
|
"""
|
|
15
15
|
Representation of a source, which is a collection of files and passages.
|
|
16
16
|
|
|
17
17
|
Parameters:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
id (str): The ID of the source
|
|
19
|
+
name (str): The name of the source.
|
|
20
|
+
embedding_config (EmbeddingConfig): The embedding configuration used by the source.
|
|
21
|
+
user_id (str): The ID of the user that created the source.
|
|
22
|
+
metadata_ (dict): Metadata associated with the source.
|
|
23
|
+
description (str): The description of the source.
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
26
|
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
@@ -43,11 +43,6 @@ class Source(UniversalBaseModel):
|
|
|
43
43
|
The embedding configuration used by the source.
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
|
-
organization_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
47
|
-
"""
|
|
48
|
-
The ID of the organization that created the source.
|
|
49
|
-
"""
|
|
50
|
-
|
|
51
46
|
metadata: typing_extensions.Annotated[
|
|
52
47
|
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="metadata_")
|
|
53
48
|
] = pydantic.Field(default=None)
|
|
@@ -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 SystemMessageInput(
|
|
9
|
+
class SystemMessageInput(UncheckedBaseModel):
|
|
10
10
|
content: str
|
|
11
11
|
role: typing.Optional[str] = None
|
|
12
12
|
name: typing.Optional[str] = None
|
|
@@ -1,25 +1,24 @@
|
|
|
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
|
-
import typing
|
|
6
5
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import typing
|
|
7
7
|
import pydantic
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class SystemMessageOutput(
|
|
10
|
+
class SystemMessageOutput(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
A message generated by the system. Never streamed back on a response, only used for cursor pagination.
|
|
13
13
|
|
|
14
14
|
Attributes:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
message (str): The message sent by the system
|
|
16
|
+
id (str): The ID of the message
|
|
17
|
+
date (datetime): The date the message was created in ISO format
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
id: str
|
|
21
21
|
date: dt.datetime
|
|
22
|
-
message_type: typing.Literal["system_message"] = "system_message"
|
|
23
22
|
message: str
|
|
24
23
|
|
|
25
24
|
if IS_PYDANTIC_V2:
|
|
@@ -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_rule_type import ToolRuleType
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class TerminalToolRule(
|
|
10
|
+
class TerminalToolRule(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
Represents a terminal tool rule configuration where if this tool gets called, it must end the agent loop.
|
|
13
13
|
"""
|
letta/types/tool_call_delta.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 ToolCallDelta(
|
|
9
|
+
class ToolCallDelta(UncheckedBaseModel):
|
|
10
10
|
name: typing.Optional[str] = None
|
|
11
11
|
arguments: typing.Optional[str] = None
|
|
12
12
|
tool_call_id: typing.Optional[str] = None
|
|
@@ -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 ToolCallFunctionOutput(
|
|
9
|
+
class ToolCallFunctionOutput(UncheckedBaseModel):
|
|
10
10
|
name: str = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
The name of the function to call
|
letta/types/tool_call_message.py
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
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
|
-
import typing
|
|
6
5
|
from .tool_call_message_tool_call import ToolCallMessageToolCall
|
|
7
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import typing
|
|
8
8
|
import pydantic
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class ToolCallMessage(
|
|
11
|
+
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
15
|
Attributes:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
tool_call (Union[ToolCall, ToolCallDelta]): The tool call
|
|
17
|
+
id (str): The ID of the message
|
|
18
|
+
date (datetime): The date the message was created in ISO format
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
id: str
|
|
22
22
|
date: dt.datetime
|
|
23
|
-
message_type: typing.Literal["tool_call_message"] = "tool_call_message"
|
|
24
23
|
tool_call: ToolCallMessageToolCall
|
|
25
24
|
|
|
26
25
|
if IS_PYDANTIC_V2:
|