letta-client 1.0.0a1__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 +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.0a2.dist-info/METADATA +422 -0
- {letta_client-1.0.0a1.dist-info → letta_client-1.0.0a2.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.0a2.dist-info}/WHEEL +0 -0
letta_client/types/__init__.py
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
from .action_model import ActionModel
|
|
6
|
-
from .action_parameters_model import ActionParametersModel
|
|
7
|
-
from .action_response_model import ActionResponseModel
|
|
8
5
|
from .agent_environment_variable import AgentEnvironmentVariable
|
|
9
6
|
from .agent_file_attachment import AgentFileAttachment
|
|
10
7
|
from .agent_file_schema import AgentFileSchema
|
|
@@ -12,21 +9,23 @@ from .agent_state import AgentState
|
|
|
12
9
|
from .agent_state_response_format import AgentStateResponseFormat
|
|
13
10
|
from .agent_state_tool_rules_item import AgentStateToolRulesItem
|
|
14
11
|
from .agent_type import AgentType
|
|
15
|
-
from .
|
|
16
|
-
from .
|
|
17
|
-
from .app_model import AppModel
|
|
12
|
+
from .annotation import Annotation
|
|
13
|
+
from .annotation_url_citation import AnnotationUrlCitation
|
|
18
14
|
from .approval_create import ApprovalCreate
|
|
15
|
+
from .approval_create_approvals_item import ApprovalCreateApprovalsItem
|
|
19
16
|
from .approval_request_message import ApprovalRequestMessage
|
|
20
17
|
from .approval_request_message_tool_call import ApprovalRequestMessageToolCall
|
|
21
18
|
from .approval_response_message import ApprovalResponseMessage
|
|
19
|
+
from .approval_response_message_approvals_item import ApprovalResponseMessageApprovalsItem
|
|
20
|
+
from .approval_return import ApprovalReturn
|
|
22
21
|
from .archival_memory_search_response import ArchivalMemorySearchResponse
|
|
23
22
|
from .archival_memory_search_result import ArchivalMemorySearchResult
|
|
24
23
|
from .archive import Archive
|
|
25
24
|
from .assistant_message import AssistantMessage
|
|
26
25
|
from .assistant_message_content import AssistantMessageContent
|
|
26
|
+
from .audio import Audio
|
|
27
27
|
from .auth_request import AuthRequest
|
|
28
28
|
from .auth_response import AuthResponse
|
|
29
|
-
from .auth_scheme_field import AuthSchemeField
|
|
30
29
|
from .bad_request_error_body import BadRequestErrorBody
|
|
31
30
|
from .base_64_image import Base64Image
|
|
32
31
|
from .base_tool_rule_schema import BaseToolRuleSchema
|
|
@@ -35,10 +34,43 @@ from .block import Block
|
|
|
35
34
|
from .block_schema import BlockSchema
|
|
36
35
|
from .block_update import BlockUpdate
|
|
37
36
|
from .body_export_agent import BodyExportAgent
|
|
38
|
-
from .
|
|
37
|
+
from .chat_completion import ChatCompletion
|
|
38
|
+
from .chat_completion_assistant_message_param import ChatCompletionAssistantMessageParam
|
|
39
|
+
from .chat_completion_assistant_message_param_content import ChatCompletionAssistantMessageParamContent
|
|
40
|
+
from .chat_completion_assistant_message_param_content_item import ChatCompletionAssistantMessageParamContentItem
|
|
41
|
+
from .chat_completion_assistant_message_param_tool_calls_item import ChatCompletionAssistantMessageParamToolCallsItem
|
|
42
|
+
from .chat_completion_audio import ChatCompletionAudio
|
|
43
|
+
from .chat_completion_content_part_image_param import ChatCompletionContentPartImageParam
|
|
44
|
+
from .chat_completion_content_part_input_audio_param import ChatCompletionContentPartInputAudioParam
|
|
45
|
+
from .chat_completion_content_part_refusal_param import ChatCompletionContentPartRefusalParam
|
|
46
|
+
from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
|
|
47
|
+
from .chat_completion_developer_message_param import ChatCompletionDeveloperMessageParam
|
|
48
|
+
from .chat_completion_developer_message_param_content import ChatCompletionDeveloperMessageParamContent
|
|
49
|
+
from .chat_completion_function_message_param import ChatCompletionFunctionMessageParam
|
|
50
|
+
from .chat_completion_message import ChatCompletionMessage
|
|
51
|
+
from .chat_completion_message_custom_tool_call import ChatCompletionMessageCustomToolCall
|
|
52
|
+
from .chat_completion_message_custom_tool_call_param import ChatCompletionMessageCustomToolCallParam
|
|
53
|
+
from .chat_completion_message_function_tool_call_input import ChatCompletionMessageFunctionToolCallInput
|
|
54
|
+
from .chat_completion_message_function_tool_call_output import ChatCompletionMessageFunctionToolCallOutput
|
|
55
|
+
from .chat_completion_message_function_tool_call_param import ChatCompletionMessageFunctionToolCallParam
|
|
56
|
+
from .chat_completion_message_tool_calls_item import ChatCompletionMessageToolCallsItem
|
|
57
|
+
from .chat_completion_service_tier import ChatCompletionServiceTier
|
|
58
|
+
from .chat_completion_system_message_param import ChatCompletionSystemMessageParam
|
|
59
|
+
from .chat_completion_system_message_param_content import ChatCompletionSystemMessageParamContent
|
|
60
|
+
from .chat_completion_token_logprob import ChatCompletionTokenLogprob
|
|
61
|
+
from .chat_completion_tool_message_param import ChatCompletionToolMessageParam
|
|
62
|
+
from .chat_completion_tool_message_param_content import ChatCompletionToolMessageParamContent
|
|
63
|
+
from .chat_completion_user_message_param import ChatCompletionUserMessageParam
|
|
64
|
+
from .chat_completion_user_message_param_content import ChatCompletionUserMessageParamContent
|
|
65
|
+
from .chat_completion_user_message_param_content_item import ChatCompletionUserMessageParamContentItem
|
|
39
66
|
from .child_tool_rule import ChildToolRule
|
|
40
67
|
from .child_tool_rule_schema import ChildToolRuleSchema
|
|
68
|
+
from .choice import Choice
|
|
69
|
+
from .choice_finish_reason import ChoiceFinishReason
|
|
70
|
+
from .choice_logprobs import ChoiceLogprobs
|
|
41
71
|
from .code_input import CodeInput
|
|
72
|
+
from .completion_tokens_details import CompletionTokensDetails
|
|
73
|
+
from .completion_usage import CompletionUsage
|
|
42
74
|
from .components_schemas_text_content import ComponentsSchemasTextContent
|
|
43
75
|
from .conditional_tool_rule import ConditionalToolRule
|
|
44
76
|
from .conditional_tool_rule_schema import ConditionalToolRuleSchema
|
|
@@ -47,6 +79,8 @@ from .context_window_overview import ContextWindowOverview
|
|
|
47
79
|
from .continue_tool_rule import ContinueToolRule
|
|
48
80
|
from .core_memory_block_schema import CoreMemoryBlockSchema
|
|
49
81
|
from .create_block import CreateBlock
|
|
82
|
+
from .custom_input import CustomInput
|
|
83
|
+
from .custom_output import CustomOutput
|
|
50
84
|
from .delete_deployment_response import DeleteDeploymentResponse
|
|
51
85
|
from .deployment_entity import DeploymentEntity
|
|
52
86
|
from .duplicate_file_handling import DuplicateFileHandling
|
|
@@ -56,15 +90,19 @@ from .e_2_b_sandbox_config import E2BSandboxConfig
|
|
|
56
90
|
from .embedding_config import EmbeddingConfig
|
|
57
91
|
from .embedding_config_embedding_endpoint_type import EmbeddingConfigEmbeddingEndpointType
|
|
58
92
|
from .feedback_type import FeedbackType
|
|
93
|
+
from .file import File
|
|
59
94
|
from .file_agent_schema import FileAgentSchema
|
|
60
95
|
from .file_block import FileBlock
|
|
96
|
+
from .file_file import FileFile
|
|
61
97
|
from .file_metadata import FileMetadata
|
|
62
98
|
from .file_processing_status import FileProcessingStatus
|
|
63
99
|
from .file_schema import FileSchema
|
|
64
100
|
from .file_stats import FileStats
|
|
65
101
|
from .folder import Folder
|
|
66
|
-
from .
|
|
102
|
+
from .function_call_input import FunctionCallInput
|
|
103
|
+
from .function_call_output import FunctionCallOutput
|
|
67
104
|
from .function_definition import FunctionDefinition
|
|
105
|
+
from .function_output import FunctionOutput
|
|
68
106
|
from .function_tool import FunctionTool
|
|
69
107
|
from .generate_tool_input import GenerateToolInput
|
|
70
108
|
from .generate_tool_output import GenerateToolOutput
|
|
@@ -82,8 +120,12 @@ from .identity_property_value import IdentityPropertyValue
|
|
|
82
120
|
from .identity_type import IdentityType
|
|
83
121
|
from .image_content import ImageContent
|
|
84
122
|
from .image_content_source import ImageContentSource
|
|
123
|
+
from .image_url import ImageUrl
|
|
124
|
+
from .image_url_detail import ImageUrlDetail
|
|
85
125
|
from .imported_agents_response import ImportedAgentsResponse
|
|
86
126
|
from .init_tool_rule import InitToolRule
|
|
127
|
+
from .input_audio import InputAudio
|
|
128
|
+
from .input_audio_format import InputAudioFormat
|
|
87
129
|
from .internal_server_error_body import InternalServerErrorBody
|
|
88
130
|
from .internal_template_agent_create import InternalTemplateAgentCreate
|
|
89
131
|
from .internal_template_agent_create_response_format import InternalTemplateAgentCreateResponseFormat
|
|
@@ -111,8 +153,13 @@ from .letta_schemas_agent_file_agent_schema import LettaSchemasAgentFileAgentSch
|
|
|
111
153
|
from .letta_schemas_agent_file_agent_schema_response_format import LettaSchemasAgentFileAgentSchemaResponseFormat
|
|
112
154
|
from .letta_schemas_agent_file_agent_schema_tool_rules_item import LettaSchemasAgentFileAgentSchemaToolRulesItem
|
|
113
155
|
from .letta_schemas_agent_file_message_schema import LettaSchemasAgentFileMessageSchema
|
|
156
|
+
from .letta_schemas_agent_file_message_schema_approvals_item import LettaSchemasAgentFileMessageSchemaApprovalsItem
|
|
114
157
|
from .letta_schemas_agent_file_message_schema_content import LettaSchemasAgentFileMessageSchemaContent
|
|
115
158
|
from .letta_schemas_agent_file_tool_schema import LettaSchemasAgentFileToolSchema
|
|
159
|
+
from .letta_schemas_letta_message_tool_return import LettaSchemasLettaMessageToolReturn
|
|
160
|
+
from .letta_schemas_letta_message_tool_return_status import LettaSchemasLettaMessageToolReturnStatus
|
|
161
|
+
from .letta_schemas_message_tool_return import LettaSchemasMessageToolReturn
|
|
162
|
+
from .letta_schemas_message_tool_return_status import LettaSchemasMessageToolReturnStatus
|
|
116
163
|
from .letta_serialize_schemas_pydantic_agent_schema_agent_schema import (
|
|
117
164
|
LettaSerializeSchemasPydanticAgentSchemaAgentSchema,
|
|
118
165
|
)
|
|
@@ -148,6 +195,7 @@ from .mcp_tool_health import McpToolHealth
|
|
|
148
195
|
from .memory import Memory
|
|
149
196
|
from .memory_agent_type import MemoryAgentType
|
|
150
197
|
from .message import Message
|
|
198
|
+
from .message_approvals_item import MessageApprovalsItem
|
|
151
199
|
from .message_content_item import MessageContentItem
|
|
152
200
|
from .message_create import MessageCreate
|
|
153
201
|
from .message_create_content import MessageCreateContent
|
|
@@ -160,6 +208,12 @@ from .modal_sandbox_config_language import ModalSandboxConfigLanguage
|
|
|
160
208
|
from .not_found_error_body import NotFoundErrorBody
|
|
161
209
|
from .npm_requirement import NpmRequirement
|
|
162
210
|
from .omitted_reasoning_content import OmittedReasoningContent
|
|
211
|
+
from .openai_types_chat_chat_completion_message_function_tool_call_function import (
|
|
212
|
+
OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction,
|
|
213
|
+
)
|
|
214
|
+
from .openai_types_chat_chat_completion_message_function_tool_call_param_function import (
|
|
215
|
+
OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction,
|
|
216
|
+
)
|
|
163
217
|
from .organization import Organization
|
|
164
218
|
from .organization_create import OrganizationCreate
|
|
165
219
|
from .organization_sources_stats import OrganizationSourcesStats
|
|
@@ -171,6 +225,7 @@ from .parent_tool_rule import ParentToolRule
|
|
|
171
225
|
from .passage import Passage
|
|
172
226
|
from .payment_required_error_body import PaymentRequiredErrorBody
|
|
173
227
|
from .pip_requirement import PipRequirement
|
|
228
|
+
from .prompt_tokens_details import PromptTokensDetails
|
|
174
229
|
from .provider import Provider
|
|
175
230
|
from .provider_category import ProviderCategory
|
|
176
231
|
from .provider_trace import ProviderTrace
|
|
@@ -184,6 +239,7 @@ from .requires_approval_tool_rule import RequiresApprovalToolRule
|
|
|
184
239
|
from .round_robin_manager import RoundRobinManager
|
|
185
240
|
from .round_robin_manager_update import RoundRobinManagerUpdate
|
|
186
241
|
from .run import Run
|
|
242
|
+
from .run_metrics import RunMetrics
|
|
187
243
|
from .run_status import RunStatus
|
|
188
244
|
from .sandbox_config import SandboxConfig
|
|
189
245
|
from .sandbox_config_create import SandboxConfigCreate
|
|
@@ -225,16 +281,16 @@ from .tool_call_content import ToolCallContent
|
|
|
225
281
|
from .tool_call_delta import ToolCallDelta
|
|
226
282
|
from .tool_call_message import ToolCallMessage
|
|
227
283
|
from .tool_call_message_tool_call import ToolCallMessageToolCall
|
|
284
|
+
from .tool_call_message_tool_calls import ToolCallMessageToolCalls
|
|
228
285
|
from .tool_call_node import ToolCallNode
|
|
229
286
|
from .tool_create import ToolCreate
|
|
230
287
|
from .tool_env_var_schema import ToolEnvVarSchema
|
|
231
288
|
from .tool_json_schema import ToolJsonSchema
|
|
232
|
-
from .tool_return import ToolReturn
|
|
233
289
|
from .tool_return_content import ToolReturnContent
|
|
234
290
|
from .tool_return_message import ToolReturnMessage
|
|
235
291
|
from .tool_return_message_status import ToolReturnMessageStatus
|
|
236
|
-
from .tool_return_status import ToolReturnStatus
|
|
237
292
|
from .tool_type import ToolType
|
|
293
|
+
from .top_logprob import TopLogprob
|
|
238
294
|
from .update_assistant_message import UpdateAssistantMessage
|
|
239
295
|
from .update_assistant_message_content import UpdateAssistantMessageContent
|
|
240
296
|
from .update_reasoning_message import UpdateReasoningMessage
|
|
@@ -260,9 +316,6 @@ from .voice_sleeptime_manager import VoiceSleeptimeManager
|
|
|
260
316
|
from .voice_sleeptime_manager_update import VoiceSleeptimeManagerUpdate
|
|
261
317
|
|
|
262
318
|
__all__ = [
|
|
263
|
-
"ActionModel",
|
|
264
|
-
"ActionParametersModel",
|
|
265
|
-
"ActionResponseModel",
|
|
266
319
|
"AgentEnvironmentVariable",
|
|
267
320
|
"AgentFileAttachment",
|
|
268
321
|
"AgentFileSchema",
|
|
@@ -270,21 +323,23 @@ __all__ = [
|
|
|
270
323
|
"AgentStateResponseFormat",
|
|
271
324
|
"AgentStateToolRulesItem",
|
|
272
325
|
"AgentType",
|
|
273
|
-
"
|
|
274
|
-
"
|
|
275
|
-
"AppModel",
|
|
326
|
+
"Annotation",
|
|
327
|
+
"AnnotationUrlCitation",
|
|
276
328
|
"ApprovalCreate",
|
|
329
|
+
"ApprovalCreateApprovalsItem",
|
|
277
330
|
"ApprovalRequestMessage",
|
|
278
331
|
"ApprovalRequestMessageToolCall",
|
|
279
332
|
"ApprovalResponseMessage",
|
|
333
|
+
"ApprovalResponseMessageApprovalsItem",
|
|
334
|
+
"ApprovalReturn",
|
|
280
335
|
"ArchivalMemorySearchResponse",
|
|
281
336
|
"ArchivalMemorySearchResult",
|
|
282
337
|
"Archive",
|
|
283
338
|
"AssistantMessage",
|
|
284
339
|
"AssistantMessageContent",
|
|
340
|
+
"Audio",
|
|
285
341
|
"AuthRequest",
|
|
286
342
|
"AuthResponse",
|
|
287
|
-
"AuthSchemeField",
|
|
288
343
|
"BadRequestErrorBody",
|
|
289
344
|
"Base64Image",
|
|
290
345
|
"BaseToolRuleSchema",
|
|
@@ -293,10 +348,43 @@ __all__ = [
|
|
|
293
348
|
"BlockSchema",
|
|
294
349
|
"BlockUpdate",
|
|
295
350
|
"BodyExportAgent",
|
|
296
|
-
"
|
|
351
|
+
"ChatCompletion",
|
|
352
|
+
"ChatCompletionAssistantMessageParam",
|
|
353
|
+
"ChatCompletionAssistantMessageParamContent",
|
|
354
|
+
"ChatCompletionAssistantMessageParamContentItem",
|
|
355
|
+
"ChatCompletionAssistantMessageParamToolCallsItem",
|
|
356
|
+
"ChatCompletionAudio",
|
|
357
|
+
"ChatCompletionContentPartImageParam",
|
|
358
|
+
"ChatCompletionContentPartInputAudioParam",
|
|
359
|
+
"ChatCompletionContentPartRefusalParam",
|
|
360
|
+
"ChatCompletionContentPartTextParam",
|
|
361
|
+
"ChatCompletionDeveloperMessageParam",
|
|
362
|
+
"ChatCompletionDeveloperMessageParamContent",
|
|
363
|
+
"ChatCompletionFunctionMessageParam",
|
|
364
|
+
"ChatCompletionMessage",
|
|
365
|
+
"ChatCompletionMessageCustomToolCall",
|
|
366
|
+
"ChatCompletionMessageCustomToolCallParam",
|
|
367
|
+
"ChatCompletionMessageFunctionToolCallInput",
|
|
368
|
+
"ChatCompletionMessageFunctionToolCallOutput",
|
|
369
|
+
"ChatCompletionMessageFunctionToolCallParam",
|
|
370
|
+
"ChatCompletionMessageToolCallsItem",
|
|
371
|
+
"ChatCompletionServiceTier",
|
|
372
|
+
"ChatCompletionSystemMessageParam",
|
|
373
|
+
"ChatCompletionSystemMessageParamContent",
|
|
374
|
+
"ChatCompletionTokenLogprob",
|
|
375
|
+
"ChatCompletionToolMessageParam",
|
|
376
|
+
"ChatCompletionToolMessageParamContent",
|
|
377
|
+
"ChatCompletionUserMessageParam",
|
|
378
|
+
"ChatCompletionUserMessageParamContent",
|
|
379
|
+
"ChatCompletionUserMessageParamContentItem",
|
|
297
380
|
"ChildToolRule",
|
|
298
381
|
"ChildToolRuleSchema",
|
|
382
|
+
"Choice",
|
|
383
|
+
"ChoiceFinishReason",
|
|
384
|
+
"ChoiceLogprobs",
|
|
299
385
|
"CodeInput",
|
|
386
|
+
"CompletionTokensDetails",
|
|
387
|
+
"CompletionUsage",
|
|
300
388
|
"ComponentsSchemasTextContent",
|
|
301
389
|
"ConditionalToolRule",
|
|
302
390
|
"ConditionalToolRuleSchema",
|
|
@@ -305,6 +393,8 @@ __all__ = [
|
|
|
305
393
|
"ContinueToolRule",
|
|
306
394
|
"CoreMemoryBlockSchema",
|
|
307
395
|
"CreateBlock",
|
|
396
|
+
"CustomInput",
|
|
397
|
+
"CustomOutput",
|
|
308
398
|
"DeleteDeploymentResponse",
|
|
309
399
|
"DeploymentEntity",
|
|
310
400
|
"DuplicateFileHandling",
|
|
@@ -314,15 +404,19 @@ __all__ = [
|
|
|
314
404
|
"EmbeddingConfig",
|
|
315
405
|
"EmbeddingConfigEmbeddingEndpointType",
|
|
316
406
|
"FeedbackType",
|
|
407
|
+
"File",
|
|
317
408
|
"FileAgentSchema",
|
|
318
409
|
"FileBlock",
|
|
410
|
+
"FileFile",
|
|
319
411
|
"FileMetadata",
|
|
320
412
|
"FileProcessingStatus",
|
|
321
413
|
"FileSchema",
|
|
322
414
|
"FileStats",
|
|
323
415
|
"Folder",
|
|
324
|
-
"
|
|
416
|
+
"FunctionCallInput",
|
|
417
|
+
"FunctionCallOutput",
|
|
325
418
|
"FunctionDefinition",
|
|
419
|
+
"FunctionOutput",
|
|
326
420
|
"FunctionTool",
|
|
327
421
|
"GenerateToolInput",
|
|
328
422
|
"GenerateToolOutput",
|
|
@@ -340,8 +434,12 @@ __all__ = [
|
|
|
340
434
|
"IdentityType",
|
|
341
435
|
"ImageContent",
|
|
342
436
|
"ImageContentSource",
|
|
437
|
+
"ImageUrl",
|
|
438
|
+
"ImageUrlDetail",
|
|
343
439
|
"ImportedAgentsResponse",
|
|
344
440
|
"InitToolRule",
|
|
441
|
+
"InputAudio",
|
|
442
|
+
"InputAudioFormat",
|
|
345
443
|
"InternalServerErrorBody",
|
|
346
444
|
"InternalTemplateAgentCreate",
|
|
347
445
|
"InternalTemplateAgentCreateResponseFormat",
|
|
@@ -369,8 +467,13 @@ __all__ = [
|
|
|
369
467
|
"LettaSchemasAgentFileAgentSchemaResponseFormat",
|
|
370
468
|
"LettaSchemasAgentFileAgentSchemaToolRulesItem",
|
|
371
469
|
"LettaSchemasAgentFileMessageSchema",
|
|
470
|
+
"LettaSchemasAgentFileMessageSchemaApprovalsItem",
|
|
372
471
|
"LettaSchemasAgentFileMessageSchemaContent",
|
|
373
472
|
"LettaSchemasAgentFileToolSchema",
|
|
473
|
+
"LettaSchemasLettaMessageToolReturn",
|
|
474
|
+
"LettaSchemasLettaMessageToolReturnStatus",
|
|
475
|
+
"LettaSchemasMessageToolReturn",
|
|
476
|
+
"LettaSchemasMessageToolReturnStatus",
|
|
374
477
|
"LettaSerializeSchemasPydanticAgentSchemaAgentSchema",
|
|
375
478
|
"LettaSerializeSchemasPydanticAgentSchemaAgentSchemaToolRulesItem",
|
|
376
479
|
"LettaSerializeSchemasPydanticAgentSchemaMessageSchema",
|
|
@@ -398,6 +501,7 @@ __all__ = [
|
|
|
398
501
|
"Memory",
|
|
399
502
|
"MemoryAgentType",
|
|
400
503
|
"Message",
|
|
504
|
+
"MessageApprovalsItem",
|
|
401
505
|
"MessageContentItem",
|
|
402
506
|
"MessageCreate",
|
|
403
507
|
"MessageCreateContent",
|
|
@@ -410,6 +514,8 @@ __all__ = [
|
|
|
410
514
|
"NotFoundErrorBody",
|
|
411
515
|
"NpmRequirement",
|
|
412
516
|
"OmittedReasoningContent",
|
|
517
|
+
"OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction",
|
|
518
|
+
"OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction",
|
|
413
519
|
"Organization",
|
|
414
520
|
"OrganizationCreate",
|
|
415
521
|
"OrganizationSourcesStats",
|
|
@@ -421,6 +527,7 @@ __all__ = [
|
|
|
421
527
|
"Passage",
|
|
422
528
|
"PaymentRequiredErrorBody",
|
|
423
529
|
"PipRequirement",
|
|
530
|
+
"PromptTokensDetails",
|
|
424
531
|
"Provider",
|
|
425
532
|
"ProviderCategory",
|
|
426
533
|
"ProviderTrace",
|
|
@@ -434,6 +541,7 @@ __all__ = [
|
|
|
434
541
|
"RoundRobinManager",
|
|
435
542
|
"RoundRobinManagerUpdate",
|
|
436
543
|
"Run",
|
|
544
|
+
"RunMetrics",
|
|
437
545
|
"RunStatus",
|
|
438
546
|
"SandboxConfig",
|
|
439
547
|
"SandboxConfigCreate",
|
|
@@ -475,16 +583,16 @@ __all__ = [
|
|
|
475
583
|
"ToolCallDelta",
|
|
476
584
|
"ToolCallMessage",
|
|
477
585
|
"ToolCallMessageToolCall",
|
|
586
|
+
"ToolCallMessageToolCalls",
|
|
478
587
|
"ToolCallNode",
|
|
479
588
|
"ToolCreate",
|
|
480
589
|
"ToolEnvVarSchema",
|
|
481
590
|
"ToolJsonSchema",
|
|
482
|
-
"ToolReturn",
|
|
483
591
|
"ToolReturnContent",
|
|
484
592
|
"ToolReturnMessage",
|
|
485
593
|
"ToolReturnMessageStatus",
|
|
486
|
-
"ToolReturnStatus",
|
|
487
594
|
"ToolType",
|
|
595
|
+
"TopLogprob",
|
|
488
596
|
"UpdateAssistantMessage",
|
|
489
597
|
"UpdateAssistantMessageContent",
|
|
490
598
|
"UpdateReasoningMessage",
|
|
@@ -49,6 +49,11 @@ class AgentEnvironmentVariable(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
|
agent_id: str = pydantic.Field()
|
|
53
58
|
"""
|
|
54
59
|
The ID of the agent this environment variable belongs to.
|
|
@@ -5,18 +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 .annotation_url_citation import AnnotationUrlCitation
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
class
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
properties: typing.Dict[str, typing.Optional[typing.Any]]
|
|
16
|
-
title: str
|
|
17
|
-
type: str
|
|
18
|
-
required: typing.Optional[typing.List[str]] = None
|
|
19
|
-
examples: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None
|
|
11
|
+
class Annotation(UncheckedBaseModel):
|
|
12
|
+
type: typing.Literal["url_citation"] = "url_citation"
|
|
13
|
+
url_citation: AnnotationUrlCitation
|
|
20
14
|
|
|
21
15
|
if IS_PYDANTIC_V2:
|
|
22
16
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -7,16 +7,11 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
7
7
|
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
properties: typing.Dict[str, typing.Optional[typing.Any]]
|
|
10
|
+
class AnnotationUrlCitation(UncheckedBaseModel):
|
|
11
|
+
end_index: int
|
|
12
|
+
start_index: int
|
|
16
13
|
title: str
|
|
17
|
-
|
|
18
|
-
required: typing.Optional[typing.List[str]] = None
|
|
19
|
-
examples: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None
|
|
14
|
+
url: str
|
|
20
15
|
|
|
21
16
|
if IS_PYDANTIC_V2:
|
|
22
17
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -5,6 +5,7 @@ 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 .approval_create_approvals_item import ApprovalCreateApprovalsItem
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class ApprovalCreate(UncheckedBaseModel):
|
|
@@ -17,12 +18,17 @@ class ApprovalCreate(UncheckedBaseModel):
|
|
|
17
18
|
The message type to be created.
|
|
18
19
|
"""
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
approvals: typing.Optional[typing.List[ApprovalCreateApprovalsItem]] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
The list of approval responses
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
approve: typing.Optional[bool] = pydantic.Field(default=None)
|
|
21
27
|
"""
|
|
22
28
|
Whether the tool has been approved
|
|
23
29
|
"""
|
|
24
30
|
|
|
25
|
-
approval_request_id: str = pydantic.Field()
|
|
31
|
+
approval_request_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
32
|
"""
|
|
27
33
|
The message ID of the approval request
|
|
28
34
|
"""
|
|
@@ -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_letta_message_tool_return import LettaSchemasLettaMessageToolReturn
|
|
7
|
+
|
|
8
|
+
ApprovalCreateApprovalsItem = typing.Union[ApprovalReturn, LettaSchemasLettaMessageToolReturn]
|
|
@@ -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 .approval_response_message_approvals_item import ApprovalResponseMessageApprovalsItem
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class ApprovalResponseMessage(UncheckedBaseModel):
|
|
@@ -31,12 +32,17 @@ class ApprovalResponseMessage(UncheckedBaseModel):
|
|
|
31
32
|
is_err: typing.Optional[bool] = None
|
|
32
33
|
seq_id: typing.Optional[int] = None
|
|
33
34
|
run_id: typing.Optional[str] = None
|
|
34
|
-
|
|
35
|
+
approvals: typing.Optional[typing.List[ApprovalResponseMessageApprovalsItem]] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
The list of approval responses
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
approve: typing.Optional[bool] = pydantic.Field(default=None)
|
|
35
41
|
"""
|
|
36
42
|
Whether the tool has been approved
|
|
37
43
|
"""
|
|
38
44
|
|
|
39
|
-
approval_request_id: str = pydantic.Field()
|
|
45
|
+
approval_request_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
40
46
|
"""
|
|
41
47
|
The message ID of the approval request
|
|
42
48
|
"""
|
|
@@ -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_letta_message_tool_return import LettaSchemasLettaMessageToolReturn
|
|
7
|
+
|
|
8
|
+
ApprovalResponseMessageApprovalsItem = typing.Union[ApprovalReturn, LettaSchemasLettaMessageToolReturn]
|
|
@@ -0,0 +1,34 @@
|
|
|
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 ApprovalReturn(UncheckedBaseModel):
|
|
11
|
+
type: typing.Literal["approval"] = "approval"
|
|
12
|
+
tool_call_id: str = pydantic.Field()
|
|
13
|
+
"""
|
|
14
|
+
The ID of the tool call that corresponds to this approval
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
approve: bool = pydantic.Field()
|
|
18
|
+
"""
|
|
19
|
+
Whether the tool has been approved
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
reason: typing.Optional[str] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
An optional explanation for the provided approval status
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
if IS_PYDANTIC_V2:
|
|
28
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
29
|
+
else:
|
|
30
|
+
|
|
31
|
+
class Config:
|
|
32
|
+
frozen = True
|
|
33
|
+
smart_union = True
|
|
34
|
+
extra = pydantic.Extra.allow
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
5
|
import pydantic
|
|
6
|
-
from
|
|
7
|
-
from
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
11
|
-
|
|
10
|
+
class Audio(UncheckedBaseModel):
|
|
11
|
+
id: str
|
|
12
12
|
|
|
13
13
|
if IS_PYDANTIC_V2:
|
|
14
14
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -0,0 +1,30 @@
|
|
|
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 .chat_completion_service_tier import ChatCompletionServiceTier
|
|
9
|
+
from .choice import Choice
|
|
10
|
+
from .completion_usage import CompletionUsage
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ChatCompletion(UncheckedBaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
choices: typing.List[Choice]
|
|
16
|
+
created: int
|
|
17
|
+
model: str
|
|
18
|
+
object: typing.Literal["chat.completion"] = "chat.completion"
|
|
19
|
+
service_tier: typing.Optional[ChatCompletionServiceTier] = None
|
|
20
|
+
system_fingerprint: typing.Optional[str] = None
|
|
21
|
+
usage: typing.Optional[CompletionUsage] = None
|
|
22
|
+
|
|
23
|
+
if IS_PYDANTIC_V2:
|
|
24
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
25
|
+
else:
|
|
26
|
+
|
|
27
|
+
class Config:
|
|
28
|
+
frozen = True
|
|
29
|
+
smart_union = True
|
|
30
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,30 @@
|
|
|
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 .audio import Audio
|
|
9
|
+
from .chat_completion_assistant_message_param_content import ChatCompletionAssistantMessageParamContent
|
|
10
|
+
from .chat_completion_assistant_message_param_tool_calls_item import ChatCompletionAssistantMessageParamToolCallsItem
|
|
11
|
+
from .function_call_input import FunctionCallInput
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ChatCompletionAssistantMessageParam(UncheckedBaseModel):
|
|
15
|
+
role: typing.Literal["assistant"] = "assistant"
|
|
16
|
+
audio: typing.Optional[Audio] = None
|
|
17
|
+
content: typing.Optional[ChatCompletionAssistantMessageParamContent] = None
|
|
18
|
+
function_call: typing.Optional[FunctionCallInput] = None
|
|
19
|
+
name: typing.Optional[str] = None
|
|
20
|
+
refusal: typing.Optional[str] = None
|
|
21
|
+
tool_calls: typing.Optional[typing.List[ChatCompletionAssistantMessageParamToolCallsItem]] = None
|
|
22
|
+
|
|
23
|
+
if IS_PYDANTIC_V2:
|
|
24
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
25
|
+
else:
|
|
26
|
+
|
|
27
|
+
class Config:
|
|
28
|
+
frozen = True
|
|
29
|
+
smart_union = True
|
|
30
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .chat_completion_assistant_message_param_content_item import ChatCompletionAssistantMessageParamContentItem
|
|
6
|
+
|
|
7
|
+
ChatCompletionAssistantMessageParamContent = typing.Union[
|
|
8
|
+
str, typing.List[ChatCompletionAssistantMessageParamContentItem]
|
|
9
|
+
]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .chat_completion_content_part_refusal_param import ChatCompletionContentPartRefusalParam
|
|
6
|
+
from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
|
|
7
|
+
|
|
8
|
+
ChatCompletionAssistantMessageParamContentItem = typing.Union[
|
|
9
|
+
ChatCompletionContentPartTextParam, ChatCompletionContentPartRefusalParam
|
|
10
|
+
]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .chat_completion_message_custom_tool_call_param import ChatCompletionMessageCustomToolCallParam
|
|
6
|
+
from .chat_completion_message_function_tool_call_param import ChatCompletionMessageFunctionToolCallParam
|
|
7
|
+
|
|
8
|
+
ChatCompletionAssistantMessageParamToolCallsItem = typing.Union[
|
|
9
|
+
ChatCompletionMessageFunctionToolCallParam, ChatCompletionMessageCustomToolCallParam
|
|
10
|
+
]
|