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
|
@@ -0,0 +1,63 @@
|
|
|
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 AgentEnvironmentVariable(UncheckedBaseModel):
|
|
11
|
+
created_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
The id of the user that made this object.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
last_updated_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
The id of the user that made this object.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
The timestamp when the object was created.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
The timestamp when the object was last updated.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
The human-friendly ID of the Agent-env
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
key: str = pydantic.Field()
|
|
37
|
+
"""
|
|
38
|
+
The name of the environment variable.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
value: str = pydantic.Field()
|
|
42
|
+
"""
|
|
43
|
+
The value of the environment variable.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
47
|
+
"""
|
|
48
|
+
An optional description of the environment variable.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
agent_id: str = pydantic.Field()
|
|
52
|
+
"""
|
|
53
|
+
The ID of the agent this environment variable belongs to.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
if IS_PYDANTIC_V2:
|
|
57
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
58
|
+
else:
|
|
59
|
+
|
|
60
|
+
class Config:
|
|
61
|
+
frozen = True
|
|
62
|
+
smart_union = True
|
|
63
|
+
extra = pydantic.Extra.allow
|
letta/types/agent_state.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
|
|
@@ -13,23 +13,24 @@ from ..core.serialization import FieldMetadata
|
|
|
13
13
|
from .memory import Memory
|
|
14
14
|
from .letta_schemas_tool_tool import LettaSchemasToolTool
|
|
15
15
|
from .source import Source
|
|
16
|
+
from .agent_environment_variable import AgentEnvironmentVariable
|
|
16
17
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
class AgentState(
|
|
20
|
+
class AgentState(UncheckedBaseModel):
|
|
20
21
|
"""
|
|
21
22
|
Representation of an agent's state. This is the state of the agent at a given time, and is persisted in the DB backend. The state has all the information needed to recreate a persisted agent.
|
|
22
23
|
|
|
23
24
|
Parameters:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
id (str): The unique identifier of the agent.
|
|
26
|
+
name (str): The name of the agent (must be unique to the user).
|
|
27
|
+
created_at (datetime): The datetime the agent was created.
|
|
28
|
+
message_ids (List[str]): The ids of the messages in the agent's in-context memory.
|
|
29
|
+
memory (Memory): The in-context memory of the agent.
|
|
30
|
+
tools (List[str]): The tools used by the agent. This includes any memory editing functions specified in `memory`.
|
|
31
|
+
system (str): The system prompt used by the agent.
|
|
32
|
+
llm_config (LLMConfig): The LLM configuration used by the agent.
|
|
33
|
+
embedding_config (EmbeddingConfig): The embedding configuration used by the agent.
|
|
33
34
|
"""
|
|
34
35
|
|
|
35
36
|
created_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
@@ -92,11 +93,6 @@ class AgentState(UniversalBaseModel):
|
|
|
92
93
|
The embedding configuration used by the agent.
|
|
93
94
|
"""
|
|
94
95
|
|
|
95
|
-
organization_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
96
|
-
"""
|
|
97
|
-
The unique identifier of the organization associated with the agent.
|
|
98
|
-
"""
|
|
99
|
-
|
|
100
96
|
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
101
97
|
"""
|
|
102
98
|
The description of the agent.
|
|
@@ -129,6 +125,13 @@ class AgentState(UniversalBaseModel):
|
|
|
129
125
|
The tags associated with the agent.
|
|
130
126
|
"""
|
|
131
127
|
|
|
128
|
+
tool_exec_environment_variables: typing.Optional[typing.List[AgentEnvironmentVariable]] = pydantic.Field(
|
|
129
|
+
default=None
|
|
130
|
+
)
|
|
131
|
+
"""
|
|
132
|
+
The environment variables for tool execution specific to this agent.
|
|
133
|
+
"""
|
|
134
|
+
|
|
132
135
|
if IS_PYDANTIC_V2:
|
|
133
136
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
134
137
|
else:
|
letta/types/agent_type.py
CHANGED
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
5
|
AgentType = typing.Union[
|
|
6
|
-
typing.Literal["memgpt_agent", "split_thread_agent", "
|
|
7
|
-
typing.Any,
|
|
6
|
+
typing.Literal["memgpt_agent", "split_thread_agent", "offline_memory_agent", "chat_only_agent"], typing.Any
|
|
8
7
|
]
|
letta/types/app_auth_scheme.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
|
from .app_auth_scheme_auth_mode import AppAuthSchemeAuthMode
|
|
5
5
|
import typing
|
|
6
6
|
from .auth_scheme_field import AuthSchemeField
|
|
@@ -8,7 +8,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
8
8
|
import pydantic
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class AppAuthScheme(
|
|
11
|
+
class AppAuthScheme(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
App authenticatio scheme.
|
|
14
14
|
"""
|
letta/types/app_model.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_extensions
|
|
5
5
|
from ..core.serialization import FieldMetadata
|
|
6
6
|
import typing
|
|
@@ -9,7 +9,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
9
9
|
import pydantic
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class AppModel(
|
|
12
|
+
class AppModel(UncheckedBaseModel):
|
|
13
13
|
"""
|
|
14
14
|
App data model.
|
|
15
15
|
"""
|
|
@@ -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 ArchivalMemorySummary(
|
|
9
|
+
class ArchivalMemorySummary(UncheckedBaseModel):
|
|
10
10
|
size: int = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
Number of rows in archival memory
|
letta/types/assistant_file.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 AssistantFile(
|
|
9
|
+
class AssistantFile(UncheckedBaseModel):
|
|
10
10
|
id: str = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
The unique identifier of the file.
|
|
@@ -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 .letta_schemas_openai_chat_completion_request_tool_call import LettaSchemasOpenaiChatCompletionRequestToolCall
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
import pydantic
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class AssistantMessageInput(
|
|
10
|
+
class AssistantMessageInput(UncheckedBaseModel):
|
|
11
11
|
content: typing.Optional[str] = None
|
|
12
12
|
role: typing.Optional[str] = None
|
|
13
13
|
name: typing.Optional[str] = None
|
|
@@ -1,16 +1,15 @@
|
|
|
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 AssistantMessageOutput(
|
|
10
|
+
class AssistantMessageOutput(UncheckedBaseModel):
|
|
11
11
|
id: str
|
|
12
12
|
date: dt.datetime
|
|
13
|
-
message_type: typing.Literal["assistant_message"] = "assistant_message"
|
|
14
13
|
assistant_message: str
|
|
15
14
|
|
|
16
15
|
if IS_PYDANTIC_V2:
|
letta/types/auth_request.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
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class AuthRequest(
|
|
9
|
+
class AuthRequest(UncheckedBaseModel):
|
|
10
10
|
password: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
11
|
"""
|
|
12
12
|
Admin password provided when starting the Letta server
|
letta/types/auth_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_extensions
|
|
5
5
|
from ..core.serialization import FieldMetadata
|
|
6
6
|
import pydantic
|
|
@@ -8,7 +8,7 @@ import typing
|
|
|
8
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class AuthResponse(
|
|
11
|
+
class AuthResponse(UncheckedBaseModel):
|
|
12
12
|
uuid_: typing_extensions.Annotated[str, FieldMetadata(alias="uuid")] = pydantic.Field()
|
|
13
13
|
"""
|
|
14
14
|
UUID of the user
|
letta/types/auth_scheme_field.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 AuthSchemeField(
|
|
9
|
+
class AuthSchemeField(UncheckedBaseModel):
|
|
10
10
|
"""
|
|
11
11
|
Auth scheme field.
|
|
12
12
|
"""
|
letta/types/block.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 pydantic
|
|
5
5
|
import typing
|
|
6
6
|
import typing_extensions
|
|
@@ -8,20 +8,20 @@ from ..core.serialization import FieldMetadata
|
|
|
8
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class Block(
|
|
11
|
+
class Block(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
A Block represents a reserved section of the LLM's context window which is editable. `Block` objects contained in the `Memory` object, which is able to edit the Block values.
|
|
14
14
|
|
|
15
15
|
Parameters:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
label (str): The label of the block (e.g. 'human', 'persona'). This defines a category for the block.
|
|
17
|
+
value (str): The value of the block. This is the string that is represented in the context window.
|
|
18
|
+
limit (int): The character limit of the block.
|
|
19
|
+
is_template (bool): Whether the block is a template (e.g. saved human/persona options). Non-template blocks are not stored in the database and are ephemeral, while templated blocks are stored in the database.
|
|
20
|
+
label (str): The label of the block (e.g. 'human', 'persona'). This defines a category for the block.
|
|
21
|
+
template_name (str): The name of the block template (if it is a template).
|
|
22
|
+
description (str): Description of the block.
|
|
23
|
+
metadata_ (Dict): Metadata of the block.
|
|
24
|
+
user_id (str): The unique identifier of the user associated with the block.
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
value: str = pydantic.Field()
|
|
@@ -66,11 +66,6 @@ class Block(UniversalBaseModel):
|
|
|
66
66
|
The human-friendly ID of the Block
|
|
67
67
|
"""
|
|
68
68
|
|
|
69
|
-
organization_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
70
|
-
"""
|
|
71
|
-
The unique identifier of the organization associated with the block.
|
|
72
|
-
"""
|
|
73
|
-
|
|
74
69
|
created_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
75
70
|
"""
|
|
76
71
|
The id of the user that made this Block.
|
letta/types/block_update.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 typing_extensions
|
|
@@ -8,7 +8,7 @@ from ..core.serialization import FieldMetadata
|
|
|
8
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class BlockUpdate(
|
|
11
|
+
class BlockUpdate(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
Update a block
|
|
14
14
|
"""
|
|
@@ -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 .chat_completion_request_messages_item import ChatCompletionRequestMessagesItem
|
|
6
6
|
from .response_format import ResponseFormat
|
|
@@ -13,7 +13,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
13
13
|
import pydantic
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class ChatCompletionRequest(
|
|
16
|
+
class ChatCompletionRequest(UncheckedBaseModel):
|
|
17
17
|
"""
|
|
18
18
|
https://platform.openai.com/docs/api-reference/chat/create
|
|
19
19
|
"""
|
|
@@ -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 .choice import Choice
|
|
6
6
|
import datetime as dt
|
|
@@ -9,7 +9,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
9
9
|
import pydantic
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class ChatCompletionResponse(
|
|
12
|
+
class ChatCompletionResponse(UncheckedBaseModel):
|
|
13
13
|
"""
|
|
14
14
|
https://platform.openai.com/docs/api-reference/chat/object
|
|
15
15
|
"""
|
letta/types/child_tool_rule.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
|
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 ChildToolRule(
|
|
10
|
+
class ChildToolRule(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
A ToolRule represents a tool that can be invoked by the agent.
|
|
13
13
|
"""
|
letta/types/choice.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
|
from .letta_schemas_openai_chat_completion_response_message import LettaSchemasOpenaiChatCompletionResponseMessage
|
|
5
5
|
import typing
|
|
6
6
|
from .message_content_log_prob import MessageContentLogProb
|
|
@@ -8,7 +8,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
8
8
|
import pydantic
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class Choice(
|
|
11
|
+
class Choice(UncheckedBaseModel):
|
|
12
12
|
finish_reason: str
|
|
13
13
|
index: int
|
|
14
14
|
message: LettaSchemasOpenaiChatCompletionResponseMessage
|
|
@@ -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 ConditionalToolRule(
|
|
10
|
+
class ConditionalToolRule(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
A ToolRule that conditionally maps to different child tools based on the output.
|
|
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 ConflictErrorBody(
|
|
9
|
+
class ConflictErrorBody(UncheckedBaseModel):
|
|
10
10
|
message: typing.Literal[
|
|
11
11
|
"You can only migrate agents to a new versioned agent template that belongs to the same project"
|
|
12
12
|
] = "You can only migrate agents to a new versioned agent template that belongs to the same project"
|
|
@@ -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 pydantic
|
|
5
5
|
import typing
|
|
6
6
|
from .letta_schemas_openai_chat_completion_request_tool import LettaSchemasOpenaiChatCompletionRequestTool
|
|
@@ -8,7 +8,7 @@ from .letta_schemas_message_message import LettaSchemasMessageMessage
|
|
|
8
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class ContextWindowOverview(
|
|
11
|
+
class ContextWindowOverview(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
Overview of the context window, including the number of messages and tokens.
|
|
14
14
|
"""
|
|
@@ -43,6 +43,11 @@ class ContextWindowOverview(UniversalBaseModel):
|
|
|
43
43
|
The number of tokens in the external memory summary (archival + recall metadata).
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
|
+
external_memory_summary: str = pydantic.Field()
|
|
47
|
+
"""
|
|
48
|
+
The metadata summary of the external memory sources (archival + recall metadata).
|
|
49
|
+
"""
|
|
50
|
+
|
|
46
51
|
num_tokens_system: int = pydantic.Field()
|
|
47
52
|
"""
|
|
48
53
|
The number of tokens in the system prompt.
|
|
@@ -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 CreateAssistantFileRequest(
|
|
9
|
+
class CreateAssistantFileRequest(UncheckedBaseModel):
|
|
10
10
|
file_id: str = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
The unique identifier of the file.
|
|
@@ -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 CreateAssistantRequest(
|
|
9
|
+
class CreateAssistantRequest(UncheckedBaseModel):
|
|
10
10
|
model: str = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
The model to use for the assistant.
|
letta/types/create_block.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 pydantic
|
|
5
5
|
import typing
|
|
6
6
|
import typing_extensions
|
|
@@ -8,7 +8,7 @@ from ..core.serialization import FieldMetadata
|
|
|
8
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class CreateBlock(
|
|
11
|
+
class CreateBlock(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
Create a block
|
|
14
14
|
"""
|
|
@@ -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 DeleteAssistantFileResponse(
|
|
9
|
+
class DeleteAssistantFileResponse(UncheckedBaseModel):
|
|
10
10
|
id: str = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
The unique identifier of the file.
|
|
@@ -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 DeleteAssistantResponse(
|
|
9
|
+
class DeleteAssistantResponse(UncheckedBaseModel):
|
|
10
10
|
id: str = pydantic.Field()
|
|
11
11
|
"""
|
|
12
12
|
The unique identifier of the agent.
|
|
@@ -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 E2BSandboxConfig(
|
|
9
|
+
class E2BSandboxConfig(UncheckedBaseModel):
|
|
10
10
|
timeout: typing.Optional[int] = pydantic.Field(default=None)
|
|
11
11
|
"""
|
|
12
12
|
Time limit for the sandbox (in seconds).
|
letta/types/embedding_config.py
CHANGED
|
@@ -1,25 +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
|
from .embedding_config_embedding_endpoint_type import EmbeddingConfigEmbeddingEndpointType
|
|
5
5
|
import pydantic
|
|
6
6
|
import typing
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class EmbeddingConfig(
|
|
10
|
+
class EmbeddingConfig(UncheckedBaseModel):
|
|
11
11
|
"""
|
|
12
12
|
Embedding model configuration. This object specifies all the information necessary to access an embedding model to usage with Letta, except for secret keys.
|
|
13
13
|
|
|
14
14
|
Attributes:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
embedding_endpoint_type (str): The endpoint type for the model.
|
|
16
|
+
embedding_endpoint (str): The endpoint for the model.
|
|
17
|
+
embedding_model (str): The model for the embedding.
|
|
18
|
+
embedding_dim (int): The dimension of the embedding.
|
|
19
|
+
embedding_chunk_size (int): The chunk size of the embedding.
|
|
20
|
+
azure_endpoint (:obj:`str`, optional): The Azure endpoint for the model (Azure only).
|
|
21
|
+
azure_version (str): The Azure version for the model (Azure only).
|
|
22
|
+
azure_deployment (str): The Azure deployment for the model (Azure only).
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
embedding_endpoint_type: EmbeddingConfigEmbeddingEndpointType = pydantic.Field()
|