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
|
@@ -0,0 +1,23 @@
|
|
|
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 ChatCompletionAudio(UncheckedBaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
data: str
|
|
13
|
+
expires_at: int
|
|
14
|
+
transcript: str
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
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 import ImageUrl
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCompletionContentPartImageParam(UncheckedBaseModel):
|
|
12
|
+
image_url: ImageUrl
|
|
13
|
+
type: typing.Literal["image_url"] = "image_url"
|
|
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 import InputAudio
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCompletionContentPartInputAudioParam(UncheckedBaseModel):
|
|
12
|
+
input_audio: InputAudio
|
|
13
|
+
type: typing.Literal["input_audio"] = "input_audio"
|
|
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 ChatCompletionContentPartRefusalParam(UncheckedBaseModel):
|
|
11
|
+
refusal: str
|
|
12
|
+
type: typing.Literal["refusal"] = "refusal"
|
|
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 ChatCompletionContentPartTextParam(UncheckedBaseModel):
|
|
11
|
+
text: str
|
|
12
|
+
type: typing.Literal["text"] = "text"
|
|
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,23 @@
|
|
|
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_developer_message_param_content import ChatCompletionDeveloperMessageParamContent
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCompletionDeveloperMessageParam(UncheckedBaseModel):
|
|
12
|
+
content: ChatCompletionDeveloperMessageParamContent
|
|
13
|
+
role: typing.Literal["developer"] = "developer"
|
|
14
|
+
name: typing.Optional[str] = None
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
|
|
6
|
+
|
|
7
|
+
ChatCompletionDeveloperMessageParamContent = typing.Union[str, typing.List[ChatCompletionContentPartTextParam]]
|
|
@@ -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 ChatCompletionFunctionMessageParam(UncheckedBaseModel):
|
|
11
|
+
content: typing.Optional[str] = None
|
|
12
|
+
name: str
|
|
13
|
+
role: typing.Literal["function"] = "function"
|
|
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,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 .annotation import Annotation
|
|
9
|
+
from .chat_completion_audio import ChatCompletionAudio
|
|
10
|
+
from .chat_completion_message_tool_calls_item import ChatCompletionMessageToolCallsItem
|
|
11
|
+
from .function_call_output import FunctionCallOutput
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ChatCompletionMessage(UncheckedBaseModel):
|
|
15
|
+
content: typing.Optional[str] = None
|
|
16
|
+
refusal: typing.Optional[str] = None
|
|
17
|
+
role: typing.Literal["assistant"] = "assistant"
|
|
18
|
+
annotations: typing.Optional[typing.List[Annotation]] = None
|
|
19
|
+
audio: typing.Optional[ChatCompletionAudio] = None
|
|
20
|
+
function_call: typing.Optional[FunctionCallOutput] = None
|
|
21
|
+
tool_calls: typing.Optional[typing.List[ChatCompletionMessageToolCallsItem]] = 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,23 @@
|
|
|
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 .custom_output import CustomOutput
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCompletionMessageCustomToolCall(UncheckedBaseModel):
|
|
12
|
+
id: str
|
|
13
|
+
custom: CustomOutput
|
|
14
|
+
type: typing.Literal["custom"] = "custom"
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,23 @@
|
|
|
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 .custom_input import CustomInput
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCompletionMessageCustomToolCallParam(UncheckedBaseModel):
|
|
12
|
+
id: str
|
|
13
|
+
custom: CustomInput
|
|
14
|
+
type: typing.Literal["custom"] = "custom"
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
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 .openai_types_chat_chat_completion_message_function_tool_call_function import (
|
|
9
|
+
OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ChatCompletionMessageFunctionToolCallInput(UncheckedBaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
function: OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction
|
|
16
|
+
type: typing.Literal["function"] = "function"
|
|
17
|
+
|
|
18
|
+
if IS_PYDANTIC_V2:
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -5,12 +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 .function_output import FunctionOutput
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class ChatCompletionMessageFunctionToolCallOutput(UncheckedBaseModel):
|
|
12
12
|
id: str
|
|
13
|
-
function:
|
|
13
|
+
function: FunctionOutput
|
|
14
14
|
type: typing.Literal["function"] = "function"
|
|
15
15
|
|
|
16
16
|
if IS_PYDANTIC_V2:
|
|
@@ -0,0 +1,25 @@
|
|
|
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 .openai_types_chat_chat_completion_message_function_tool_call_param_function import (
|
|
9
|
+
OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ChatCompletionMessageFunctionToolCallParam(UncheckedBaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
function: OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction
|
|
16
|
+
type: typing.Literal["function"] = "function"
|
|
17
|
+
|
|
18
|
+
if IS_PYDANTIC_V2:
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -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 import ChatCompletionMessageCustomToolCall
|
|
6
|
+
from .chat_completion_message_function_tool_call_output import ChatCompletionMessageFunctionToolCallOutput
|
|
7
|
+
|
|
8
|
+
ChatCompletionMessageToolCallsItem = typing.Union[
|
|
9
|
+
ChatCompletionMessageFunctionToolCallOutput, ChatCompletionMessageCustomToolCall
|
|
10
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
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_system_message_param_content import ChatCompletionSystemMessageParamContent
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCompletionSystemMessageParam(UncheckedBaseModel):
|
|
12
|
+
content: ChatCompletionSystemMessageParamContent
|
|
13
|
+
role: typing.Literal["system"] = "system"
|
|
14
|
+
name: typing.Optional[str] = None
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
|
|
6
|
+
|
|
7
|
+
ChatCompletionSystemMessageParamContent = typing.Union[str, typing.List[ChatCompletionContentPartTextParam]]
|
|
@@ -0,0 +1,24 @@
|
|
|
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 .top_logprob import TopLogprob
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCompletionTokenLogprob(UncheckedBaseModel):
|
|
12
|
+
token: str
|
|
13
|
+
bytes: typing.Optional[typing.List[int]] = None
|
|
14
|
+
logprob: float
|
|
15
|
+
top_logprobs: typing.List[TopLogprob]
|
|
16
|
+
|
|
17
|
+
if IS_PYDANTIC_V2:
|
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
19
|
+
else:
|
|
20
|
+
|
|
21
|
+
class Config:
|
|
22
|
+
frozen = True
|
|
23
|
+
smart_union = True
|
|
24
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,23 @@
|
|
|
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_tool_message_param_content import ChatCompletionToolMessageParamContent
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCompletionToolMessageParam(UncheckedBaseModel):
|
|
12
|
+
content: ChatCompletionToolMessageParamContent
|
|
13
|
+
role: typing.Literal["tool"] = "tool"
|
|
14
|
+
tool_call_id: str
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
|
|
6
|
+
|
|
7
|
+
ChatCompletionToolMessageParamContent = typing.Union[str, typing.List[ChatCompletionContentPartTextParam]]
|
|
@@ -0,0 +1,23 @@
|
|
|
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_user_message_param_content import ChatCompletionUserMessageParamContent
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCompletionUserMessageParam(UncheckedBaseModel):
|
|
12
|
+
content: ChatCompletionUserMessageParamContent
|
|
13
|
+
role: typing.Literal["user"] = "user"
|
|
14
|
+
name: typing.Optional[str] = None
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .chat_completion_user_message_param_content_item import ChatCompletionUserMessageParamContentItem
|
|
6
|
+
|
|
7
|
+
ChatCompletionUserMessageParamContent = typing.Union[str, typing.List[ChatCompletionUserMessageParamContentItem]]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .chat_completion_content_part_image_param import ChatCompletionContentPartImageParam
|
|
6
|
+
from .chat_completion_content_part_input_audio_param import ChatCompletionContentPartInputAudioParam
|
|
7
|
+
from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
|
|
8
|
+
from .file import File
|
|
9
|
+
|
|
10
|
+
ChatCompletionUserMessageParamContentItem = typing.Union[
|
|
11
|
+
ChatCompletionContentPartTextParam,
|
|
12
|
+
ChatCompletionContentPartImageParam,
|
|
13
|
+
ChatCompletionContentPartInputAudioParam,
|
|
14
|
+
File,
|
|
15
|
+
]
|
|
@@ -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 .tool_call_node import ToolCallNode
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class ChildToolRule(UncheckedBaseModel):
|
|
@@ -28,6 +29,11 @@ class ChildToolRule(UncheckedBaseModel):
|
|
|
28
29
|
The children tools that can be invoked.
|
|
29
30
|
"""
|
|
30
31
|
|
|
32
|
+
child_arg_nodes: typing.Optional[typing.List[ToolCallNode]] = pydantic.Field(default=None)
|
|
33
|
+
"""
|
|
34
|
+
Optional list of typed child argument overrides. Each node must reference a child in 'children'.
|
|
35
|
+
"""
|
|
36
|
+
|
|
31
37
|
if IS_PYDANTIC_V2:
|
|
32
38
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
33
39
|
else:
|
|
@@ -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 .chat_completion_message import ChatCompletionMessage
|
|
9
|
+
from .choice_finish_reason import ChoiceFinishReason
|
|
10
|
+
from .choice_logprobs import ChoiceLogprobs
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Choice(UncheckedBaseModel):
|
|
14
|
+
finish_reason: ChoiceFinishReason
|
|
15
|
+
index: int
|
|
16
|
+
logprobs: typing.Optional[ChoiceLogprobs] = None
|
|
17
|
+
message: ChatCompletionMessage
|
|
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
|
|
@@ -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 .chat_completion_token_logprob import ChatCompletionTokenLogprob
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChoiceLogprobs(UncheckedBaseModel):
|
|
12
|
+
content: typing.Optional[typing.List[ChatCompletionTokenLogprob]] = None
|
|
13
|
+
refusal: typing.Optional[typing.List[ChatCompletionTokenLogprob]] = 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,23 @@
|
|
|
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 CompletionTokensDetails(UncheckedBaseModel):
|
|
11
|
+
accepted_prediction_tokens: typing.Optional[int] = None
|
|
12
|
+
audio_tokens: typing.Optional[int] = None
|
|
13
|
+
reasoning_tokens: typing.Optional[int] = None
|
|
14
|
+
rejected_prediction_tokens: typing.Optional[int] = None
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -5,21 +5,16 @@ 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 .completion_tokens_details import CompletionTokensDetails
|
|
9
|
+
from .prompt_tokens_details import PromptTokensDetails
|
|
8
10
|
|
|
9
11
|
|
|
10
|
-
class
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
display_name: typing.Optional[str] = None
|
|
17
|
-
description: str
|
|
18
|
-
type: str
|
|
19
|
-
default: typing.Optional[str] = None
|
|
20
|
-
required: typing.Optional[bool] = None
|
|
21
|
-
expected_from_customer: typing.Optional[bool] = None
|
|
22
|
-
get_current_user_endpoint: typing.Optional[str] = None
|
|
12
|
+
class CompletionUsage(UncheckedBaseModel):
|
|
13
|
+
completion_tokens: int
|
|
14
|
+
prompt_tokens: int
|
|
15
|
+
total_tokens: int
|
|
16
|
+
completion_tokens_details: typing.Optional[CompletionTokensDetails] = None
|
|
17
|
+
prompt_tokens_details: typing.Optional[PromptTokensDetails] = None
|
|
23
18
|
|
|
24
19
|
if IS_PYDANTIC_V2:
|
|
25
20
|
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 CustomInput(UncheckedBaseModel):
|
|
11
|
+
input: 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 CustomOutput(UncheckedBaseModel):
|
|
11
|
+
input: 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
|