letta-client 0.1.324__py3-none-any.whl → 1.0.0a2__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 +229 -59
- 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 +57 -18
- letta_client/agents/messages/raw_client.py +37 -18
- 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 +152 -20
- letta_client/runs/messages/client.py +30 -2
- letta_client/runs/messages/raw_client.py +10 -0
- letta_client/runs/raw_client.py +146 -16
- 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 +88 -36
- letta_client/templates/client.py +165 -4
- letta_client/templates/raw_client.py +205 -2
- letta_client/templates/types/__init__.py +176 -72
- 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_tool_rules_item_item_one.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args.py} +11 -7
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_one_prompt_template.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args_args.py} +4 -5
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_args_args_item.py +7 -0
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_zero_prompt_template.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args_prompt_template.py} +4 -4
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_one_prompt_template_item.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args_prompt_template_item.py} +1 -1
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_zero_type.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args_type.py} +1 -1
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_zero.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes.py} +13 -7
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes.py +16 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_args.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_args_item.py +7 -0
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_one.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_item.py} +8 -10
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_item_args.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_item_args_item.py +7 -0
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_zero_prompt_template.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_prompt_template.py} +4 -4
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_one_prompt_template_item.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_prompt_template_item.py} +1 -1
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_zero_type.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_type.py} +1 -1
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item.py +8 -8
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_zero.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args.py} +11 -8
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_args.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_args_item.py +7 -0
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_one_prompt_template.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_prompt_template.py} +4 -4
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_zero_prompt_template_item.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_prompt_template_item.py} +1 -1
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_one_type.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_type.py} +1 -1
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes.py +37 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes.py +18 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_args.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_args_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_item.py +28 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_item_args.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_item_args_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_prompt_template.py +18 -0
- letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_zero_prompt_template_item.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_prompt_template_item.py} +1 -1
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_type.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_tool_type.py +1 -1
- letta_client/templates/types/templates_create_template_request_agent_file.py +5 -0
- letta_client/templates/types/templates_get_template_snapshot_response_agents_item_tool_rules_item.py +8 -8
- letta_client/templates/types/{templates_get_template_snapshot_response_agents_item_tool_rules_item_one.py → templates_get_template_snapshot_response_agents_item_tool_rules_item_args.py} +2 -1
- letta_client/templates/types/templates_get_template_snapshot_response_agents_item_tool_rules_item_child_arg_nodes.py +29 -0
- letta_client/templates/types/{templates_get_template_snapshot_response_agents_item_tool_rules_item_zero.py → templates_get_template_snapshot_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item.py} +3 -5
- letta_client/templates/types/templates_update_current_template_from_agent_file_response.py +21 -0
- letta_client/tools/client.py +30 -220
- letta_client/tools/raw_client.py +0 -292
- letta_client/types/__init__.py +134 -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/child_tool_rule.py +6 -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/init_tool_rule.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 +15 -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.py +28 -41
- letta_client/types/run_metrics.py +58 -0
- letta_client/types/run_status.py +5 -0
- letta_client/types/sandbox_environment_variable.py +5 -0
- letta_client/types/step.py +2 -2
- letta_client/types/step_metrics.py +2 -2
- 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_call_node.py +35 -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.0a2.dist-info/METADATA +422 -0
- {letta_client-0.1.324.dist-info → letta_client-1.0.0a2.dist-info}/RECORD +241 -141
- 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/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_one_type.py +0 -5
- 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-0.1.324.dist-info/METADATA +0 -211
- {letta_client-0.1.324.dist-info → letta_client-1.0.0a2.dist-info}/WHEEL +0 -0
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import typing
|
|
4
|
-
|
|
5
|
-
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
-
from ...core.request_options import RequestOptions
|
|
7
|
-
from .raw_client import AsyncRawTemplatesClient, RawTemplatesClient
|
|
8
|
-
from .types.templates_migrate_response import TemplatesMigrateResponse
|
|
9
|
-
|
|
10
|
-
# this is used as the default value for optional parameters
|
|
11
|
-
OMIT = typing.cast(typing.Any, ...)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class TemplatesClient:
|
|
15
|
-
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
16
|
-
self._raw_client = RawTemplatesClient(client_wrapper=client_wrapper)
|
|
17
|
-
|
|
18
|
-
@property
|
|
19
|
-
def with_raw_response(self) -> RawTemplatesClient:
|
|
20
|
-
"""
|
|
21
|
-
Retrieves a raw implementation of this client that returns raw responses.
|
|
22
|
-
|
|
23
|
-
Returns
|
|
24
|
-
-------
|
|
25
|
-
RawTemplatesClient
|
|
26
|
-
"""
|
|
27
|
-
return self._raw_client
|
|
28
|
-
|
|
29
|
-
def migrate(
|
|
30
|
-
self,
|
|
31
|
-
agent_id: str,
|
|
32
|
-
*,
|
|
33
|
-
to_template: str,
|
|
34
|
-
preserve_core_memories: bool,
|
|
35
|
-
preserve_tool_variables: typing.Optional[bool] = OMIT,
|
|
36
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
37
|
-
) -> TemplatesMigrateResponse:
|
|
38
|
-
"""
|
|
39
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
40
|
-
|
|
41
|
-
Migrate an agent to a new versioned agent template.
|
|
42
|
-
|
|
43
|
-
Parameters
|
|
44
|
-
----------
|
|
45
|
-
agent_id : str
|
|
46
|
-
|
|
47
|
-
to_template : str
|
|
48
|
-
|
|
49
|
-
preserve_core_memories : bool
|
|
50
|
-
|
|
51
|
-
preserve_tool_variables : typing.Optional[bool]
|
|
52
|
-
If true, preserves the existing agent's tool environment variables instead of using the template's variables
|
|
53
|
-
|
|
54
|
-
request_options : typing.Optional[RequestOptions]
|
|
55
|
-
Request-specific configuration.
|
|
56
|
-
|
|
57
|
-
Returns
|
|
58
|
-
-------
|
|
59
|
-
TemplatesMigrateResponse
|
|
60
|
-
200
|
|
61
|
-
|
|
62
|
-
Examples
|
|
63
|
-
--------
|
|
64
|
-
from letta_client import Letta
|
|
65
|
-
|
|
66
|
-
client = Letta(
|
|
67
|
-
project="YOUR_PROJECT",
|
|
68
|
-
token="YOUR_TOKEN",
|
|
69
|
-
)
|
|
70
|
-
client.agents.templates.migrate(
|
|
71
|
-
agent_id="agent_id",
|
|
72
|
-
to_template="to_template",
|
|
73
|
-
preserve_core_memories=True,
|
|
74
|
-
)
|
|
75
|
-
"""
|
|
76
|
-
_response = self._raw_client.migrate(
|
|
77
|
-
agent_id,
|
|
78
|
-
to_template=to_template,
|
|
79
|
-
preserve_core_memories=preserve_core_memories,
|
|
80
|
-
preserve_tool_variables=preserve_tool_variables,
|
|
81
|
-
request_options=request_options,
|
|
82
|
-
)
|
|
83
|
-
return _response.data
|
|
84
|
-
|
|
85
|
-
def create(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
86
|
-
"""
|
|
87
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
88
|
-
|
|
89
|
-
Creates a template from an agent.
|
|
90
|
-
|
|
91
|
-
Parameters
|
|
92
|
-
----------
|
|
93
|
-
agent_id : str
|
|
94
|
-
|
|
95
|
-
request_options : typing.Optional[RequestOptions]
|
|
96
|
-
Request-specific configuration.
|
|
97
|
-
|
|
98
|
-
Returns
|
|
99
|
-
-------
|
|
100
|
-
None
|
|
101
|
-
|
|
102
|
-
Examples
|
|
103
|
-
--------
|
|
104
|
-
from letta_client import Letta
|
|
105
|
-
|
|
106
|
-
client = Letta(
|
|
107
|
-
project="YOUR_PROJECT",
|
|
108
|
-
token="YOUR_TOKEN",
|
|
109
|
-
)
|
|
110
|
-
client.agents.templates.create(
|
|
111
|
-
agent_id="agent_id",
|
|
112
|
-
)
|
|
113
|
-
"""
|
|
114
|
-
_response = self._raw_client.create(agent_id, request_options=request_options)
|
|
115
|
-
return _response.data
|
|
116
|
-
|
|
117
|
-
def create_version(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
118
|
-
"""
|
|
119
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
120
|
-
|
|
121
|
-
Creates a new version of the template version of the agent.
|
|
122
|
-
|
|
123
|
-
Parameters
|
|
124
|
-
----------
|
|
125
|
-
agent_id : str
|
|
126
|
-
|
|
127
|
-
request_options : typing.Optional[RequestOptions]
|
|
128
|
-
Request-specific configuration.
|
|
129
|
-
|
|
130
|
-
Returns
|
|
131
|
-
-------
|
|
132
|
-
None
|
|
133
|
-
|
|
134
|
-
Examples
|
|
135
|
-
--------
|
|
136
|
-
from letta_client import Letta
|
|
137
|
-
|
|
138
|
-
client = Letta(
|
|
139
|
-
project="YOUR_PROJECT",
|
|
140
|
-
token="YOUR_TOKEN",
|
|
141
|
-
)
|
|
142
|
-
client.agents.templates.create_version(
|
|
143
|
-
agent_id="agent_id",
|
|
144
|
-
)
|
|
145
|
-
"""
|
|
146
|
-
_response = self._raw_client.create_version(agent_id, request_options=request_options)
|
|
147
|
-
return _response.data
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
class AsyncTemplatesClient:
|
|
151
|
-
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
152
|
-
self._raw_client = AsyncRawTemplatesClient(client_wrapper=client_wrapper)
|
|
153
|
-
|
|
154
|
-
@property
|
|
155
|
-
def with_raw_response(self) -> AsyncRawTemplatesClient:
|
|
156
|
-
"""
|
|
157
|
-
Retrieves a raw implementation of this client that returns raw responses.
|
|
158
|
-
|
|
159
|
-
Returns
|
|
160
|
-
-------
|
|
161
|
-
AsyncRawTemplatesClient
|
|
162
|
-
"""
|
|
163
|
-
return self._raw_client
|
|
164
|
-
|
|
165
|
-
async def migrate(
|
|
166
|
-
self,
|
|
167
|
-
agent_id: str,
|
|
168
|
-
*,
|
|
169
|
-
to_template: str,
|
|
170
|
-
preserve_core_memories: bool,
|
|
171
|
-
preserve_tool_variables: typing.Optional[bool] = OMIT,
|
|
172
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
173
|
-
) -> TemplatesMigrateResponse:
|
|
174
|
-
"""
|
|
175
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
176
|
-
|
|
177
|
-
Migrate an agent to a new versioned agent template.
|
|
178
|
-
|
|
179
|
-
Parameters
|
|
180
|
-
----------
|
|
181
|
-
agent_id : str
|
|
182
|
-
|
|
183
|
-
to_template : str
|
|
184
|
-
|
|
185
|
-
preserve_core_memories : bool
|
|
186
|
-
|
|
187
|
-
preserve_tool_variables : typing.Optional[bool]
|
|
188
|
-
If true, preserves the existing agent's tool environment variables instead of using the template's variables
|
|
189
|
-
|
|
190
|
-
request_options : typing.Optional[RequestOptions]
|
|
191
|
-
Request-specific configuration.
|
|
192
|
-
|
|
193
|
-
Returns
|
|
194
|
-
-------
|
|
195
|
-
TemplatesMigrateResponse
|
|
196
|
-
200
|
|
197
|
-
|
|
198
|
-
Examples
|
|
199
|
-
--------
|
|
200
|
-
import asyncio
|
|
201
|
-
|
|
202
|
-
from letta_client import AsyncLetta
|
|
203
|
-
|
|
204
|
-
client = AsyncLetta(
|
|
205
|
-
project="YOUR_PROJECT",
|
|
206
|
-
token="YOUR_TOKEN",
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
async def main() -> None:
|
|
211
|
-
await client.agents.templates.migrate(
|
|
212
|
-
agent_id="agent_id",
|
|
213
|
-
to_template="to_template",
|
|
214
|
-
preserve_core_memories=True,
|
|
215
|
-
)
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
asyncio.run(main())
|
|
219
|
-
"""
|
|
220
|
-
_response = await self._raw_client.migrate(
|
|
221
|
-
agent_id,
|
|
222
|
-
to_template=to_template,
|
|
223
|
-
preserve_core_memories=preserve_core_memories,
|
|
224
|
-
preserve_tool_variables=preserve_tool_variables,
|
|
225
|
-
request_options=request_options,
|
|
226
|
-
)
|
|
227
|
-
return _response.data
|
|
228
|
-
|
|
229
|
-
async def create(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
230
|
-
"""
|
|
231
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
232
|
-
|
|
233
|
-
Creates a template from an agent.
|
|
234
|
-
|
|
235
|
-
Parameters
|
|
236
|
-
----------
|
|
237
|
-
agent_id : str
|
|
238
|
-
|
|
239
|
-
request_options : typing.Optional[RequestOptions]
|
|
240
|
-
Request-specific configuration.
|
|
241
|
-
|
|
242
|
-
Returns
|
|
243
|
-
-------
|
|
244
|
-
None
|
|
245
|
-
|
|
246
|
-
Examples
|
|
247
|
-
--------
|
|
248
|
-
import asyncio
|
|
249
|
-
|
|
250
|
-
from letta_client import AsyncLetta
|
|
251
|
-
|
|
252
|
-
client = AsyncLetta(
|
|
253
|
-
project="YOUR_PROJECT",
|
|
254
|
-
token="YOUR_TOKEN",
|
|
255
|
-
)
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
async def main() -> None:
|
|
259
|
-
await client.agents.templates.create(
|
|
260
|
-
agent_id="agent_id",
|
|
261
|
-
)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
asyncio.run(main())
|
|
265
|
-
"""
|
|
266
|
-
_response = await self._raw_client.create(agent_id, request_options=request_options)
|
|
267
|
-
return _response.data
|
|
268
|
-
|
|
269
|
-
async def create_version(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
270
|
-
"""
|
|
271
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
272
|
-
|
|
273
|
-
Creates a new version of the template version of the agent.
|
|
274
|
-
|
|
275
|
-
Parameters
|
|
276
|
-
----------
|
|
277
|
-
agent_id : str
|
|
278
|
-
|
|
279
|
-
request_options : typing.Optional[RequestOptions]
|
|
280
|
-
Request-specific configuration.
|
|
281
|
-
|
|
282
|
-
Returns
|
|
283
|
-
-------
|
|
284
|
-
None
|
|
285
|
-
|
|
286
|
-
Examples
|
|
287
|
-
--------
|
|
288
|
-
import asyncio
|
|
289
|
-
|
|
290
|
-
from letta_client import AsyncLetta
|
|
291
|
-
|
|
292
|
-
client = AsyncLetta(
|
|
293
|
-
project="YOUR_PROJECT",
|
|
294
|
-
token="YOUR_TOKEN",
|
|
295
|
-
)
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
async def main() -> None:
|
|
299
|
-
await client.agents.templates.create_version(
|
|
300
|
-
agent_id="agent_id",
|
|
301
|
-
)
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
asyncio.run(main())
|
|
305
|
-
"""
|
|
306
|
-
_response = await self._raw_client.create_version(agent_id, request_options=request_options)
|
|
307
|
-
return _response.data
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import typing
|
|
4
|
-
from json.decoder import JSONDecodeError
|
|
5
|
-
|
|
6
|
-
from ...core.api_error import ApiError
|
|
7
|
-
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
-
from ...core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
-
from ...core.jsonable_encoder import jsonable_encoder
|
|
10
|
-
from ...core.request_options import RequestOptions
|
|
11
|
-
from ...core.unchecked_base_model import construct_type
|
|
12
|
-
from .types.templates_migrate_response import TemplatesMigrateResponse
|
|
13
|
-
|
|
14
|
-
# this is used as the default value for optional parameters
|
|
15
|
-
OMIT = typing.cast(typing.Any, ...)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class RawTemplatesClient:
|
|
19
|
-
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
20
|
-
self._client_wrapper = client_wrapper
|
|
21
|
-
|
|
22
|
-
def migrate(
|
|
23
|
-
self,
|
|
24
|
-
agent_id: str,
|
|
25
|
-
*,
|
|
26
|
-
to_template: str,
|
|
27
|
-
preserve_core_memories: bool,
|
|
28
|
-
preserve_tool_variables: typing.Optional[bool] = OMIT,
|
|
29
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
30
|
-
) -> HttpResponse[TemplatesMigrateResponse]:
|
|
31
|
-
"""
|
|
32
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
33
|
-
|
|
34
|
-
Migrate an agent to a new versioned agent template.
|
|
35
|
-
|
|
36
|
-
Parameters
|
|
37
|
-
----------
|
|
38
|
-
agent_id : str
|
|
39
|
-
|
|
40
|
-
to_template : str
|
|
41
|
-
|
|
42
|
-
preserve_core_memories : bool
|
|
43
|
-
|
|
44
|
-
preserve_tool_variables : typing.Optional[bool]
|
|
45
|
-
If true, preserves the existing agent's tool environment variables instead of using the template's variables
|
|
46
|
-
|
|
47
|
-
request_options : typing.Optional[RequestOptions]
|
|
48
|
-
Request-specific configuration.
|
|
49
|
-
|
|
50
|
-
Returns
|
|
51
|
-
-------
|
|
52
|
-
HttpResponse[TemplatesMigrateResponse]
|
|
53
|
-
200
|
|
54
|
-
"""
|
|
55
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
56
|
-
f"v1/agents/{jsonable_encoder(agent_id)}/migrate",
|
|
57
|
-
method="POST",
|
|
58
|
-
json={
|
|
59
|
-
"to_template": to_template,
|
|
60
|
-
"preserve_core_memories": preserve_core_memories,
|
|
61
|
-
"preserve_tool_variables": preserve_tool_variables,
|
|
62
|
-
},
|
|
63
|
-
headers={
|
|
64
|
-
"content-type": "application/json",
|
|
65
|
-
},
|
|
66
|
-
request_options=request_options,
|
|
67
|
-
omit=OMIT,
|
|
68
|
-
)
|
|
69
|
-
try:
|
|
70
|
-
if 200 <= _response.status_code < 300:
|
|
71
|
-
_data = typing.cast(
|
|
72
|
-
TemplatesMigrateResponse,
|
|
73
|
-
construct_type(
|
|
74
|
-
type_=TemplatesMigrateResponse, # type: ignore
|
|
75
|
-
object_=_response.json(),
|
|
76
|
-
),
|
|
77
|
-
)
|
|
78
|
-
return HttpResponse(response=_response, data=_data)
|
|
79
|
-
_response_json = _response.json()
|
|
80
|
-
except JSONDecodeError:
|
|
81
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
82
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
83
|
-
|
|
84
|
-
def create(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]:
|
|
85
|
-
"""
|
|
86
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
87
|
-
|
|
88
|
-
Creates a template from an agent.
|
|
89
|
-
|
|
90
|
-
Parameters
|
|
91
|
-
----------
|
|
92
|
-
agent_id : str
|
|
93
|
-
|
|
94
|
-
request_options : typing.Optional[RequestOptions]
|
|
95
|
-
Request-specific configuration.
|
|
96
|
-
|
|
97
|
-
Returns
|
|
98
|
-
-------
|
|
99
|
-
HttpResponse[None]
|
|
100
|
-
"""
|
|
101
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
102
|
-
f"v1/agents/{jsonable_encoder(agent_id)}/template",
|
|
103
|
-
method="POST",
|
|
104
|
-
request_options=request_options,
|
|
105
|
-
)
|
|
106
|
-
try:
|
|
107
|
-
if 200 <= _response.status_code < 300:
|
|
108
|
-
return HttpResponse(response=_response, data=None)
|
|
109
|
-
_response_json = _response.json()
|
|
110
|
-
except JSONDecodeError:
|
|
111
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
112
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
113
|
-
|
|
114
|
-
def create_version(
|
|
115
|
-
self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
116
|
-
) -> HttpResponse[None]:
|
|
117
|
-
"""
|
|
118
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
119
|
-
|
|
120
|
-
Creates a new version of the template version of the agent.
|
|
121
|
-
|
|
122
|
-
Parameters
|
|
123
|
-
----------
|
|
124
|
-
agent_id : str
|
|
125
|
-
|
|
126
|
-
request_options : typing.Optional[RequestOptions]
|
|
127
|
-
Request-specific configuration.
|
|
128
|
-
|
|
129
|
-
Returns
|
|
130
|
-
-------
|
|
131
|
-
HttpResponse[None]
|
|
132
|
-
"""
|
|
133
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
134
|
-
f"v1/agents/{jsonable_encoder(agent_id)}/version-template",
|
|
135
|
-
method="POST",
|
|
136
|
-
request_options=request_options,
|
|
137
|
-
)
|
|
138
|
-
try:
|
|
139
|
-
if 200 <= _response.status_code < 300:
|
|
140
|
-
return HttpResponse(response=_response, data=None)
|
|
141
|
-
_response_json = _response.json()
|
|
142
|
-
except JSONDecodeError:
|
|
143
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
144
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
class AsyncRawTemplatesClient:
|
|
148
|
-
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
149
|
-
self._client_wrapper = client_wrapper
|
|
150
|
-
|
|
151
|
-
async def migrate(
|
|
152
|
-
self,
|
|
153
|
-
agent_id: str,
|
|
154
|
-
*,
|
|
155
|
-
to_template: str,
|
|
156
|
-
preserve_core_memories: bool,
|
|
157
|
-
preserve_tool_variables: typing.Optional[bool] = OMIT,
|
|
158
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
159
|
-
) -> AsyncHttpResponse[TemplatesMigrateResponse]:
|
|
160
|
-
"""
|
|
161
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
162
|
-
|
|
163
|
-
Migrate an agent to a new versioned agent template.
|
|
164
|
-
|
|
165
|
-
Parameters
|
|
166
|
-
----------
|
|
167
|
-
agent_id : str
|
|
168
|
-
|
|
169
|
-
to_template : str
|
|
170
|
-
|
|
171
|
-
preserve_core_memories : bool
|
|
172
|
-
|
|
173
|
-
preserve_tool_variables : typing.Optional[bool]
|
|
174
|
-
If true, preserves the existing agent's tool environment variables instead of using the template's variables
|
|
175
|
-
|
|
176
|
-
request_options : typing.Optional[RequestOptions]
|
|
177
|
-
Request-specific configuration.
|
|
178
|
-
|
|
179
|
-
Returns
|
|
180
|
-
-------
|
|
181
|
-
AsyncHttpResponse[TemplatesMigrateResponse]
|
|
182
|
-
200
|
|
183
|
-
"""
|
|
184
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
185
|
-
f"v1/agents/{jsonable_encoder(agent_id)}/migrate",
|
|
186
|
-
method="POST",
|
|
187
|
-
json={
|
|
188
|
-
"to_template": to_template,
|
|
189
|
-
"preserve_core_memories": preserve_core_memories,
|
|
190
|
-
"preserve_tool_variables": preserve_tool_variables,
|
|
191
|
-
},
|
|
192
|
-
headers={
|
|
193
|
-
"content-type": "application/json",
|
|
194
|
-
},
|
|
195
|
-
request_options=request_options,
|
|
196
|
-
omit=OMIT,
|
|
197
|
-
)
|
|
198
|
-
try:
|
|
199
|
-
if 200 <= _response.status_code < 300:
|
|
200
|
-
_data = typing.cast(
|
|
201
|
-
TemplatesMigrateResponse,
|
|
202
|
-
construct_type(
|
|
203
|
-
type_=TemplatesMigrateResponse, # type: ignore
|
|
204
|
-
object_=_response.json(),
|
|
205
|
-
),
|
|
206
|
-
)
|
|
207
|
-
return AsyncHttpResponse(response=_response, data=_data)
|
|
208
|
-
_response_json = _response.json()
|
|
209
|
-
except JSONDecodeError:
|
|
210
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
211
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
212
|
-
|
|
213
|
-
async def create(
|
|
214
|
-
self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
215
|
-
) -> AsyncHttpResponse[None]:
|
|
216
|
-
"""
|
|
217
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
218
|
-
|
|
219
|
-
Creates a template from an agent.
|
|
220
|
-
|
|
221
|
-
Parameters
|
|
222
|
-
----------
|
|
223
|
-
agent_id : str
|
|
224
|
-
|
|
225
|
-
request_options : typing.Optional[RequestOptions]
|
|
226
|
-
Request-specific configuration.
|
|
227
|
-
|
|
228
|
-
Returns
|
|
229
|
-
-------
|
|
230
|
-
AsyncHttpResponse[None]
|
|
231
|
-
"""
|
|
232
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
233
|
-
f"v1/agents/{jsonable_encoder(agent_id)}/template",
|
|
234
|
-
method="POST",
|
|
235
|
-
request_options=request_options,
|
|
236
|
-
)
|
|
237
|
-
try:
|
|
238
|
-
if 200 <= _response.status_code < 300:
|
|
239
|
-
return AsyncHttpResponse(response=_response, data=None)
|
|
240
|
-
_response_json = _response.json()
|
|
241
|
-
except JSONDecodeError:
|
|
242
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
243
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
244
|
-
|
|
245
|
-
async def create_version(
|
|
246
|
-
self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
247
|
-
) -> AsyncHttpResponse[None]:
|
|
248
|
-
"""
|
|
249
|
-
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
250
|
-
|
|
251
|
-
Creates a new version of the template version of the agent.
|
|
252
|
-
|
|
253
|
-
Parameters
|
|
254
|
-
----------
|
|
255
|
-
agent_id : str
|
|
256
|
-
|
|
257
|
-
request_options : typing.Optional[RequestOptions]
|
|
258
|
-
Request-specific configuration.
|
|
259
|
-
|
|
260
|
-
Returns
|
|
261
|
-
-------
|
|
262
|
-
AsyncHttpResponse[None]
|
|
263
|
-
"""
|
|
264
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
265
|
-
f"v1/agents/{jsonable_encoder(agent_id)}/version-template",
|
|
266
|
-
method="POST",
|
|
267
|
-
request_options=request_options,
|
|
268
|
-
)
|
|
269
|
-
try:
|
|
270
|
-
if 200 <= _response.status_code < 300:
|
|
271
|
-
return AsyncHttpResponse(response=_response, data=None)
|
|
272
|
-
_response_json = _response.json()
|
|
273
|
-
except JSONDecodeError:
|
|
274
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
275
|
-
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import typing
|
|
4
|
-
|
|
5
|
-
import pydantic
|
|
6
|
-
import typing_extensions
|
|
7
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
-
from ..core.serialization import FieldMetadata
|
|
9
|
-
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
10
|
-
from .action_parameters_model import ActionParametersModel
|
|
11
|
-
from .action_response_model import ActionResponseModel
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class ActionModel(UncheckedBaseModel):
|
|
15
|
-
"""
|
|
16
|
-
Action data model.
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
name: str
|
|
20
|
-
description: str
|
|
21
|
-
parameters: ActionParametersModel
|
|
22
|
-
response: ActionResponseModel
|
|
23
|
-
app_name: typing_extensions.Annotated[str, FieldMetadata(alias="appName")]
|
|
24
|
-
app_id: typing_extensions.Annotated[str, FieldMetadata(alias="appId")]
|
|
25
|
-
version: str
|
|
26
|
-
available_versions: typing.List[str]
|
|
27
|
-
tags: typing.List[str]
|
|
28
|
-
logo: typing.Optional[str] = None
|
|
29
|
-
display_name: typing.Optional[str] = None
|
|
30
|
-
enabled: typing.Optional[bool] = None
|
|
31
|
-
|
|
32
|
-
if IS_PYDANTIC_V2:
|
|
33
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
34
|
-
else:
|
|
35
|
-
|
|
36
|
-
class Config:
|
|
37
|
-
frozen = True
|
|
38
|
-
smart_union = True
|
|
39
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,35 +0,0 @@
|
|
|
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 .app_auth_scheme_auth_mode import AppAuthSchemeAuthMode
|
|
9
|
-
from .auth_scheme_field import AuthSchemeField
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class AppAuthScheme(UncheckedBaseModel):
|
|
13
|
-
"""
|
|
14
|
-
App authenticatio scheme.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
scheme_name: str
|
|
18
|
-
auth_mode: AppAuthSchemeAuthMode
|
|
19
|
-
fields: typing.List[AuthSchemeField]
|
|
20
|
-
proxy: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
21
|
-
authorization_url: typing.Optional[str] = None
|
|
22
|
-
token_url: typing.Optional[str] = None
|
|
23
|
-
default_scopes: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None
|
|
24
|
-
token_response_metadata: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None
|
|
25
|
-
client_id: typing.Optional[str] = None
|
|
26
|
-
client_secret: typing.Optional[str] = None
|
|
27
|
-
|
|
28
|
-
if IS_PYDANTIC_V2:
|
|
29
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
30
|
-
else:
|
|
31
|
-
|
|
32
|
-
class Config:
|
|
33
|
-
frozen = True
|
|
34
|
-
smart_union = True
|
|
35
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import typing
|
|
4
|
-
|
|
5
|
-
AppAuthSchemeAuthMode = typing.Union[
|
|
6
|
-
typing.Literal[
|
|
7
|
-
"OAUTH2",
|
|
8
|
-
"OAUTH1",
|
|
9
|
-
"API_KEY",
|
|
10
|
-
"BASIC",
|
|
11
|
-
"BEARER_TOKEN",
|
|
12
|
-
"BASIC_WITH_JWT",
|
|
13
|
-
"GOOGLE_SERVICE_ACCOUNT",
|
|
14
|
-
"GOOGLEADS_AUTH",
|
|
15
|
-
"NO_AUTH",
|
|
16
|
-
"CALCOM_AUTH",
|
|
17
|
-
],
|
|
18
|
-
typing.Any,
|
|
19
|
-
]
|