letta-client 1.0.0a1__py3-none-any.whl → 1.0.0a3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- letta_client/__init__.py +149 -23
- letta_client/agents/__init__.py +15 -17
- letta_client/agents/blocks/__init__.py +3 -0
- letta_client/agents/blocks/client.py +77 -4
- letta_client/agents/blocks/raw_client.py +63 -2
- letta_client/agents/blocks/types/__init__.py +7 -0
- letta_client/agents/blocks/types/blocks_list_request_order.py +5 -0
- letta_client/agents/client.py +46 -13
- letta_client/agents/files/__init__.py +3 -0
- letta_client/agents/files/client.py +71 -10
- letta_client/agents/files/raw_client.py +51 -10
- letta_client/agents/files/types/__init__.py +7 -0
- letta_client/{types/tool_return_status.py → agents/files/types/files_list_request_order.py} +1 -1
- letta_client/agents/folders/__init__.py +3 -0
- letta_client/agents/folders/client.py +77 -4
- letta_client/agents/folders/raw_client.py +63 -2
- letta_client/agents/folders/types/__init__.py +7 -0
- letta_client/agents/folders/types/folders_list_request_order.py +5 -0
- letta_client/agents/groups/__init__.py +3 -0
- letta_client/agents/groups/client.py +71 -2
- letta_client/agents/groups/raw_client.py +51 -0
- letta_client/agents/groups/types/__init__.py +7 -0
- letta_client/agents/groups/types/groups_list_request_order.py +5 -0
- letta_client/agents/messages/__init__.py +2 -0
- letta_client/agents/messages/client.py +55 -14
- letta_client/agents/messages/raw_client.py +35 -14
- letta_client/agents/messages/types/__init__.py +2 -0
- letta_client/agents/messages/types/messages_list_request_order.py +5 -0
- letta_client/agents/passages/client.py +29 -0
- letta_client/agents/raw_client.py +4 -4
- letta_client/agents/sources/__init__.py +3 -0
- letta_client/agents/sources/client.py +77 -4
- letta_client/agents/sources/raw_client.py +63 -2
- letta_client/agents/sources/types/__init__.py +7 -0
- letta_client/agents/sources/types/sources_list_request_order.py +5 -0
- letta_client/agents/tools/__init__.py +3 -0
- letta_client/agents/tools/client.py +77 -4
- letta_client/agents/tools/raw_client.py +63 -2
- letta_client/agents/tools/types/__init__.py +7 -0
- letta_client/agents/tools/types/tools_list_request_order.py +5 -0
- letta_client/archives/client.py +16 -2
- letta_client/base_client.py +3 -0
- letta_client/batches/client.py +12 -2
- letta_client/batches/messages/client.py +10 -0
- letta_client/blocks/agents/client.py +8 -0
- letta_client/blocks/client.py +32 -2
- letta_client/chat/__init__.py +7 -0
- letta_client/chat/client.py +255 -0
- letta_client/chat/raw_client.py +269 -0
- letta_client/chat/types/__init__.py +8 -0
- letta_client/chat/types/chat_completion_request_messages_item.py +19 -0
- letta_client/chat/types/chat_completion_request_stop.py +5 -0
- letta_client/client_side_access_tokens/client.py +10 -2
- letta_client/core/client_wrapper.py +2 -2
- letta_client/errors/__init__.py +2 -0
- letta_client/errors/gone_error.py +10 -0
- letta_client/folders/agents/client.py +8 -0
- letta_client/folders/client.py +20 -4
- letta_client/folders/files/client.py +14 -0
- letta_client/folders/passages/client.py +8 -0
- letta_client/groups/client.py +16 -2
- letta_client/groups/messages/client.py +14 -0
- letta_client/identities/agents/client.py +8 -0
- letta_client/identities/blocks/client.py +8 -0
- letta_client/identities/client.py +20 -2
- letta_client/jobs/__init__.py +3 -0
- letta_client/jobs/client.py +61 -12
- letta_client/jobs/raw_client.py +29 -8
- letta_client/jobs/types/__init__.py +7 -0
- letta_client/jobs/types/jobs_list_request_order.py +5 -0
- letta_client/models/client.py +8 -2
- letta_client/projects/client.py +10 -2
- letta_client/providers/client.py +90 -2
- letta_client/providers/raw_client.py +102 -0
- letta_client/runs/__init__.py +11 -2
- letta_client/runs/client.py +150 -18
- letta_client/runs/messages/client.py +30 -2
- letta_client/runs/messages/raw_client.py +10 -0
- letta_client/runs/raw_client.py +144 -14
- letta_client/runs/steps/__init__.py +3 -0
- letta_client/runs/steps/client.py +39 -30
- letta_client/runs/steps/raw_client.py +19 -28
- letta_client/runs/steps/types/__init__.py +7 -0
- letta_client/runs/steps/types/steps_list_request_order.py +5 -0
- letta_client/runs/types/__init__.py +2 -1
- letta_client/runs/types/runs_list_request_order.py +5 -0
- letta_client/sources/client.py +8 -2
- letta_client/sources/files/client.py +12 -0
- letta_client/sources/passages/client.py +6 -0
- letta_client/steps/client.py +26 -2
- letta_client/steps/messages/client.py +8 -0
- letta_client/tags/client.py +16 -2
- letta_client/templates/__init__.py +12 -0
- letta_client/templates/client.py +30 -4
- letta_client/templates/raw_client.py +2 -2
- letta_client/templates/types/__init__.py +24 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config.py +4 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_display_name.py +14 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_display_name_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_secrets_item.py +4 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_secrets_item_value_enc.py +14 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_secrets_item_value_enc_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item.py +6 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_value_enc.py +16 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_value_enc_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_tool_type.py +1 -1
- letta_client/tools/client.py +30 -220
- letta_client/tools/raw_client.py +0 -292
- letta_client/types/__init__.py +130 -22
- letta_client/types/agent_environment_variable.py +5 -0
- letta_client/types/{action_parameters_model.py → annotation.py} +4 -10
- letta_client/types/{action_response_model.py → annotation_url_citation.py} +4 -9
- letta_client/types/approval_create.py +8 -2
- letta_client/types/approval_create_approvals_item.py +8 -0
- letta_client/types/approval_response_message.py +8 -2
- letta_client/types/approval_response_message_approvals_item.py +8 -0
- letta_client/types/approval_return.py +34 -0
- letta_client/{agents/templates/types/templates_migrate_response.py → types/audio.py} +4 -4
- letta_client/types/chat_completion.py +30 -0
- letta_client/types/chat_completion_assistant_message_param.py +30 -0
- letta_client/types/chat_completion_assistant_message_param_content.py +9 -0
- letta_client/types/chat_completion_assistant_message_param_content_item.py +10 -0
- letta_client/types/chat_completion_assistant_message_param_tool_calls_item.py +10 -0
- letta_client/types/chat_completion_audio.py +23 -0
- letta_client/types/chat_completion_content_part_image_param.py +22 -0
- letta_client/types/chat_completion_content_part_input_audio_param.py +22 -0
- letta_client/types/chat_completion_content_part_refusal_param.py +21 -0
- letta_client/types/chat_completion_content_part_text_param.py +21 -0
- letta_client/types/chat_completion_developer_message_param.py +23 -0
- letta_client/types/chat_completion_developer_message_param_content.py +7 -0
- letta_client/types/chat_completion_function_message_param.py +22 -0
- letta_client/types/chat_completion_message.py +30 -0
- letta_client/types/chat_completion_message_custom_tool_call.py +23 -0
- letta_client/types/chat_completion_message_custom_tool_call_param.py +23 -0
- letta_client/types/chat_completion_message_function_tool_call_input.py +25 -0
- letta_client/types/{chat_completion_message_function_tool_call.py → chat_completion_message_function_tool_call_output.py} +3 -3
- letta_client/types/chat_completion_message_function_tool_call_param.py +25 -0
- letta_client/types/chat_completion_message_tool_calls_item.py +10 -0
- letta_client/types/chat_completion_service_tier.py +5 -0
- letta_client/types/chat_completion_system_message_param.py +23 -0
- letta_client/types/chat_completion_system_message_param_content.py +7 -0
- letta_client/types/chat_completion_token_logprob.py +24 -0
- letta_client/types/chat_completion_tool_message_param.py +23 -0
- letta_client/types/chat_completion_tool_message_param_content.py +7 -0
- letta_client/types/chat_completion_user_message_param.py +23 -0
- letta_client/types/chat_completion_user_message_param_content.py +7 -0
- letta_client/types/chat_completion_user_message_param_content_item.py +15 -0
- letta_client/types/choice.py +26 -0
- letta_client/types/choice_finish_reason.py +7 -0
- letta_client/types/choice_logprobs.py +22 -0
- letta_client/types/completion_tokens_details.py +23 -0
- letta_client/types/{auth_scheme_field.py → completion_usage.py} +8 -13
- letta_client/types/custom_input.py +21 -0
- letta_client/types/custom_output.py +21 -0
- letta_client/types/file.py +22 -0
- letta_client/types/file_file.py +22 -0
- letta_client/types/function_call_input.py +21 -0
- letta_client/types/function_call_output.py +21 -0
- letta_client/types/{function.py → function_output.py} +1 -1
- letta_client/types/image_url.py +22 -0
- letta_client/types/image_url_detail.py +5 -0
- letta_client/types/input_audio.py +22 -0
- letta_client/types/input_audio_format.py +5 -0
- letta_client/types/internal_template_agent_create.py +2 -2
- letta_client/types/letta_schemas_agent_file_agent_schema.py +2 -2
- letta_client/types/letta_schemas_agent_file_message_schema.py +27 -4
- letta_client/types/letta_schemas_agent_file_message_schema_approvals_item.py +8 -0
- letta_client/types/letta_schemas_letta_message_tool_return.py +26 -0
- letta_client/types/letta_schemas_letta_message_tool_return_status.py +5 -0
- letta_client/types/{tool_return.py → letta_schemas_message_tool_return.py} +9 -3
- letta_client/types/letta_schemas_message_tool_return_status.py +5 -0
- letta_client/types/llm_config.py +5 -0
- letta_client/types/message.py +10 -4
- letta_client/types/message_approvals_item.py +8 -0
- letta_client/types/omitted_reasoning_content.py +4 -0
- letta_client/types/openai_types_chat_chat_completion_message_function_tool_call_function.py +21 -0
- letta_client/types/openai_types_chat_chat_completion_message_function_tool_call_param_function.py +21 -0
- letta_client/types/prompt_tokens_details.py +21 -0
- letta_client/types/provider.py +10 -0
- letta_client/types/run_metrics.py +58 -0
- letta_client/types/sandbox_environment_variable.py +5 -0
- letta_client/types/text_content.py +5 -0
- letta_client/types/tool_call_content.py +5 -0
- letta_client/types/tool_call_message.py +2 -0
- letta_client/types/tool_call_message_tool_calls.py +8 -0
- letta_client/types/tool_return_message.py +8 -5
- letta_client/types/tool_type.py +1 -1
- letta_client/types/top_logprob.py +22 -0
- letta_client/voice/client.py +14 -0
- letta_client/voice/raw_client.py +37 -0
- letta_client-1.0.0a3.dist-info/METADATA +422 -0
- {letta_client-1.0.0a1.dist-info → letta_client-1.0.0a3.dist-info}/RECORD +193 -115
- letta_client/agents/templates/__init__.py +0 -7
- letta_client/agents/templates/client.py +0 -307
- letta_client/agents/templates/raw_client.py +0 -275
- letta_client/agents/templates/types/__init__.py +0 -7
- letta_client/types/action_model.py +0 -39
- letta_client/types/app_auth_scheme.py +0 -35
- letta_client/types/app_auth_scheme_auth_mode.py +0 -19
- letta_client/types/app_model.py +0 -45
- letta_client-1.0.0a1.dist-info/METADATA +0 -211
- {letta_client-1.0.0a1.dist-info → letta_client-1.0.0a3.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FileFile(UncheckedBaseModel):
|
|
11
|
+
file_data: typing.Optional[str] = None
|
|
12
|
+
file_id: typing.Optional[str] = None
|
|
13
|
+
filename: typing.Optional[str] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionCallInput(UncheckedBaseModel):
|
|
11
|
+
arguments: str
|
|
12
|
+
name: str
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionCallOutput(UncheckedBaseModel):
|
|
11
|
+
arguments: str
|
|
12
|
+
name: str
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .image_url_detail import ImageUrlDetail
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ImageUrl(UncheckedBaseModel):
|
|
12
|
+
url: str
|
|
13
|
+
detail: typing.Optional[ImageUrlDetail] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .input_audio_format import InputAudioFormat
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InputAudio(UncheckedBaseModel):
|
|
12
|
+
data: str
|
|
13
|
+
format: InputAudioFormat
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -156,12 +156,12 @@ class InternalTemplateAgentCreate(UncheckedBaseModel):
|
|
|
156
156
|
|
|
157
157
|
from_template: typing.Optional[str] = pydantic.Field(default=None)
|
|
158
158
|
"""
|
|
159
|
-
|
|
159
|
+
Deprecated: please use the 'create agents from a template' endpoint instead.
|
|
160
160
|
"""
|
|
161
161
|
|
|
162
162
|
template: typing.Optional[bool] = pydantic.Field(default=None)
|
|
163
163
|
"""
|
|
164
|
-
|
|
164
|
+
Deprecated: No longer used
|
|
165
165
|
"""
|
|
166
166
|
|
|
167
167
|
project: typing.Optional[str] = pydantic.Field(default=None)
|
|
@@ -160,12 +160,12 @@ class LettaSchemasAgentFileAgentSchema(UncheckedBaseModel):
|
|
|
160
160
|
|
|
161
161
|
from_template: typing.Optional[str] = pydantic.Field(default=None)
|
|
162
162
|
"""
|
|
163
|
-
|
|
163
|
+
Deprecated: please use the 'create agents from a template' endpoint instead.
|
|
164
164
|
"""
|
|
165
165
|
|
|
166
166
|
template: typing.Optional[bool] = pydantic.Field(default=None)
|
|
167
167
|
"""
|
|
168
|
-
|
|
168
|
+
Deprecated: No longer used
|
|
169
169
|
"""
|
|
170
170
|
|
|
171
171
|
project: typing.Optional[str] = pydantic.Field(default=None)
|
|
@@ -6,10 +6,11 @@ import typing
|
|
|
6
6
|
import pydantic
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
9
|
-
from .
|
|
9
|
+
from .chat_completion_message_function_tool_call_input import ChatCompletionMessageFunctionToolCallInput
|
|
10
|
+
from .letta_schemas_agent_file_message_schema_approvals_item import LettaSchemasAgentFileMessageSchemaApprovalsItem
|
|
10
11
|
from .letta_schemas_agent_file_message_schema_content import LettaSchemasAgentFileMessageSchemaContent
|
|
12
|
+
from .letta_schemas_message_tool_return import LettaSchemasMessageToolReturn
|
|
11
13
|
from .message_role import MessageRole
|
|
12
|
-
from .tool_return import ToolReturn
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
class LettaSchemasAgentFileMessageSchema(UncheckedBaseModel):
|
|
@@ -72,7 +73,7 @@ class LettaSchemasAgentFileMessageSchema(UncheckedBaseModel):
|
|
|
72
73
|
The unique identifier of the agent
|
|
73
74
|
"""
|
|
74
75
|
|
|
75
|
-
tool_calls: typing.Optional[typing.List[
|
|
76
|
+
tool_calls: typing.Optional[typing.List[ChatCompletionMessageFunctionToolCallInput]] = pydantic.Field(default=None)
|
|
76
77
|
"""
|
|
77
78
|
The list of tool calls requested. Only applicable for role assistant.
|
|
78
79
|
"""
|
|
@@ -82,7 +83,7 @@ class LettaSchemasAgentFileMessageSchema(UncheckedBaseModel):
|
|
|
82
83
|
The ID of the tool call. Only applicable for role tool.
|
|
83
84
|
"""
|
|
84
85
|
|
|
85
|
-
tool_returns: typing.Optional[typing.List[
|
|
86
|
+
tool_returns: typing.Optional[typing.List[LettaSchemasMessageToolReturn]] = pydantic.Field(default=None)
|
|
86
87
|
"""
|
|
87
88
|
Tool execution return information for prior tool calls
|
|
88
89
|
"""
|
|
@@ -92,6 +93,28 @@ class LettaSchemasAgentFileMessageSchema(UncheckedBaseModel):
|
|
|
92
93
|
The timestamp when the object was created.
|
|
93
94
|
"""
|
|
94
95
|
|
|
96
|
+
approve: typing.Optional[bool] = pydantic.Field(default=None)
|
|
97
|
+
"""
|
|
98
|
+
Whether the tool has been approved
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
approval_request_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
102
|
+
"""
|
|
103
|
+
The message ID of the approval request
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
denial_reason: typing.Optional[str] = pydantic.Field(default=None)
|
|
107
|
+
"""
|
|
108
|
+
An optional explanation for the provided approval status
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
approvals: typing.Optional[typing.List[LettaSchemasAgentFileMessageSchemaApprovalsItem]] = pydantic.Field(
|
|
112
|
+
default=None
|
|
113
|
+
)
|
|
114
|
+
"""
|
|
115
|
+
Approval returns for the message
|
|
116
|
+
"""
|
|
117
|
+
|
|
95
118
|
if IS_PYDANTIC_V2:
|
|
96
119
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
97
120
|
else:
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .approval_return import ApprovalReturn
|
|
6
|
+
from .letta_schemas_message_tool_return import LettaSchemasMessageToolReturn
|
|
7
|
+
|
|
8
|
+
LettaSchemasAgentFileMessageSchemaApprovalsItem = typing.Union[ApprovalReturn, LettaSchemasMessageToolReturn]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .letta_schemas_letta_message_tool_return_status import LettaSchemasLettaMessageToolReturnStatus
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class LettaSchemasLettaMessageToolReturn(UncheckedBaseModel):
|
|
12
|
+
type: typing.Literal["tool"] = "tool"
|
|
13
|
+
tool_return: str
|
|
14
|
+
status: LettaSchemasLettaMessageToolReturnStatus
|
|
15
|
+
tool_call_id: str
|
|
16
|
+
stdout: typing.Optional[typing.List[str]] = None
|
|
17
|
+
stderr: typing.Optional[typing.List[str]] = None
|
|
18
|
+
|
|
19
|
+
if IS_PYDANTIC_V2:
|
|
20
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
21
|
+
else:
|
|
22
|
+
|
|
23
|
+
class Config:
|
|
24
|
+
frozen = True
|
|
25
|
+
smart_union = True
|
|
26
|
+
extra = pydantic.Extra.allow
|
|
@@ -5,11 +5,12 @@ import typing
|
|
|
5
5
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
-
from .
|
|
8
|
+
from .letta_schemas_message_tool_return_status import LettaSchemasMessageToolReturnStatus
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
12
|
-
|
|
11
|
+
class LettaSchemasMessageToolReturn(UncheckedBaseModel):
|
|
12
|
+
tool_call_id: typing.Optional[typing.Optional[typing.Any]] = None
|
|
13
|
+
status: LettaSchemasMessageToolReturnStatus = pydantic.Field()
|
|
13
14
|
"""
|
|
14
15
|
The status of the tool call
|
|
15
16
|
"""
|
|
@@ -24,6 +25,11 @@ class ToolReturn(UncheckedBaseModel):
|
|
|
24
25
|
Captured stderr from the tool invocation
|
|
25
26
|
"""
|
|
26
27
|
|
|
28
|
+
func_response: typing.Optional[str] = pydantic.Field(default=None)
|
|
29
|
+
"""
|
|
30
|
+
The function response string
|
|
31
|
+
"""
|
|
32
|
+
|
|
27
33
|
if IS_PYDANTIC_V2:
|
|
28
34
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
29
35
|
else:
|
letta_client/types/llm_config.py
CHANGED
|
@@ -22,6 +22,11 @@ class LlmConfig(UncheckedBaseModel):
|
|
|
22
22
|
LLM model name.
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
|
+
display_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
A human-friendly display name for the model.
|
|
28
|
+
"""
|
|
29
|
+
|
|
25
30
|
model_endpoint_type: LlmConfigModelEndpointType = pydantic.Field()
|
|
26
31
|
"""
|
|
27
32
|
The endpoint type for the model.
|
letta_client/types/message.py
CHANGED
|
@@ -6,10 +6,11 @@ import typing
|
|
|
6
6
|
import pydantic
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
9
|
-
from .
|
|
9
|
+
from .chat_completion_message_function_tool_call_output import ChatCompletionMessageFunctionToolCallOutput
|
|
10
|
+
from .letta_schemas_message_tool_return import LettaSchemasMessageToolReturn
|
|
11
|
+
from .message_approvals_item import MessageApprovalsItem
|
|
10
12
|
from .message_content_item import MessageContentItem
|
|
11
13
|
from .message_role import MessageRole
|
|
12
|
-
from .tool_return import ToolReturn
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
class Message(UncheckedBaseModel):
|
|
@@ -85,7 +86,7 @@ class Message(UncheckedBaseModel):
|
|
|
85
86
|
For role user/assistant: the (optional) name of the participant. For role tool/function: the name of the function called.
|
|
86
87
|
"""
|
|
87
88
|
|
|
88
|
-
tool_calls: typing.Optional[typing.List[
|
|
89
|
+
tool_calls: typing.Optional[typing.List[ChatCompletionMessageFunctionToolCallOutput]] = pydantic.Field(default=None)
|
|
89
90
|
"""
|
|
90
91
|
The list of tool calls requested. Only applicable for role assistant.
|
|
91
92
|
"""
|
|
@@ -110,7 +111,7 @@ class Message(UncheckedBaseModel):
|
|
|
110
111
|
The offline threading id associated with this message
|
|
111
112
|
"""
|
|
112
113
|
|
|
113
|
-
tool_returns: typing.Optional[typing.List[
|
|
114
|
+
tool_returns: typing.Optional[typing.List[LettaSchemasMessageToolReturn]] = pydantic.Field(default=None)
|
|
114
115
|
"""
|
|
115
116
|
Tool execution return information for prior tool calls
|
|
116
117
|
"""
|
|
@@ -150,6 +151,11 @@ class Message(UncheckedBaseModel):
|
|
|
150
151
|
The reason the tool call request was denied.
|
|
151
152
|
"""
|
|
152
153
|
|
|
154
|
+
approvals: typing.Optional[typing.List[MessageApprovalsItem]] = pydantic.Field(default=None)
|
|
155
|
+
"""
|
|
156
|
+
The list of approvals for this message.
|
|
157
|
+
"""
|
|
158
|
+
|
|
153
159
|
if IS_PYDANTIC_V2:
|
|
154
160
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
155
161
|
else:
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .approval_return import ApprovalReturn
|
|
6
|
+
from .letta_schemas_message_tool_return import LettaSchemasMessageToolReturn
|
|
7
|
+
|
|
8
|
+
MessageApprovalsItem = typing.Union[ApprovalReturn, LettaSchemasMessageToolReturn]
|
|
@@ -13,6 +13,10 @@ class OmittedReasoningContent(UncheckedBaseModel):
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
type: typing.Literal["omitted_reasoning"] = "omitted_reasoning"
|
|
16
|
+
signature: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
A unique identifier for this reasoning step.
|
|
19
|
+
"""
|
|
16
20
|
|
|
17
21
|
if IS_PYDANTIC_V2:
|
|
18
22
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction(UncheckedBaseModel):
|
|
11
|
+
arguments: str
|
|
12
|
+
name: str
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
letta_client/types/openai_types_chat_chat_completion_message_function_tool_call_param_function.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction(UncheckedBaseModel):
|
|
11
|
+
arguments: str
|
|
12
|
+
name: str
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PromptTokensDetails(UncheckedBaseModel):
|
|
11
|
+
audio_tokens: typing.Optional[int] = None
|
|
12
|
+
cached_tokens: typing.Optional[int] = None
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
letta_client/types/provider.py
CHANGED
|
@@ -61,6 +61,16 @@ class Provider(UncheckedBaseModel):
|
|
|
61
61
|
The last update timestamp of the provider.
|
|
62
62
|
"""
|
|
63
63
|
|
|
64
|
+
api_key_enc: typing.Optional[str] = pydantic.Field(default=None)
|
|
65
|
+
"""
|
|
66
|
+
Encrypted API key as Secret object
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
access_key_enc: typing.Optional[str] = pydantic.Field(default=None)
|
|
70
|
+
"""
|
|
71
|
+
Encrypted access key as Secret object
|
|
72
|
+
"""
|
|
73
|
+
|
|
64
74
|
if IS_PYDANTIC_V2:
|
|
65
75
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
66
76
|
else:
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RunMetrics(UncheckedBaseModel):
|
|
11
|
+
id: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The id of the run this metric belongs to (matches runs.id).
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
agent_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
The unique identifier of the agent.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
project_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
The project that the run belongs to (cloud only).
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
run_start_ns: typing.Optional[int] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
The timestamp of the start of the run in nanoseconds.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
run_ns: typing.Optional[int] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
Total time for the run in nanoseconds.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
num_steps: typing.Optional[int] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
The number of steps in the run.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
template_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
42
|
+
"""
|
|
43
|
+
The template ID that the run belongs to (cloud only).
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
base_template_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
47
|
+
"""
|
|
48
|
+
The base template ID that the run belongs to (cloud only).
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
if IS_PYDANTIC_V2:
|
|
52
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
53
|
+
else:
|
|
54
|
+
|
|
55
|
+
class Config:
|
|
56
|
+
frozen = True
|
|
57
|
+
smart_union = True
|
|
58
|
+
extra = pydantic.Extra.allow
|
|
@@ -49,6 +49,11 @@ class SandboxEnvironmentVariable(UncheckedBaseModel):
|
|
|
49
49
|
An optional description of the environment variable.
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
|
+
value_enc: typing.Optional[str] = pydantic.Field(default=None)
|
|
53
|
+
"""
|
|
54
|
+
Encrypted value as Secret object
|
|
55
|
+
"""
|
|
56
|
+
|
|
52
57
|
sandbox_config_id: str = pydantic.Field()
|
|
53
58
|
"""
|
|
54
59
|
The ID of the sandbox config this environment variable belongs to.
|
|
@@ -14,6 +14,11 @@ class TextContent(UncheckedBaseModel):
|
|
|
14
14
|
The text content of the message.
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
|
+
signature: typing.Optional[str] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Stores a unique identifier for any reasoning associated with this text content.
|
|
20
|
+
"""
|
|
21
|
+
|
|
17
22
|
if IS_PYDANTIC_V2:
|
|
18
23
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
19
24
|
else:
|
|
@@ -24,6 +24,11 @@ class ToolCallContent(UncheckedBaseModel):
|
|
|
24
24
|
The parameters being passed to the tool, structured as a dictionary of parameter names to values.
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
|
+
signature: typing.Optional[str] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
Stores a unique identifier for any reasoning associated with this tool call.
|
|
30
|
+
"""
|
|
31
|
+
|
|
27
32
|
if IS_PYDANTIC_V2:
|
|
28
33
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
29
34
|
else:
|
|
@@ -7,6 +7,7 @@ import pydantic
|
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
9
9
|
from .tool_call_message_tool_call import ToolCallMessageToolCall
|
|
10
|
+
from .tool_call_message_tool_calls import ToolCallMessageToolCalls
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class ToolCallMessage(UncheckedBaseModel):
|
|
@@ -31,6 +32,7 @@ class ToolCallMessage(UncheckedBaseModel):
|
|
|
31
32
|
seq_id: typing.Optional[int] = None
|
|
32
33
|
run_id: typing.Optional[str] = None
|
|
33
34
|
tool_call: ToolCallMessageToolCall
|
|
35
|
+
tool_calls: typing.Optional[ToolCallMessageToolCalls] = None
|
|
34
36
|
|
|
35
37
|
if IS_PYDANTIC_V2:
|
|
36
38
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -6,6 +6,7 @@ import typing
|
|
|
6
6
|
import pydantic
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
9
|
+
from .letta_schemas_letta_message_tool_return import LettaSchemasLettaMessageToolReturn
|
|
9
10
|
from .tool_return_message_status import ToolReturnMessageStatus
|
|
10
11
|
|
|
11
12
|
|
|
@@ -17,11 +18,12 @@ class ToolReturnMessage(UncheckedBaseModel):
|
|
|
17
18
|
id (str): The ID of the message
|
|
18
19
|
date (datetime): The date the message was created in ISO format
|
|
19
20
|
name (Optional[str]): The name of the sender of the message
|
|
20
|
-
tool_return (str): The return value of the tool
|
|
21
|
-
status (Literal["success", "error"]): The status of the tool call
|
|
22
|
-
tool_call_id (str): A unique identifier for the tool call that generated this message
|
|
23
|
-
stdout (Optional[List(str)]): Captured stdout (e.g. prints, logs) from the tool invocation
|
|
24
|
-
stderr (Optional[List(str)]): Captured stderr from the tool invocation
|
|
21
|
+
tool_return (str): The return value of the tool (deprecated, use tool_returns)
|
|
22
|
+
status (Literal["success", "error"]): The status of the tool call (deprecated, use tool_returns)
|
|
23
|
+
tool_call_id (str): A unique identifier for the tool call that generated this message (deprecated, use tool_returns)
|
|
24
|
+
stdout (Optional[List(str)]): Captured stdout (e.g. prints, logs) from the tool invocation (deprecated, use tool_returns)
|
|
25
|
+
stderr (Optional[List(str)]): Captured stderr from the tool invocation (deprecated, use tool_returns)
|
|
26
|
+
tool_returns (Optional[List[ToolReturn]]): List of tool returns for multi-tool support
|
|
25
27
|
"""
|
|
26
28
|
|
|
27
29
|
id: str
|
|
@@ -39,6 +41,7 @@ class ToolReturnMessage(UncheckedBaseModel):
|
|
|
39
41
|
tool_call_id: str
|
|
40
42
|
stdout: typing.Optional[typing.List[str]] = None
|
|
41
43
|
stderr: typing.Optional[typing.List[str]] = None
|
|
44
|
+
tool_returns: typing.Optional[typing.List[LettaSchemasLettaMessageToolReturn]] = None
|
|
42
45
|
|
|
43
46
|
if IS_PYDANTIC_V2:
|
|
44
47
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|