blaxel 0.2.34__py3-none-any.whl → 0.2.35__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.
- blaxel/__init__.py +2 -2
- blaxel/core/client/api/agents/create_agent.py +64 -19
- blaxel/core/client/api/agents/delete_agent.py +44 -15
- blaxel/core/client/api/agents/get_agent.py +43 -14
- blaxel/core/client/api/agents/list_agents.py +40 -11
- blaxel/core/client/api/agents/update_agent.py +60 -19
- blaxel/core/client/api/compute/create_sandbox.py +60 -23
- blaxel/core/client/api/compute/delete_sandbox.py +40 -19
- blaxel/core/client/api/compute/get_sandbox.py +39 -18
- blaxel/core/client/api/compute/list_sandboxes.py +40 -19
- blaxel/core/client/api/compute/update_sandbox.py +56 -23
- blaxel/core/client/api/configurations/get_configuration.py +16 -4
- blaxel/core/client/api/customdomains/create_custom_domain.py +12 -0
- blaxel/core/client/api/customdomains/list_custom_domains.py +16 -4
- blaxel/core/client/api/default/get_template.py +8 -4
- blaxel/core/client/api/functions/create_function.py +62 -19
- blaxel/core/client/api/functions/delete_function.py +46 -15
- blaxel/core/client/api/functions/get_function.py +45 -14
- blaxel/core/client/api/functions/list_functions.py +44 -15
- blaxel/core/client/api/functions/update_function.py +62 -19
- blaxel/core/client/api/images/cleanup_images.py +12 -12
- blaxel/core/client/api/images/delete_image.py +12 -8
- blaxel/core/client/api/images/delete_image_tag.py +12 -8
- blaxel/core/client/api/images/get_image.py +12 -8
- blaxel/core/client/api/images/list_images.py +12 -8
- blaxel/core/client/api/integrations/create_integration_connection.py +56 -23
- blaxel/core/client/api/integrations/delete_integration_connection.py +48 -19
- blaxel/core/client/api/integrations/get_integration.py +12 -8
- blaxel/core/client/api/integrations/get_integration_connection.py +44 -19
- blaxel/core/client/api/integrations/get_integration_connection_model.py +2 -2
- blaxel/core/client/api/integrations/list_integration_connections.py +36 -19
- blaxel/core/client/api/integrations/update_integration_connection.py +52 -19
- blaxel/core/client/api/jobs/create_job.py +20 -12
- blaxel/core/client/api/jobs/create_job_execution.py +22 -16
- blaxel/core/client/api/jobs/delete_job.py +12 -8
- blaxel/core/client/api/jobs/delete_job_execution.py +12 -8
- blaxel/core/client/api/jobs/get_job.py +24 -20
- blaxel/core/client/api/jobs/get_job_execution.py +8 -4
- blaxel/core/client/api/jobs/list_job_executions.py +8 -4
- blaxel/core/client/api/jobs/list_jobs.py +12 -8
- blaxel/core/client/api/jobs/update_job.py +20 -12
- blaxel/core/client/api/locations/list_locations.py +12 -8
- blaxel/core/client/api/{default → mcphub}/list_mcp_hub_definitions.py +20 -4
- blaxel/core/client/api/models/create_model.py +52 -23
- blaxel/core/client/api/models/delete_model.py +40 -19
- blaxel/core/client/api/models/get_model.py +40 -19
- blaxel/core/client/api/models/list_models.py +40 -19
- blaxel/core/client/api/models/update_model.py +52 -23
- blaxel/core/client/api/policies/create_policy.py +12 -8
- blaxel/core/client/api/policies/delete_policy.py +12 -8
- blaxel/core/client/api/policies/get_policy.py +12 -8
- blaxel/core/client/api/policies/list_policies.py +12 -8
- blaxel/core/client/api/policies/update_policy.py +12 -8
- blaxel/core/client/api/public_ipslist/list_public_ips.py +37 -5
- blaxel/core/client/api/sandboxhub/__init__.py +0 -0
- blaxel/core/client/api/{default → sandboxhub}/list_sandbox_hub_definitions.py +20 -4
- blaxel/core/client/api/service_accounts/create_api_key_for_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/create_workspace_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/delete_api_key_for_service_account.py +6 -4
- blaxel/core/client/api/service_accounts/delete_workspace_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/get_workspace_service_accounts.py +12 -8
- blaxel/core/client/api/service_accounts/list_api_keys_for_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/update_workspace_service_account.py +8 -8
- blaxel/core/client/api/templates/list_templates.py +12 -8
- blaxel/core/client/api/volume_templates/create_volume_template.py +8 -4
- blaxel/core/client/api/volume_templates/list_volume_templates.py +8 -4
- blaxel/core/client/api/volumes/create_volume.py +56 -23
- blaxel/core/client/api/volumes/delete_volume.py +44 -19
- blaxel/core/client/api/volumes/get_volume.py +40 -19
- blaxel/core/client/api/volumes/list_volumes.py +40 -19
- blaxel/core/client/api/workspaces/create_workspace.py +54 -23
- blaxel/core/client/api/workspaces/delete_workspace.py +42 -19
- blaxel/core/client/api/workspaces/get_workspace.py +42 -19
- blaxel/core/client/api/workspaces/invite_workspace_user.py +8 -4
- blaxel/core/client/api/workspaces/list_workspace_users.py +12 -8
- blaxel/core/client/api/workspaces/list_workspaces.py +36 -19
- blaxel/core/client/api/workspaces/update_workspace.py +50 -19
- blaxel/core/client/models/__init__.py +76 -146
- blaxel/core/client/models/agent.py +43 -47
- blaxel/core/client/models/agent_runtime.py +139 -0
- blaxel/core/client/models/agent_runtime_generation.py +18 -0
- blaxel/core/client/models/agent_spec.py +33 -110
- blaxel/core/client/models/api_key.py +5 -4
- blaxel/core/client/models/core_event.py +5 -5
- blaxel/core/client/models/create_api_key_for_service_account_body.py +2 -1
- blaxel/core/client/models/create_job_execution_request.py +1 -1
- blaxel/core/client/models/create_job_execution_response.py +13 -9
- blaxel/core/client/models/custom_domain.py +19 -36
- blaxel/core/client/models/custom_domain_metadata.py +4 -3
- blaxel/core/client/models/custom_domain_spec.py +14 -5
- blaxel/core/client/models/custom_domain_spec_status.py +19 -0
- blaxel/core/client/models/entrypoint.py +39 -13
- blaxel/core/client/models/{workspace_labels.py → entrypoint_args_item.py} +6 -6
- blaxel/core/client/models/entrypoint_env.py +3 -3
- blaxel/core/client/models/{job_metrics_executions_total.py → entrypoint_super_gateway_args_item.py} +6 -6
- blaxel/core/client/models/{spec_configuration.py → env.py} +17 -8
- blaxel/core/{sandbox/client/models/welcome_response.py → client/models/error.py} +26 -23
- blaxel/core/client/models/expiration_policy.py +30 -11
- blaxel/core/client/models/expiration_policy_action.py +17 -0
- blaxel/core/client/models/expiration_policy_type.py +19 -0
- blaxel/core/client/models/flavor.py +13 -5
- blaxel/core/client/models/flavor_type.py +18 -0
- blaxel/core/client/models/form.py +6 -6
- blaxel/core/client/models/function.py +43 -47
- blaxel/core/client/models/function_runtime.py +138 -0
- blaxel/core/client/models/function_runtime_generation.py +18 -0
- blaxel/core/client/models/function_spec.py +27 -73
- blaxel/core/client/models/function_spec_transport.py +18 -0
- blaxel/core/client/models/image.py +19 -36
- blaxel/core/client/models/integration_connection.py +25 -39
- blaxel/core/client/models/integration_connection_spec.py +8 -5
- blaxel/core/client/models/integration_connection_spec_config.py +1 -1
- blaxel/core/client/models/integration_connection_spec_secret.py +1 -1
- blaxel/core/client/models/integration_endpoint.py +41 -11
- blaxel/core/client/models/integration_endpoint_ignore_models_item.py +45 -0
- blaxel/core/client/models/{mcp_definition_entrypoint.py → integration_endpoint_models_item.py} +6 -6
- blaxel/core/client/models/job.py +43 -47
- blaxel/core/client/models/job_execution.py +30 -37
- blaxel/core/client/models/job_execution_metadata.py +3 -3
- blaxel/core/client/models/job_execution_spec.py +2 -2
- blaxel/core/client/models/job_execution_stats.py +5 -5
- blaxel/core/client/models/job_execution_status.py +24 -0
- blaxel/core/client/models/job_execution_task.py +12 -4
- blaxel/core/client/models/job_execution_task_metadata.py +1 -1
- blaxel/core/client/models/job_execution_task_spec.py +2 -2
- blaxel/core/client/models/job_execution_task_status.py +23 -0
- blaxel/core/client/models/job_runtime.py +172 -0
- blaxel/core/client/models/job_runtime_generation.py +18 -0
- blaxel/core/client/models/job_spec.py +20 -88
- blaxel/core/client/models/location_response.py +5 -5
- blaxel/core/client/models/mcp_definition.py +30 -17
- blaxel/core/client/models/{job_metrics_tasks_total.py → mcp_definition_categories_item.py} +6 -6
- blaxel/core/client/models/metadata.py +23 -17
- blaxel/core/client/models/metadata_labels.py +4 -1
- blaxel/core/client/models/model.py +43 -47
- blaxel/core/client/models/model_runtime.py +99 -0
- blaxel/core/client/models/model_runtime_type.py +34 -0
- blaxel/core/client/models/model_spec.py +12 -58
- blaxel/core/client/models/o_auth.py +23 -6
- blaxel/core/client/models/{form_oauth.py → o_auth_scope_item.py} +6 -6
- blaxel/core/client/models/pending_invitation_accept.py +2 -1
- blaxel/core/client/models/pending_invitation_workspace_details.py +27 -6
- blaxel/core/client/models/{metrics_request_total_per_code.py → pending_invitation_workspace_details_emails_item.py} +6 -6
- blaxel/core/client/models/policy.py +20 -36
- blaxel/core/client/models/policy_location.py +13 -5
- blaxel/core/client/models/policy_location_type.py +19 -0
- blaxel/core/client/models/policy_max_tokens.py +6 -6
- blaxel/core/client/models/policy_resource_type.py +20 -0
- blaxel/core/client/models/policy_spec.py +31 -10
- blaxel/core/client/models/policy_spec_type.py +19 -0
- blaxel/core/client/models/port.py +25 -15
- blaxel/core/client/models/port_protocol.py +19 -0
- blaxel/core/client/models/preview.py +19 -36
- blaxel/core/client/models/preview_metadata.py +12 -10
- blaxel/core/client/models/preview_token.py +19 -36
- blaxel/core/client/models/preview_token_metadata.py +8 -6
- blaxel/core/client/models/repository.py +2 -2
- blaxel/core/client/models/revision_configuration.py +3 -3
- blaxel/core/client/models/sandbox.py +45 -58
- blaxel/core/client/models/sandbox_definition.py +37 -22
- blaxel/core/client/models/sandbox_definition_categories_item.py +45 -0
- blaxel/core/client/models/sandbox_error.py +148 -0
- blaxel/core/client/models/sandbox_error_details.py +45 -0
- blaxel/core/client/models/sandbox_lifecycle.py +3 -2
- blaxel/core/client/models/sandbox_runtime.py +145 -0
- blaxel/core/client/models/sandbox_spec.py +33 -134
- blaxel/core/client/models/status.py +25 -0
- blaxel/core/client/models/template.py +8 -7
- blaxel/core/client/models/template_variable.py +5 -5
- blaxel/core/client/models/trigger.py +14 -6
- blaxel/core/client/models/trigger_configuration.py +7 -6
- blaxel/core/client/models/trigger_type.py +19 -0
- blaxel/core/client/models/volume.py +35 -47
- blaxel/core/client/models/volume_attachment.py +6 -4
- blaxel/core/client/models/volume_spec.py +7 -4
- blaxel/core/client/models/volume_state.py +3 -3
- blaxel/core/client/models/volume_template.py +19 -33
- blaxel/core/client/models/volume_template_state.py +12 -4
- blaxel/core/client/models/volume_template_state_status.py +19 -0
- blaxel/core/client/models/volume_template_version.py +12 -4
- blaxel/core/client/models/volume_template_version_status.py +19 -0
- blaxel/core/client/models/workspace.py +35 -25
- blaxel/core/client/models/workspace_runtime.py +3 -2
- blaxel/core/client/models/workspace_status.py +22 -0
- blaxel/core/common/__init__.py +1 -1
- blaxel/core/jobs/__init__.py +0 -1
- blaxel/core/sandbox/__init__.py +2 -0
- blaxel/core/sandbox/client/api/process/post_process.py +8 -4
- blaxel/core/sandbox/client/models/__init__.py +0 -2
- blaxel/core/sandbox/client/models/process_response.py +16 -0
- blaxel/core/sandbox/client/models/process_response_status.py +9 -0
- blaxel/core/sandbox/default/__init__.py +2 -0
- blaxel/core/sandbox/default/interpreter.py +5 -1
- blaxel/core/sandbox/default/preview.py +3 -1
- blaxel/core/sandbox/default/sandbox.py +51 -16
- blaxel/core/sandbox/sync/process.py +2 -1
- blaxel/core/sandbox/sync/sandbox.py +34 -13
- blaxel/core/tools/common.py +16 -2
- blaxel/core/volume/__init__.py +2 -2
- blaxel/core/volume/volume.py +32 -10
- blaxel/langgraph/tools.py +34 -2
- blaxel/openai/tools.py +33 -1
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/METADATA +3 -3
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/RECORD +207 -246
- blaxel/core/client/models/acl.py +0 -133
- blaxel/core/client/models/billable_time_metric.py +0 -89
- blaxel/core/client/models/core_spec.py +0 -194
- blaxel/core/client/models/core_spec_configurations.py +0 -77
- blaxel/core/client/models/histogram_bucket.py +0 -79
- blaxel/core/client/models/histogram_stats.py +0 -88
- blaxel/core/client/models/integration_model.py +0 -162
- blaxel/core/client/models/job_execution_config.py +0 -79
- blaxel/core/client/models/job_metrics.py +0 -262
- blaxel/core/client/models/jobs_chart_value.py +0 -70
- blaxel/core/client/models/jobs_network_chart.py +0 -102
- blaxel/core/client/models/jobs_success_failed_chart.py +0 -147
- blaxel/core/client/models/jobs_total.py +0 -88
- blaxel/core/client/models/last_n_requests_metric.py +0 -97
- blaxel/core/client/models/latency_metric.py +0 -148
- blaxel/core/client/models/logs_response.py +0 -63
- blaxel/core/client/models/logs_response_data.py +0 -99
- blaxel/core/client/models/mcp_definition_form.py +0 -45
- blaxel/core/client/models/memory_allocation_by_name.py +0 -70
- blaxel/core/client/models/memory_allocation_metric.py +0 -61
- blaxel/core/client/models/metric.py +0 -79
- blaxel/core/client/models/metrics.py +0 -273
- blaxel/core/client/models/metrics_models.py +0 -45
- blaxel/core/client/models/metrics_rps_per_code.py +0 -45
- blaxel/core/client/models/pod_template_spec.py +0 -45
- blaxel/core/client/models/request_duration_over_time_metric.py +0 -97
- blaxel/core/client/models/request_duration_over_time_metrics.py +0 -84
- blaxel/core/client/models/request_total_by_origin_metric.py +0 -129
- blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin.py +0 -45
- blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +0 -45
- blaxel/core/client/models/request_total_metric.py +0 -155
- blaxel/core/client/models/request_total_metric_request_total_per_code.py +0 -45
- blaxel/core/client/models/request_total_metric_rps_per_code.py +0 -45
- blaxel/core/client/models/request_total_response_data.py +0 -97
- blaxel/core/client/models/resource.py +0 -99
- blaxel/core/client/models/resource_log.py +0 -88
- blaxel/core/client/models/resource_log_chart.py +0 -133
- blaxel/core/client/models/resource_log_response.py +0 -83
- blaxel/core/client/models/resource_metrics.py +0 -618
- blaxel/core/client/models/resource_metrics_request_total_per_code.py +0 -45
- blaxel/core/client/models/resource_metrics_request_total_per_code_previous.py +0 -45
- blaxel/core/client/models/resource_metrics_rps_per_code.py +0 -45
- blaxel/core/client/models/resource_metrics_rps_per_code_previous.py +0 -45
- blaxel/core/client/models/resource_trace.py +0 -97
- blaxel/core/client/models/runtime.py +0 -317
- blaxel/core/client/models/runtime_configuration.py +0 -45
- blaxel/core/client/models/runtime_startup_probe.py +0 -45
- blaxel/core/client/models/sandbox_metrics.py +0 -88
- blaxel/core/client/models/serverless_config.py +0 -117
- blaxel/core/client/models/serverless_config_configuration.py +0 -45
- blaxel/core/client/models/start_sandbox.py +0 -98
- blaxel/core/client/models/stop_sandbox.py +0 -98
- blaxel/core/client/models/store_agent.py +0 -181
- blaxel/core/client/models/store_agent_labels.py +0 -45
- blaxel/core/client/models/store_configuration.py +0 -156
- blaxel/core/client/models/store_configuration_option.py +0 -79
- blaxel/core/client/models/time_to_first_token_over_time_metrics.py +0 -87
- blaxel/core/client/models/token_rate_metric.py +0 -106
- blaxel/core/client/models/token_rate_metrics.py +0 -124
- blaxel/core/client/models/token_total_metric.py +0 -112
- blaxel/core/client/models/trace_ids_response.py +0 -45
- blaxel/core/client/models/websocket_channel.py +0 -97
- blaxel/core/client/models/websocket_message.py +0 -106
- blaxel/core/sandbox/client/api/root/delete.py +0 -130
- blaxel/core/sandbox/client/api/root/get.py +0 -130
- blaxel/core/sandbox/client/api/root/options.py +0 -130
- blaxel/core/sandbox/client/api/root/patch.py +0 -130
- blaxel/core/sandbox/client/api/root/post.py +0 -130
- blaxel/core/sandbox/client/api/root/put.py +0 -130
- /blaxel/core/{sandbox/client/api/root → client/api/mcphub}/__init__.py +0 -0
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/WHEEL +0 -0
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
from ..types import UNSET, Unset
|
|
7
|
-
|
|
8
|
-
if TYPE_CHECKING:
|
|
9
|
-
from ..models.store_configuration_option import StoreConfigurationOption
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
T = TypeVar("T", bound="StoreConfiguration")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@_attrs_define
|
|
16
|
-
class StoreConfiguration:
|
|
17
|
-
"""Store configuration for resources (eg: agent, function, etc)
|
|
18
|
-
|
|
19
|
-
Attributes:
|
|
20
|
-
available_models (Union[Unset, list[str]]): Available models for the configuration
|
|
21
|
-
description (Union[Unset, str]): Store configuration description
|
|
22
|
-
display_name (Union[Unset, str]): Store configuration display name
|
|
23
|
-
if_ (Union[Unset, str]): Conditional rendering for the configuration, example: provider === 'openai'
|
|
24
|
-
name (Union[Unset, str]): Store configuration name
|
|
25
|
-
options (Union[Unset, list['StoreConfigurationOption']]):
|
|
26
|
-
required (Union[Unset, bool]): Store configuration required
|
|
27
|
-
secret (Union[Unset, bool]): Store configuration secret
|
|
28
|
-
type_ (Union[Unset, str]): Store configuration type
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
available_models: Union[Unset, list[str]] = UNSET
|
|
32
|
-
description: Union[Unset, str] = UNSET
|
|
33
|
-
display_name: Union[Unset, str] = UNSET
|
|
34
|
-
if_: Union[Unset, str] = UNSET
|
|
35
|
-
name: Union[Unset, str] = UNSET
|
|
36
|
-
options: Union[Unset, list["StoreConfigurationOption"]] = UNSET
|
|
37
|
-
required: Union[Unset, bool] = UNSET
|
|
38
|
-
secret: Union[Unset, bool] = UNSET
|
|
39
|
-
type_: Union[Unset, str] = UNSET
|
|
40
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
41
|
-
|
|
42
|
-
def to_dict(self) -> dict[str, Any]:
|
|
43
|
-
available_models: Union[Unset, list[str]] = UNSET
|
|
44
|
-
if not isinstance(self.available_models, Unset):
|
|
45
|
-
available_models = self.available_models
|
|
46
|
-
|
|
47
|
-
description = self.description
|
|
48
|
-
|
|
49
|
-
display_name = self.display_name
|
|
50
|
-
|
|
51
|
-
if_ = self.if_
|
|
52
|
-
|
|
53
|
-
name = self.name
|
|
54
|
-
|
|
55
|
-
options: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
56
|
-
if not isinstance(self.options, Unset):
|
|
57
|
-
options = []
|
|
58
|
-
for options_item_data in self.options:
|
|
59
|
-
if type(options_item_data) is dict:
|
|
60
|
-
options_item = options_item_data
|
|
61
|
-
else:
|
|
62
|
-
options_item = options_item_data.to_dict()
|
|
63
|
-
options.append(options_item)
|
|
64
|
-
|
|
65
|
-
required = self.required
|
|
66
|
-
|
|
67
|
-
secret = self.secret
|
|
68
|
-
|
|
69
|
-
type_ = self.type_
|
|
70
|
-
|
|
71
|
-
field_dict: dict[str, Any] = {}
|
|
72
|
-
field_dict.update(self.additional_properties)
|
|
73
|
-
field_dict.update({})
|
|
74
|
-
if available_models is not UNSET:
|
|
75
|
-
field_dict["availableModels"] = available_models
|
|
76
|
-
if description is not UNSET:
|
|
77
|
-
field_dict["description"] = description
|
|
78
|
-
if display_name is not UNSET:
|
|
79
|
-
field_dict["displayName"] = display_name
|
|
80
|
-
if if_ is not UNSET:
|
|
81
|
-
field_dict["if"] = if_
|
|
82
|
-
if name is not UNSET:
|
|
83
|
-
field_dict["name"] = name
|
|
84
|
-
if options is not UNSET:
|
|
85
|
-
field_dict["options"] = options
|
|
86
|
-
if required is not UNSET:
|
|
87
|
-
field_dict["required"] = required
|
|
88
|
-
if secret is not UNSET:
|
|
89
|
-
field_dict["secret"] = secret
|
|
90
|
-
if type_ is not UNSET:
|
|
91
|
-
field_dict["type"] = type_
|
|
92
|
-
|
|
93
|
-
return field_dict
|
|
94
|
-
|
|
95
|
-
@classmethod
|
|
96
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
97
|
-
from ..models.store_configuration_option import StoreConfigurationOption
|
|
98
|
-
|
|
99
|
-
if not src_dict:
|
|
100
|
-
return None
|
|
101
|
-
d = src_dict.copy()
|
|
102
|
-
available_models = cast(
|
|
103
|
-
list[str], d.pop("availableModels", d.pop("available_models", UNSET))
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
description = d.pop("description", UNSET)
|
|
107
|
-
|
|
108
|
-
display_name = d.pop("displayName", d.pop("display_name", UNSET))
|
|
109
|
-
|
|
110
|
-
if_ = d.pop("if", d.pop("if_", UNSET))
|
|
111
|
-
|
|
112
|
-
name = d.pop("name", UNSET)
|
|
113
|
-
|
|
114
|
-
options = []
|
|
115
|
-
_options = d.pop("options", UNSET)
|
|
116
|
-
for options_item_data in _options or []:
|
|
117
|
-
options_item = StoreConfigurationOption.from_dict(options_item_data)
|
|
118
|
-
|
|
119
|
-
options.append(options_item)
|
|
120
|
-
|
|
121
|
-
required = d.pop("required", UNSET)
|
|
122
|
-
|
|
123
|
-
secret = d.pop("secret", UNSET)
|
|
124
|
-
|
|
125
|
-
type_ = d.pop("type", d.pop("type_", UNSET))
|
|
126
|
-
|
|
127
|
-
store_configuration = cls(
|
|
128
|
-
available_models=available_models,
|
|
129
|
-
description=description,
|
|
130
|
-
display_name=display_name,
|
|
131
|
-
if_=if_,
|
|
132
|
-
name=name,
|
|
133
|
-
options=options,
|
|
134
|
-
required=required,
|
|
135
|
-
secret=secret,
|
|
136
|
-
type_=type_,
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
store_configuration.additional_properties = d
|
|
140
|
-
return store_configuration
|
|
141
|
-
|
|
142
|
-
@property
|
|
143
|
-
def additional_keys(self) -> list[str]:
|
|
144
|
-
return list(self.additional_properties.keys())
|
|
145
|
-
|
|
146
|
-
def __getitem__(self, key: str) -> Any:
|
|
147
|
-
return self.additional_properties[key]
|
|
148
|
-
|
|
149
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
150
|
-
self.additional_properties[key] = value
|
|
151
|
-
|
|
152
|
-
def __delitem__(self, key: str) -> None:
|
|
153
|
-
del self.additional_properties[key]
|
|
154
|
-
|
|
155
|
-
def __contains__(self, key: str) -> bool:
|
|
156
|
-
return key in self.additional_properties
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
from typing import Any, TypeVar, Union
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
from ..types import UNSET, Unset
|
|
7
|
-
|
|
8
|
-
T = TypeVar("T", bound="StoreConfigurationOption")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@_attrs_define
|
|
12
|
-
class StoreConfigurationOption:
|
|
13
|
-
"""Store configuration options for a select type configuration
|
|
14
|
-
|
|
15
|
-
Attributes:
|
|
16
|
-
if_ (Union[Unset, str]): Conditional rendering for the configuration option, example: provider === 'openai'
|
|
17
|
-
label (Union[Unset, str]): Store configuration option label
|
|
18
|
-
value (Union[Unset, str]): Store configuration option value
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
if_: Union[Unset, str] = UNSET
|
|
22
|
-
label: Union[Unset, str] = UNSET
|
|
23
|
-
value: Union[Unset, str] = UNSET
|
|
24
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
-
|
|
26
|
-
def to_dict(self) -> dict[str, Any]:
|
|
27
|
-
if_ = self.if_
|
|
28
|
-
|
|
29
|
-
label = self.label
|
|
30
|
-
|
|
31
|
-
value = self.value
|
|
32
|
-
|
|
33
|
-
field_dict: dict[str, Any] = {}
|
|
34
|
-
field_dict.update(self.additional_properties)
|
|
35
|
-
field_dict.update({})
|
|
36
|
-
if if_ is not UNSET:
|
|
37
|
-
field_dict["if"] = if_
|
|
38
|
-
if label is not UNSET:
|
|
39
|
-
field_dict["label"] = label
|
|
40
|
-
if value is not UNSET:
|
|
41
|
-
field_dict["value"] = value
|
|
42
|
-
|
|
43
|
-
return field_dict
|
|
44
|
-
|
|
45
|
-
@classmethod
|
|
46
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
47
|
-
if not src_dict:
|
|
48
|
-
return None
|
|
49
|
-
d = src_dict.copy()
|
|
50
|
-
if_ = d.pop("if", d.pop("if_", UNSET))
|
|
51
|
-
|
|
52
|
-
label = d.pop("label", UNSET)
|
|
53
|
-
|
|
54
|
-
value = d.pop("value", UNSET)
|
|
55
|
-
|
|
56
|
-
store_configuration_option = cls(
|
|
57
|
-
if_=if_,
|
|
58
|
-
label=label,
|
|
59
|
-
value=value,
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
store_configuration_option.additional_properties = d
|
|
63
|
-
return store_configuration_option
|
|
64
|
-
|
|
65
|
-
@property
|
|
66
|
-
def additional_keys(self) -> list[str]:
|
|
67
|
-
return list(self.additional_properties.keys())
|
|
68
|
-
|
|
69
|
-
def __getitem__(self, key: str) -> Any:
|
|
70
|
-
return self.additional_properties[key]
|
|
71
|
-
|
|
72
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
73
|
-
self.additional_properties[key] = value
|
|
74
|
-
|
|
75
|
-
def __delitem__(self, key: str) -> None:
|
|
76
|
-
del self.additional_properties[key]
|
|
77
|
-
|
|
78
|
-
def __contains__(self, key: str) -> bool:
|
|
79
|
-
return key in self.additional_properties
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
from ..types import UNSET, Unset
|
|
7
|
-
|
|
8
|
-
if TYPE_CHECKING:
|
|
9
|
-
from ..models.request_duration_over_time_metric import RequestDurationOverTimeMetric
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
T = TypeVar("T", bound="TimeToFirstTokenOverTimeMetrics")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@_attrs_define
|
|
16
|
-
class TimeToFirstTokenOverTimeMetrics:
|
|
17
|
-
"""Time to first token over time metrics
|
|
18
|
-
|
|
19
|
-
Attributes:
|
|
20
|
-
time_to_first_token_over_time (Union[Unset, list['RequestDurationOverTimeMetric']]): Time to first token over
|
|
21
|
-
time
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
time_to_first_token_over_time: Union[Unset, list["RequestDurationOverTimeMetric"]] = UNSET
|
|
25
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
-
|
|
27
|
-
def to_dict(self) -> dict[str, Any]:
|
|
28
|
-
time_to_first_token_over_time: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
29
|
-
if not isinstance(self.time_to_first_token_over_time, Unset):
|
|
30
|
-
time_to_first_token_over_time = []
|
|
31
|
-
for time_to_first_token_over_time_item_data in self.time_to_first_token_over_time:
|
|
32
|
-
if type(time_to_first_token_over_time_item_data) is dict:
|
|
33
|
-
time_to_first_token_over_time_item = time_to_first_token_over_time_item_data
|
|
34
|
-
else:
|
|
35
|
-
time_to_first_token_over_time_item = (
|
|
36
|
-
time_to_first_token_over_time_item_data.to_dict()
|
|
37
|
-
)
|
|
38
|
-
time_to_first_token_over_time.append(time_to_first_token_over_time_item)
|
|
39
|
-
|
|
40
|
-
field_dict: dict[str, Any] = {}
|
|
41
|
-
field_dict.update(self.additional_properties)
|
|
42
|
-
field_dict.update({})
|
|
43
|
-
if time_to_first_token_over_time is not UNSET:
|
|
44
|
-
field_dict["timeToFirstTokenOverTime"] = time_to_first_token_over_time
|
|
45
|
-
|
|
46
|
-
return field_dict
|
|
47
|
-
|
|
48
|
-
@classmethod
|
|
49
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
50
|
-
from ..models.request_duration_over_time_metric import RequestDurationOverTimeMetric
|
|
51
|
-
|
|
52
|
-
if not src_dict:
|
|
53
|
-
return None
|
|
54
|
-
d = src_dict.copy()
|
|
55
|
-
time_to_first_token_over_time = []
|
|
56
|
-
_time_to_first_token_over_time = d.pop(
|
|
57
|
-
"timeToFirstTokenOverTime", d.pop("time_to_first_token_over_time", UNSET)
|
|
58
|
-
)
|
|
59
|
-
for time_to_first_token_over_time_item_data in _time_to_first_token_over_time or []:
|
|
60
|
-
time_to_first_token_over_time_item = RequestDurationOverTimeMetric.from_dict(
|
|
61
|
-
time_to_first_token_over_time_item_data
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
time_to_first_token_over_time.append(time_to_first_token_over_time_item)
|
|
65
|
-
|
|
66
|
-
time_to_first_token_over_time_metrics = cls(
|
|
67
|
-
time_to_first_token_over_time=time_to_first_token_over_time,
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
time_to_first_token_over_time_metrics.additional_properties = d
|
|
71
|
-
return time_to_first_token_over_time_metrics
|
|
72
|
-
|
|
73
|
-
@property
|
|
74
|
-
def additional_keys(self) -> list[str]:
|
|
75
|
-
return list(self.additional_properties.keys())
|
|
76
|
-
|
|
77
|
-
def __getitem__(self, key: str) -> Any:
|
|
78
|
-
return self.additional_properties[key]
|
|
79
|
-
|
|
80
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
81
|
-
self.additional_properties[key] = value
|
|
82
|
-
|
|
83
|
-
def __delitem__(self, key: str) -> None:
|
|
84
|
-
del self.additional_properties[key]
|
|
85
|
-
|
|
86
|
-
def __contains__(self, key: str) -> bool:
|
|
87
|
-
return key in self.additional_properties
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
from typing import Any, TypeVar, Union
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
from ..types import UNSET, Unset
|
|
7
|
-
|
|
8
|
-
T = TypeVar("T", bound="TokenRateMetric")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@_attrs_define
|
|
12
|
-
class TokenRateMetric:
|
|
13
|
-
"""Token rate metric
|
|
14
|
-
|
|
15
|
-
Attributes:
|
|
16
|
-
model (Union[Unset, str]): Model ID
|
|
17
|
-
provider (Union[Unset, str]): Provider name
|
|
18
|
-
provider_name (Union[Unset, str]): Provider integration name
|
|
19
|
-
timestamp (Union[Unset, str]): Timestamp
|
|
20
|
-
token_total (Union[Unset, float]): Total tokens
|
|
21
|
-
trend (Union[Unset, float]): Trend
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
model: Union[Unset, str] = UNSET
|
|
25
|
-
provider: Union[Unset, str] = UNSET
|
|
26
|
-
provider_name: Union[Unset, str] = UNSET
|
|
27
|
-
timestamp: Union[Unset, str] = UNSET
|
|
28
|
-
token_total: Union[Unset, float] = UNSET
|
|
29
|
-
trend: Union[Unset, float] = UNSET
|
|
30
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
-
|
|
32
|
-
def to_dict(self) -> dict[str, Any]:
|
|
33
|
-
model = self.model
|
|
34
|
-
|
|
35
|
-
provider = self.provider
|
|
36
|
-
|
|
37
|
-
provider_name = self.provider_name
|
|
38
|
-
|
|
39
|
-
timestamp = self.timestamp
|
|
40
|
-
|
|
41
|
-
token_total = self.token_total
|
|
42
|
-
|
|
43
|
-
trend = self.trend
|
|
44
|
-
|
|
45
|
-
field_dict: dict[str, Any] = {}
|
|
46
|
-
field_dict.update(self.additional_properties)
|
|
47
|
-
field_dict.update({})
|
|
48
|
-
if model is not UNSET:
|
|
49
|
-
field_dict["model"] = model
|
|
50
|
-
if provider is not UNSET:
|
|
51
|
-
field_dict["provider"] = provider
|
|
52
|
-
if provider_name is not UNSET:
|
|
53
|
-
field_dict["providerName"] = provider_name
|
|
54
|
-
if timestamp is not UNSET:
|
|
55
|
-
field_dict["timestamp"] = timestamp
|
|
56
|
-
if token_total is not UNSET:
|
|
57
|
-
field_dict["tokenTotal"] = token_total
|
|
58
|
-
if trend is not UNSET:
|
|
59
|
-
field_dict["trend"] = trend
|
|
60
|
-
|
|
61
|
-
return field_dict
|
|
62
|
-
|
|
63
|
-
@classmethod
|
|
64
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
65
|
-
if not src_dict:
|
|
66
|
-
return None
|
|
67
|
-
d = src_dict.copy()
|
|
68
|
-
model = d.pop("model", UNSET)
|
|
69
|
-
|
|
70
|
-
provider = d.pop("provider", UNSET)
|
|
71
|
-
|
|
72
|
-
provider_name = d.pop("providerName", d.pop("provider_name", UNSET))
|
|
73
|
-
|
|
74
|
-
timestamp = d.pop("timestamp", UNSET)
|
|
75
|
-
|
|
76
|
-
token_total = d.pop("tokenTotal", d.pop("token_total", UNSET))
|
|
77
|
-
|
|
78
|
-
trend = d.pop("trend", UNSET)
|
|
79
|
-
|
|
80
|
-
token_rate_metric = cls(
|
|
81
|
-
model=model,
|
|
82
|
-
provider=provider,
|
|
83
|
-
provider_name=provider_name,
|
|
84
|
-
timestamp=timestamp,
|
|
85
|
-
token_total=token_total,
|
|
86
|
-
trend=trend,
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
token_rate_metric.additional_properties = d
|
|
90
|
-
return token_rate_metric
|
|
91
|
-
|
|
92
|
-
@property
|
|
93
|
-
def additional_keys(self) -> list[str]:
|
|
94
|
-
return list(self.additional_properties.keys())
|
|
95
|
-
|
|
96
|
-
def __getitem__(self, key: str) -> Any:
|
|
97
|
-
return self.additional_properties[key]
|
|
98
|
-
|
|
99
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
100
|
-
self.additional_properties[key] = value
|
|
101
|
-
|
|
102
|
-
def __delitem__(self, key: str) -> None:
|
|
103
|
-
del self.additional_properties[key]
|
|
104
|
-
|
|
105
|
-
def __contains__(self, key: str) -> bool:
|
|
106
|
-
return key in self.additional_properties
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
from ..types import UNSET, Unset
|
|
7
|
-
|
|
8
|
-
if TYPE_CHECKING:
|
|
9
|
-
from ..models.token_rate_metric import TokenRateMetric
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
T = TypeVar("T", bound="TokenRateMetrics")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@_attrs_define
|
|
16
|
-
class TokenRateMetrics:
|
|
17
|
-
"""Token rate metrics
|
|
18
|
-
|
|
19
|
-
Attributes:
|
|
20
|
-
token_rate (Union[Unset, list['TokenRateMetric']]): Token rate
|
|
21
|
-
token_rate_input (Union[Unset, list['TokenRateMetric']]): Token rate input
|
|
22
|
-
token_rate_output (Union[Unset, list['TokenRateMetric']]): Token rate output
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
token_rate: Union[Unset, list["TokenRateMetric"]] = UNSET
|
|
26
|
-
token_rate_input: Union[Unset, list["TokenRateMetric"]] = UNSET
|
|
27
|
-
token_rate_output: Union[Unset, list["TokenRateMetric"]] = UNSET
|
|
28
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
-
|
|
30
|
-
def to_dict(self) -> dict[str, Any]:
|
|
31
|
-
token_rate: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
32
|
-
if not isinstance(self.token_rate, Unset):
|
|
33
|
-
token_rate = []
|
|
34
|
-
for token_rate_item_data in self.token_rate:
|
|
35
|
-
if type(token_rate_item_data) is dict:
|
|
36
|
-
token_rate_item = token_rate_item_data
|
|
37
|
-
else:
|
|
38
|
-
token_rate_item = token_rate_item_data.to_dict()
|
|
39
|
-
token_rate.append(token_rate_item)
|
|
40
|
-
|
|
41
|
-
token_rate_input: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
42
|
-
if not isinstance(self.token_rate_input, Unset):
|
|
43
|
-
token_rate_input = []
|
|
44
|
-
for token_rate_input_item_data in self.token_rate_input:
|
|
45
|
-
if type(token_rate_input_item_data) is dict:
|
|
46
|
-
token_rate_input_item = token_rate_input_item_data
|
|
47
|
-
else:
|
|
48
|
-
token_rate_input_item = token_rate_input_item_data.to_dict()
|
|
49
|
-
token_rate_input.append(token_rate_input_item)
|
|
50
|
-
|
|
51
|
-
token_rate_output: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
52
|
-
if not isinstance(self.token_rate_output, Unset):
|
|
53
|
-
token_rate_output = []
|
|
54
|
-
for token_rate_output_item_data in self.token_rate_output:
|
|
55
|
-
if type(token_rate_output_item_data) is dict:
|
|
56
|
-
token_rate_output_item = token_rate_output_item_data
|
|
57
|
-
else:
|
|
58
|
-
token_rate_output_item = token_rate_output_item_data.to_dict()
|
|
59
|
-
token_rate_output.append(token_rate_output_item)
|
|
60
|
-
|
|
61
|
-
field_dict: dict[str, Any] = {}
|
|
62
|
-
field_dict.update(self.additional_properties)
|
|
63
|
-
field_dict.update({})
|
|
64
|
-
if token_rate is not UNSET:
|
|
65
|
-
field_dict["tokenRate"] = token_rate
|
|
66
|
-
if token_rate_input is not UNSET:
|
|
67
|
-
field_dict["tokenRateInput"] = token_rate_input
|
|
68
|
-
if token_rate_output is not UNSET:
|
|
69
|
-
field_dict["tokenRateOutput"] = token_rate_output
|
|
70
|
-
|
|
71
|
-
return field_dict
|
|
72
|
-
|
|
73
|
-
@classmethod
|
|
74
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
75
|
-
from ..models.token_rate_metric import TokenRateMetric
|
|
76
|
-
|
|
77
|
-
if not src_dict:
|
|
78
|
-
return None
|
|
79
|
-
d = src_dict.copy()
|
|
80
|
-
token_rate = []
|
|
81
|
-
_token_rate = d.pop("tokenRate", d.pop("token_rate", UNSET))
|
|
82
|
-
for token_rate_item_data in _token_rate or []:
|
|
83
|
-
token_rate_item = TokenRateMetric.from_dict(token_rate_item_data)
|
|
84
|
-
|
|
85
|
-
token_rate.append(token_rate_item)
|
|
86
|
-
|
|
87
|
-
token_rate_input = []
|
|
88
|
-
_token_rate_input = d.pop("tokenRateInput", d.pop("token_rate_input", UNSET))
|
|
89
|
-
for token_rate_input_item_data in _token_rate_input or []:
|
|
90
|
-
token_rate_input_item = TokenRateMetric.from_dict(token_rate_input_item_data)
|
|
91
|
-
|
|
92
|
-
token_rate_input.append(token_rate_input_item)
|
|
93
|
-
|
|
94
|
-
token_rate_output = []
|
|
95
|
-
_token_rate_output = d.pop("tokenRateOutput", d.pop("token_rate_output", UNSET))
|
|
96
|
-
for token_rate_output_item_data in _token_rate_output or []:
|
|
97
|
-
token_rate_output_item = TokenRateMetric.from_dict(token_rate_output_item_data)
|
|
98
|
-
|
|
99
|
-
token_rate_output.append(token_rate_output_item)
|
|
100
|
-
|
|
101
|
-
token_rate_metrics = cls(
|
|
102
|
-
token_rate=token_rate,
|
|
103
|
-
token_rate_input=token_rate_input,
|
|
104
|
-
token_rate_output=token_rate_output,
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
token_rate_metrics.additional_properties = d
|
|
108
|
-
return token_rate_metrics
|
|
109
|
-
|
|
110
|
-
@property
|
|
111
|
-
def additional_keys(self) -> list[str]:
|
|
112
|
-
return list(self.additional_properties.keys())
|
|
113
|
-
|
|
114
|
-
def __getitem__(self, key: str) -> Any:
|
|
115
|
-
return self.additional_properties[key]
|
|
116
|
-
|
|
117
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
118
|
-
self.additional_properties[key] = value
|
|
119
|
-
|
|
120
|
-
def __delitem__(self, key: str) -> None:
|
|
121
|
-
del self.additional_properties[key]
|
|
122
|
-
|
|
123
|
-
def __contains__(self, key: str) -> bool:
|
|
124
|
-
return key in self.additional_properties
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
from typing import Any, TypeVar, Union
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
from ..types import UNSET, Unset
|
|
7
|
-
|
|
8
|
-
T = TypeVar("T", bound="TokenTotalMetric")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@_attrs_define
|
|
12
|
-
class TokenTotalMetric:
|
|
13
|
-
"""Token total metric
|
|
14
|
-
|
|
15
|
-
Attributes:
|
|
16
|
-
average_token_input_per_request (Union[Unset, float]): Average input token per request
|
|
17
|
-
average_token_output_per_request (Union[Unset, float]): Average output token per request
|
|
18
|
-
average_token_per_request (Union[Unset, float]): Average token per request
|
|
19
|
-
token_input (Union[Unset, float]): Total input tokens
|
|
20
|
-
token_output (Union[Unset, float]): Total output tokens
|
|
21
|
-
token_total (Union[Unset, float]): Total tokens
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
average_token_input_per_request: Union[Unset, float] = UNSET
|
|
25
|
-
average_token_output_per_request: Union[Unset, float] = UNSET
|
|
26
|
-
average_token_per_request: Union[Unset, float] = UNSET
|
|
27
|
-
token_input: Union[Unset, float] = UNSET
|
|
28
|
-
token_output: Union[Unset, float] = UNSET
|
|
29
|
-
token_total: Union[Unset, float] = UNSET
|
|
30
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
-
|
|
32
|
-
def to_dict(self) -> dict[str, Any]:
|
|
33
|
-
average_token_input_per_request = self.average_token_input_per_request
|
|
34
|
-
|
|
35
|
-
average_token_output_per_request = self.average_token_output_per_request
|
|
36
|
-
|
|
37
|
-
average_token_per_request = self.average_token_per_request
|
|
38
|
-
|
|
39
|
-
token_input = self.token_input
|
|
40
|
-
|
|
41
|
-
token_output = self.token_output
|
|
42
|
-
|
|
43
|
-
token_total = self.token_total
|
|
44
|
-
|
|
45
|
-
field_dict: dict[str, Any] = {}
|
|
46
|
-
field_dict.update(self.additional_properties)
|
|
47
|
-
field_dict.update({})
|
|
48
|
-
if average_token_input_per_request is not UNSET:
|
|
49
|
-
field_dict["averageTokenInputPerRequest"] = average_token_input_per_request
|
|
50
|
-
if average_token_output_per_request is not UNSET:
|
|
51
|
-
field_dict["averageTokenOutputPerRequest"] = average_token_output_per_request
|
|
52
|
-
if average_token_per_request is not UNSET:
|
|
53
|
-
field_dict["averageTokenPerRequest"] = average_token_per_request
|
|
54
|
-
if token_input is not UNSET:
|
|
55
|
-
field_dict["tokenInput"] = token_input
|
|
56
|
-
if token_output is not UNSET:
|
|
57
|
-
field_dict["tokenOutput"] = token_output
|
|
58
|
-
if token_total is not UNSET:
|
|
59
|
-
field_dict["tokenTotal"] = token_total
|
|
60
|
-
|
|
61
|
-
return field_dict
|
|
62
|
-
|
|
63
|
-
@classmethod
|
|
64
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
65
|
-
if not src_dict:
|
|
66
|
-
return None
|
|
67
|
-
d = src_dict.copy()
|
|
68
|
-
average_token_input_per_request = d.pop(
|
|
69
|
-
"averageTokenInputPerRequest", d.pop("average_token_input_per_request", UNSET)
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
average_token_output_per_request = d.pop(
|
|
73
|
-
"averageTokenOutputPerRequest", d.pop("average_token_output_per_request", UNSET)
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
average_token_per_request = d.pop(
|
|
77
|
-
"averageTokenPerRequest", d.pop("average_token_per_request", UNSET)
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
token_input = d.pop("tokenInput", d.pop("token_input", UNSET))
|
|
81
|
-
|
|
82
|
-
token_output = d.pop("tokenOutput", d.pop("token_output", UNSET))
|
|
83
|
-
|
|
84
|
-
token_total = d.pop("tokenTotal", d.pop("token_total", UNSET))
|
|
85
|
-
|
|
86
|
-
token_total_metric = cls(
|
|
87
|
-
average_token_input_per_request=average_token_input_per_request,
|
|
88
|
-
average_token_output_per_request=average_token_output_per_request,
|
|
89
|
-
average_token_per_request=average_token_per_request,
|
|
90
|
-
token_input=token_input,
|
|
91
|
-
token_output=token_output,
|
|
92
|
-
token_total=token_total,
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
token_total_metric.additional_properties = d
|
|
96
|
-
return token_total_metric
|
|
97
|
-
|
|
98
|
-
@property
|
|
99
|
-
def additional_keys(self) -> list[str]:
|
|
100
|
-
return list(self.additional_properties.keys())
|
|
101
|
-
|
|
102
|
-
def __getitem__(self, key: str) -> Any:
|
|
103
|
-
return self.additional_properties[key]
|
|
104
|
-
|
|
105
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
106
|
-
self.additional_properties[key] = value
|
|
107
|
-
|
|
108
|
-
def __delitem__(self, key: str) -> None:
|
|
109
|
-
del self.additional_properties[key]
|
|
110
|
-
|
|
111
|
-
def __contains__(self, key: str) -> bool:
|
|
112
|
-
return key in self.additional_properties
|