scorable 1.6.4__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 scorable might be problematic. Click here for more details.
- root/__about__.py +4 -0
- root/__init__.py +17 -0
- root/client.py +207 -0
- root/datasets.py +231 -0
- root/execution_logs.py +162 -0
- root/generated/__init__.py +0 -0
- root/generated/openapi_aclient/__init__.py +1 -0
- root/generated/openapi_aclient/api/__init__.py +1 -0
- root/generated/openapi_aclient/api/datasets_api.py +1274 -0
- root/generated/openapi_aclient/api/evaluators_api.py +3641 -0
- root/generated/openapi_aclient/api/execution_logs_api.py +751 -0
- root/generated/openapi_aclient/api/judges_api.py +3794 -0
- root/generated/openapi_aclient/api/models_api.py +1473 -0
- root/generated/openapi_aclient/api/objectives_api.py +1767 -0
- root/generated/openapi_aclient/api_client.py +662 -0
- root/generated/openapi_aclient/api_response.py +22 -0
- root/generated/openapi_aclient/configuration.py +470 -0
- root/generated/openapi_aclient/exceptions.py +197 -0
- root/generated/openapi_aclient/models/__init__.py +122 -0
- root/generated/openapi_aclient/models/data_set_create.py +118 -0
- root/generated/openapi_aclient/models/data_set_create_request.py +105 -0
- root/generated/openapi_aclient/models/data_set_list.py +129 -0
- root/generated/openapi_aclient/models/data_set_type.py +36 -0
- root/generated/openapi_aclient/models/dataset_range_request.py +93 -0
- root/generated/openapi_aclient/models/evaluator.py +273 -0
- root/generated/openapi_aclient/models/evaluator_calibration_output.py +101 -0
- root/generated/openapi_aclient/models/evaluator_calibration_result.py +134 -0
- root/generated/openapi_aclient/models/evaluator_demonstrations.py +107 -0
- root/generated/openapi_aclient/models/evaluator_demonstrations_request.py +107 -0
- root/generated/openapi_aclient/models/evaluator_execution_function_parameter_property_request.py +86 -0
- root/generated/openapi_aclient/models/evaluator_execution_function_parameter_request.py +109 -0
- root/generated/openapi_aclient/models/evaluator_execution_function_parameter_type_enum.py +35 -0
- root/generated/openapi_aclient/models/evaluator_execution_function_request.py +99 -0
- root/generated/openapi_aclient/models/evaluator_execution_functions_request.py +98 -0
- root/generated/openapi_aclient/models/evaluator_execution_functions_type_enum.py +35 -0
- root/generated/openapi_aclient/models/evaluator_execution_request.py +134 -0
- root/generated/openapi_aclient/models/evaluator_execution_result.py +114 -0
- root/generated/openapi_aclient/models/evaluator_inputs_value.py +100 -0
- root/generated/openapi_aclient/models/evaluator_inputs_value_items.py +89 -0
- root/generated/openapi_aclient/models/evaluator_list_output.py +198 -0
- root/generated/openapi_aclient/models/evaluator_reference.py +90 -0
- root/generated/openapi_aclient/models/evaluator_reference_request.py +90 -0
- root/generated/openapi_aclient/models/evaluator_request.py +194 -0
- root/generated/openapi_aclient/models/evaluator_result.py +110 -0
- root/generated/openapi_aclient/models/execution_log_details.py +291 -0
- root/generated/openapi_aclient/models/execution_log_details_evaluation_context.py +83 -0
- root/generated/openapi_aclient/models/execution_log_details_evaluator_latencies_inner.py +83 -0
- root/generated/openapi_aclient/models/execution_log_list.py +217 -0
- root/generated/openapi_aclient/models/execution_log_list_evaluation_context.py +83 -0
- root/generated/openapi_aclient/models/generation_model_params_request.py +93 -0
- root/generated/openapi_aclient/models/id.py +87 -0
- root/generated/openapi_aclient/models/input_variable.py +121 -0
- root/generated/openapi_aclient/models/input_variable_request.py +82 -0
- root/generated/openapi_aclient/models/judge.py +178 -0
- root/generated/openapi_aclient/models/judge_execution_request.py +114 -0
- root/generated/openapi_aclient/models/judge_execution_response.py +97 -0
- root/generated/openapi_aclient/models/judge_files_inner.py +84 -0
- root/generated/openapi_aclient/models/judge_generator_request.py +142 -0
- root/generated/openapi_aclient/models/judge_generator_response.py +88 -0
- root/generated/openapi_aclient/models/judge_invite_request.py +87 -0
- root/generated/openapi_aclient/models/judge_list.py +156 -0
- root/generated/openapi_aclient/models/judge_rectifier_request_request.py +114 -0
- root/generated/openapi_aclient/models/judge_rectifier_response.py +121 -0
- root/generated/openapi_aclient/models/judge_request.py +108 -0
- root/generated/openapi_aclient/models/model.py +126 -0
- root/generated/openapi_aclient/models/model_list.py +115 -0
- root/generated/openapi_aclient/models/model_params.py +89 -0
- root/generated/openapi_aclient/models/model_params_request.py +89 -0
- root/generated/openapi_aclient/models/model_request.py +118 -0
- root/generated/openapi_aclient/models/nested_evaluator.py +110 -0
- root/generated/openapi_aclient/models/nested_evaluator_objective.py +87 -0
- root/generated/openapi_aclient/models/nested_evaluator_request.py +92 -0
- root/generated/openapi_aclient/models/nested_objective_evaluator.py +105 -0
- root/generated/openapi_aclient/models/nested_objective_evaluator_request.py +92 -0
- root/generated/openapi_aclient/models/nested_objective_list.py +111 -0
- root/generated/openapi_aclient/models/nested_user_details.py +88 -0
- root/generated/openapi_aclient/models/nested_user_details_request.py +82 -0
- root/generated/openapi_aclient/models/nested_vector_objective.py +88 -0
- root/generated/openapi_aclient/models/nested_vector_objective_request.py +82 -0
- root/generated/openapi_aclient/models/objective.py +157 -0
- root/generated/openapi_aclient/models/objective_list.py +128 -0
- root/generated/openapi_aclient/models/objective_request.py +113 -0
- root/generated/openapi_aclient/models/objective_validator.py +100 -0
- root/generated/openapi_aclient/models/objective_validator_request.py +90 -0
- root/generated/openapi_aclient/models/paginated_data_set_list_list.py +111 -0
- root/generated/openapi_aclient/models/paginated_evaluator_list.py +111 -0
- root/generated/openapi_aclient/models/paginated_evaluator_list_output_list.py +111 -0
- root/generated/openapi_aclient/models/paginated_execution_log_list_list.py +111 -0
- root/generated/openapi_aclient/models/paginated_judge_list_list.py +111 -0
- root/generated/openapi_aclient/models/paginated_model_list_list.py +111 -0
- root/generated/openapi_aclient/models/paginated_objective_list.py +111 -0
- root/generated/openapi_aclient/models/paginated_objective_list_list.py +111 -0
- root/generated/openapi_aclient/models/patched_evaluator_request.py +194 -0
- root/generated/openapi_aclient/models/patched_judge_request.py +110 -0
- root/generated/openapi_aclient/models/patched_model_request.py +118 -0
- root/generated/openapi_aclient/models/patched_objective_request.py +113 -0
- root/generated/openapi_aclient/models/provider.py +99 -0
- root/generated/openapi_aclient/models/reference_variable.py +123 -0
- root/generated/openapi_aclient/models/reference_variable_request.py +83 -0
- root/generated/openapi_aclient/models/skill_execution_validator_result.py +130 -0
- root/generated/openapi_aclient/models/skill_test_data_request.py +107 -0
- root/generated/openapi_aclient/models/skill_test_data_request_dataset_range.py +93 -0
- root/generated/openapi_aclient/models/skill_test_input_request.py +171 -0
- root/generated/openapi_aclient/models/skill_type_enum.py +36 -0
- root/generated/openapi_aclient/models/status_change.py +84 -0
- root/generated/openapi_aclient/models/status_change_request.py +84 -0
- root/generated/openapi_aclient/models/status_change_status_enum.py +36 -0
- root/generated/openapi_aclient/models/status_enum.py +38 -0
- root/generated/openapi_aclient/models/validation_result_status.py +36 -0
- root/generated/openapi_aclient/models/visibility_enum.py +38 -0
- root/generated/openapi_aclient/rest.py +166 -0
- root/generated/openapi_aclient_README.md +239 -0
- root/generated/openapi_client/__init__.py +1 -0
- root/generated/openapi_client/api/__init__.py +1 -0
- root/generated/openapi_client/api/datasets_api.py +1274 -0
- root/generated/openapi_client/api/evaluators_api.py +3641 -0
- root/generated/openapi_client/api/execution_logs_api.py +751 -0
- root/generated/openapi_client/api/judges_api.py +3794 -0
- root/generated/openapi_client/api/models_api.py +1473 -0
- root/generated/openapi_client/api/objectives_api.py +1767 -0
- root/generated/openapi_client/api_client.py +659 -0
- root/generated/openapi_client/api_response.py +22 -0
- root/generated/openapi_client/configuration.py +474 -0
- root/generated/openapi_client/exceptions.py +197 -0
- root/generated/openapi_client/models/__init__.py +120 -0
- root/generated/openapi_client/models/data_set_create.py +118 -0
- root/generated/openapi_client/models/data_set_create_request.py +105 -0
- root/generated/openapi_client/models/data_set_list.py +129 -0
- root/generated/openapi_client/models/data_set_type.py +36 -0
- root/generated/openapi_client/models/dataset_range_request.py +93 -0
- root/generated/openapi_client/models/evaluator.py +273 -0
- root/generated/openapi_client/models/evaluator_calibration_output.py +101 -0
- root/generated/openapi_client/models/evaluator_calibration_result.py +134 -0
- root/generated/openapi_client/models/evaluator_demonstrations.py +107 -0
- root/generated/openapi_client/models/evaluator_demonstrations_request.py +107 -0
- root/generated/openapi_client/models/evaluator_execution_function_parameter_property_request.py +86 -0
- root/generated/openapi_client/models/evaluator_execution_function_parameter_request.py +109 -0
- root/generated/openapi_client/models/evaluator_execution_function_parameter_type_enum.py +35 -0
- root/generated/openapi_client/models/evaluator_execution_function_request.py +99 -0
- root/generated/openapi_client/models/evaluator_execution_functions_request.py +98 -0
- root/generated/openapi_client/models/evaluator_execution_functions_type_enum.py +35 -0
- root/generated/openapi_client/models/evaluator_execution_request.py +134 -0
- root/generated/openapi_client/models/evaluator_execution_result.py +114 -0
- root/generated/openapi_client/models/evaluator_inputs_value.py +100 -0
- root/generated/openapi_client/models/evaluator_inputs_value_items.py +89 -0
- root/generated/openapi_client/models/evaluator_list_output.py +198 -0
- root/generated/openapi_client/models/evaluator_reference.py +90 -0
- root/generated/openapi_client/models/evaluator_reference_request.py +90 -0
- root/generated/openapi_client/models/evaluator_request.py +194 -0
- root/generated/openapi_client/models/evaluator_result.py +110 -0
- root/generated/openapi_client/models/execution_log_details.py +291 -0
- root/generated/openapi_client/models/execution_log_details_evaluation_context.py +83 -0
- root/generated/openapi_client/models/execution_log_details_evaluator_latencies_inner.py +83 -0
- root/generated/openapi_client/models/execution_log_list.py +215 -0
- root/generated/openapi_client/models/execution_log_list_evaluation_context.py +83 -0
- root/generated/openapi_client/models/generation_model_params_request.py +93 -0
- root/generated/openapi_client/models/id.py +87 -0
- root/generated/openapi_client/models/input_variable.py +121 -0
- root/generated/openapi_client/models/input_variable_request.py +82 -0
- root/generated/openapi_client/models/judge.py +178 -0
- root/generated/openapi_client/models/judge_execution_request.py +114 -0
- root/generated/openapi_client/models/judge_execution_response.py +97 -0
- root/generated/openapi_client/models/judge_files_inner.py +84 -0
- root/generated/openapi_client/models/judge_generator_request.py +142 -0
- root/generated/openapi_client/models/judge_generator_response.py +88 -0
- root/generated/openapi_client/models/judge_invite_request.py +87 -0
- root/generated/openapi_client/models/judge_list.py +156 -0
- root/generated/openapi_client/models/judge_rectifier_request_request.py +114 -0
- root/generated/openapi_client/models/judge_rectifier_response.py +121 -0
- root/generated/openapi_client/models/judge_request.py +108 -0
- root/generated/openapi_client/models/model.py +126 -0
- root/generated/openapi_client/models/model_list.py +115 -0
- root/generated/openapi_client/models/model_params.py +89 -0
- root/generated/openapi_client/models/model_params_request.py +89 -0
- root/generated/openapi_client/models/model_request.py +118 -0
- root/generated/openapi_client/models/nested_evaluator.py +110 -0
- root/generated/openapi_client/models/nested_evaluator_objective.py +87 -0
- root/generated/openapi_client/models/nested_evaluator_request.py +92 -0
- root/generated/openapi_client/models/nested_objective_evaluator.py +105 -0
- root/generated/openapi_client/models/nested_objective_evaluator_request.py +92 -0
- root/generated/openapi_client/models/nested_objective_list.py +111 -0
- root/generated/openapi_client/models/nested_user_details.py +88 -0
- root/generated/openapi_client/models/nested_user_details_request.py +82 -0
- root/generated/openapi_client/models/nested_vector_objective.py +88 -0
- root/generated/openapi_client/models/nested_vector_objective_request.py +82 -0
- root/generated/openapi_client/models/objective.py +157 -0
- root/generated/openapi_client/models/objective_list.py +128 -0
- root/generated/openapi_client/models/objective_request.py +113 -0
- root/generated/openapi_client/models/objective_validator.py +100 -0
- root/generated/openapi_client/models/objective_validator_request.py +90 -0
- root/generated/openapi_client/models/paginated_data_set_list_list.py +111 -0
- root/generated/openapi_client/models/paginated_evaluator_list.py +111 -0
- root/generated/openapi_client/models/paginated_evaluator_list_output_list.py +111 -0
- root/generated/openapi_client/models/paginated_execution_log_list_list.py +111 -0
- root/generated/openapi_client/models/paginated_judge_list_list.py +111 -0
- root/generated/openapi_client/models/paginated_model_list_list.py +111 -0
- root/generated/openapi_client/models/paginated_objective_list.py +111 -0
- root/generated/openapi_client/models/paginated_objective_list_list.py +111 -0
- root/generated/openapi_client/models/patched_evaluator_request.py +194 -0
- root/generated/openapi_client/models/patched_judge_request.py +110 -0
- root/generated/openapi_client/models/patched_model_request.py +118 -0
- root/generated/openapi_client/models/patched_objective_request.py +113 -0
- root/generated/openapi_client/models/provider.py +99 -0
- root/generated/openapi_client/models/reference_variable.py +123 -0
- root/generated/openapi_client/models/reference_variable_request.py +83 -0
- root/generated/openapi_client/models/skill_execution_validator_result.py +130 -0
- root/generated/openapi_client/models/skill_test_data_request.py +107 -0
- root/generated/openapi_client/models/skill_test_data_request_dataset_range.py +93 -0
- root/generated/openapi_client/models/skill_test_input_request.py +171 -0
- root/generated/openapi_client/models/skill_type_enum.py +36 -0
- root/generated/openapi_client/models/status_change.py +84 -0
- root/generated/openapi_client/models/status_change_request.py +84 -0
- root/generated/openapi_client/models/status_change_status_enum.py +36 -0
- root/generated/openapi_client/models/status_enum.py +38 -0
- root/generated/openapi_client/models/validation_result_status.py +36 -0
- root/generated/openapi_client/models/visibility_enum.py +38 -0
- root/generated/openapi_client/rest.py +203 -0
- root/generated/openapi_client_README.md +238 -0
- root/judges.py +681 -0
- root/models.py +197 -0
- root/objectives.py +343 -0
- root/py.typed +0 -0
- root/skills.py +1707 -0
- root/utils.py +90 -0
- scorable-1.6.4.dist-info/METADATA +395 -0
- scorable-1.6.4.dist-info/RECORD +228 -0
- scorable-1.6.4.dist-info/WHEEL +4 -0
- scorable-1.6.4.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,3641 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Root Signals API
|
|
5
|
+
|
|
6
|
+
Root Signals JSON API provides a way to access Root Signals using provisioned API token
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0 (latest)
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
|
|
17
|
+
from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator, validate_call
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from root.generated.openapi_client.api_client import ApiClient, RequestSerialized
|
|
21
|
+
from root.generated.openapi_client.api_response import ApiResponse
|
|
22
|
+
from root.generated.openapi_client.models.evaluator import Evaluator
|
|
23
|
+
from root.generated.openapi_client.models.evaluator_calibration_output import EvaluatorCalibrationOutput
|
|
24
|
+
from root.generated.openapi_client.models.evaluator_execution_request import EvaluatorExecutionRequest
|
|
25
|
+
from root.generated.openapi_client.models.evaluator_execution_result import EvaluatorExecutionResult
|
|
26
|
+
from root.generated.openapi_client.models.evaluator_request import EvaluatorRequest
|
|
27
|
+
from root.generated.openapi_client.models.paginated_evaluator_list import PaginatedEvaluatorList
|
|
28
|
+
from root.generated.openapi_client.models.paginated_evaluator_list_output_list import PaginatedEvaluatorListOutputList
|
|
29
|
+
from root.generated.openapi_client.models.patched_evaluator_request import PatchedEvaluatorRequest
|
|
30
|
+
from root.generated.openapi_client.models.skill_test_data_request import SkillTestDataRequest
|
|
31
|
+
from root.generated.openapi_client.models.skill_test_input_request import SkillTestInputRequest
|
|
32
|
+
from root.generated.openapi_client.models.status_change import StatusChange
|
|
33
|
+
from root.generated.openapi_client.models.status_change_request import StatusChangeRequest
|
|
34
|
+
from root.generated.openapi_client.rest import RESTResponseType
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class EvaluatorsApi:
|
|
38
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
39
|
+
Ref: https://openapi-generator.tech
|
|
40
|
+
|
|
41
|
+
Do not edit the class manually.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
def __init__(self, api_client=None) -> None:
|
|
45
|
+
if api_client is None:
|
|
46
|
+
api_client = ApiClient.get_default()
|
|
47
|
+
self.api_client = api_client
|
|
48
|
+
|
|
49
|
+
@validate_call
|
|
50
|
+
def evaluators_calibrate_create(
|
|
51
|
+
self,
|
|
52
|
+
skill_test_input_request: SkillTestInputRequest,
|
|
53
|
+
_request_timeout: Union[
|
|
54
|
+
None,
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
57
|
+
] = None,
|
|
58
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_content_type: Optional[StrictStr] = None,
|
|
60
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
62
|
+
) -> List[EvaluatorCalibrationOutput]:
|
|
63
|
+
"""evaluators_calibrate_create
|
|
64
|
+
|
|
65
|
+
Test an evaluator definition using calibration data
|
|
66
|
+
|
|
67
|
+
:param skill_test_input_request: (required)
|
|
68
|
+
:type skill_test_input_request: SkillTestInputRequest
|
|
69
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
70
|
+
number provided, it will be total request
|
|
71
|
+
timeout. It can also be a pair (tuple) of
|
|
72
|
+
(connection, read) timeouts.
|
|
73
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
74
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
75
|
+
request; this effectively ignores the
|
|
76
|
+
authentication in the spec for a single request.
|
|
77
|
+
:type _request_auth: dict, optional
|
|
78
|
+
:param _content_type: force content-type for the request.
|
|
79
|
+
:type _content_type: str, Optional
|
|
80
|
+
:param _headers: set to override the headers for a single
|
|
81
|
+
request; this effectively ignores the headers
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _headers: dict, optional
|
|
84
|
+
:param _host_index: set to override the host_index for a single
|
|
85
|
+
request; this effectively ignores the host_index
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _host_index: int, optional
|
|
88
|
+
:return: Returns the result object.
|
|
89
|
+
""" # noqa: E501
|
|
90
|
+
|
|
91
|
+
_param = self._evaluators_calibrate_create_serialize(
|
|
92
|
+
skill_test_input_request=skill_test_input_request,
|
|
93
|
+
_request_auth=_request_auth,
|
|
94
|
+
_content_type=_content_type,
|
|
95
|
+
_headers=_headers,
|
|
96
|
+
_host_index=_host_index,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
100
|
+
"200": "List[EvaluatorCalibrationOutput]",
|
|
101
|
+
}
|
|
102
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
103
|
+
response_data.read()
|
|
104
|
+
return self.api_client.response_deserialize(
|
|
105
|
+
response_data=response_data,
|
|
106
|
+
response_types_map=_response_types_map,
|
|
107
|
+
).data
|
|
108
|
+
|
|
109
|
+
@validate_call
|
|
110
|
+
def evaluators_calibrate_create_with_http_info(
|
|
111
|
+
self,
|
|
112
|
+
skill_test_input_request: SkillTestInputRequest,
|
|
113
|
+
_request_timeout: Union[
|
|
114
|
+
None,
|
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
116
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
117
|
+
] = None,
|
|
118
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
119
|
+
_content_type: Optional[StrictStr] = None,
|
|
120
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
121
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
122
|
+
) -> ApiResponse[List[EvaluatorCalibrationOutput]]:
|
|
123
|
+
"""evaluators_calibrate_create
|
|
124
|
+
|
|
125
|
+
Test an evaluator definition using calibration data
|
|
126
|
+
|
|
127
|
+
:param skill_test_input_request: (required)
|
|
128
|
+
:type skill_test_input_request: SkillTestInputRequest
|
|
129
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
130
|
+
number provided, it will be total request
|
|
131
|
+
timeout. It can also be a pair (tuple) of
|
|
132
|
+
(connection, read) timeouts.
|
|
133
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
134
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
135
|
+
request; this effectively ignores the
|
|
136
|
+
authentication in the spec for a single request.
|
|
137
|
+
:type _request_auth: dict, optional
|
|
138
|
+
:param _content_type: force content-type for the request.
|
|
139
|
+
:type _content_type: str, Optional
|
|
140
|
+
:param _headers: set to override the headers for a single
|
|
141
|
+
request; this effectively ignores the headers
|
|
142
|
+
in the spec for a single request.
|
|
143
|
+
:type _headers: dict, optional
|
|
144
|
+
:param _host_index: set to override the host_index for a single
|
|
145
|
+
request; this effectively ignores the host_index
|
|
146
|
+
in the spec for a single request.
|
|
147
|
+
:type _host_index: int, optional
|
|
148
|
+
:return: Returns the result object.
|
|
149
|
+
""" # noqa: E501
|
|
150
|
+
|
|
151
|
+
_param = self._evaluators_calibrate_create_serialize(
|
|
152
|
+
skill_test_input_request=skill_test_input_request,
|
|
153
|
+
_request_auth=_request_auth,
|
|
154
|
+
_content_type=_content_type,
|
|
155
|
+
_headers=_headers,
|
|
156
|
+
_host_index=_host_index,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
160
|
+
"200": "List[EvaluatorCalibrationOutput]",
|
|
161
|
+
}
|
|
162
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
163
|
+
response_data.read()
|
|
164
|
+
return self.api_client.response_deserialize(
|
|
165
|
+
response_data=response_data,
|
|
166
|
+
response_types_map=_response_types_map,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
@validate_call
|
|
170
|
+
def evaluators_calibrate_create_without_preload_content(
|
|
171
|
+
self,
|
|
172
|
+
skill_test_input_request: SkillTestInputRequest,
|
|
173
|
+
_request_timeout: Union[
|
|
174
|
+
None,
|
|
175
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
176
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
177
|
+
] = None,
|
|
178
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
179
|
+
_content_type: Optional[StrictStr] = None,
|
|
180
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
181
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
182
|
+
) -> RESTResponseType:
|
|
183
|
+
"""evaluators_calibrate_create
|
|
184
|
+
|
|
185
|
+
Test an evaluator definition using calibration data
|
|
186
|
+
|
|
187
|
+
:param skill_test_input_request: (required)
|
|
188
|
+
:type skill_test_input_request: SkillTestInputRequest
|
|
189
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
190
|
+
number provided, it will be total request
|
|
191
|
+
timeout. It can also be a pair (tuple) of
|
|
192
|
+
(connection, read) timeouts.
|
|
193
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
194
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
195
|
+
request; this effectively ignores the
|
|
196
|
+
authentication in the spec for a single request.
|
|
197
|
+
:type _request_auth: dict, optional
|
|
198
|
+
:param _content_type: force content-type for the request.
|
|
199
|
+
:type _content_type: str, Optional
|
|
200
|
+
:param _headers: set to override the headers for a single
|
|
201
|
+
request; this effectively ignores the headers
|
|
202
|
+
in the spec for a single request.
|
|
203
|
+
:type _headers: dict, optional
|
|
204
|
+
:param _host_index: set to override the host_index for a single
|
|
205
|
+
request; this effectively ignores the host_index
|
|
206
|
+
in the spec for a single request.
|
|
207
|
+
:type _host_index: int, optional
|
|
208
|
+
:return: Returns the result object.
|
|
209
|
+
""" # noqa: E501
|
|
210
|
+
|
|
211
|
+
_param = self._evaluators_calibrate_create_serialize(
|
|
212
|
+
skill_test_input_request=skill_test_input_request,
|
|
213
|
+
_request_auth=_request_auth,
|
|
214
|
+
_content_type=_content_type,
|
|
215
|
+
_headers=_headers,
|
|
216
|
+
_host_index=_host_index,
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
220
|
+
"200": "List[EvaluatorCalibrationOutput]",
|
|
221
|
+
}
|
|
222
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
223
|
+
return response_data.response
|
|
224
|
+
|
|
225
|
+
def _evaluators_calibrate_create_serialize(
|
|
226
|
+
self,
|
|
227
|
+
skill_test_input_request,
|
|
228
|
+
_request_auth,
|
|
229
|
+
_content_type,
|
|
230
|
+
_headers,
|
|
231
|
+
_host_index,
|
|
232
|
+
) -> RequestSerialized:
|
|
233
|
+
_host = None
|
|
234
|
+
|
|
235
|
+
_collection_formats: Dict[str, str] = {}
|
|
236
|
+
|
|
237
|
+
_path_params: Dict[str, str] = {}
|
|
238
|
+
_query_params: List[Tuple[str, str]] = []
|
|
239
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
240
|
+
_form_params: List[Tuple[str, str]] = []
|
|
241
|
+
_files: Dict[str, str] = {}
|
|
242
|
+
_body_params: Optional[bytes] = None
|
|
243
|
+
|
|
244
|
+
# process the path parameters
|
|
245
|
+
# process the query parameters
|
|
246
|
+
# process the header parameters
|
|
247
|
+
# process the form parameters
|
|
248
|
+
# process the body parameter
|
|
249
|
+
if skill_test_input_request is not None:
|
|
250
|
+
_body_params = skill_test_input_request
|
|
251
|
+
|
|
252
|
+
# set the HTTP header `Accept`
|
|
253
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
254
|
+
|
|
255
|
+
# set the HTTP header `Content-Type`
|
|
256
|
+
if _content_type:
|
|
257
|
+
_header_params["Content-Type"] = _content_type
|
|
258
|
+
else:
|
|
259
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
260
|
+
["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
|
|
261
|
+
)
|
|
262
|
+
if _default_content_type is not None:
|
|
263
|
+
_header_params["Content-Type"] = _default_content_type
|
|
264
|
+
|
|
265
|
+
# authentication setting
|
|
266
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
267
|
+
|
|
268
|
+
return self.api_client.param_serialize(
|
|
269
|
+
method="POST",
|
|
270
|
+
resource_path="/v1/evaluators/calibrate/",
|
|
271
|
+
path_params=_path_params,
|
|
272
|
+
query_params=_query_params,
|
|
273
|
+
header_params=_header_params,
|
|
274
|
+
body=_body_params,
|
|
275
|
+
post_params=_form_params,
|
|
276
|
+
files=_files,
|
|
277
|
+
auth_settings=_auth_settings,
|
|
278
|
+
collection_formats=_collection_formats,
|
|
279
|
+
_host=_host,
|
|
280
|
+
_request_auth=_request_auth,
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
@validate_call
|
|
284
|
+
def evaluators_calibrate_create2(
|
|
285
|
+
self,
|
|
286
|
+
id: StrictStr,
|
|
287
|
+
skill_test_data_request: Optional[SkillTestDataRequest] = None,
|
|
288
|
+
_request_timeout: Union[
|
|
289
|
+
None,
|
|
290
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
291
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
292
|
+
] = None,
|
|
293
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
294
|
+
_content_type: Optional[StrictStr] = None,
|
|
295
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
296
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
297
|
+
) -> List[EvaluatorCalibrationOutput]:
|
|
298
|
+
"""evaluators_calibrate_create2
|
|
299
|
+
|
|
300
|
+
Test an existing evaluator using calibration data
|
|
301
|
+
|
|
302
|
+
:param id: (required)
|
|
303
|
+
:type id: str
|
|
304
|
+
:param skill_test_data_request:
|
|
305
|
+
:type skill_test_data_request: SkillTestDataRequest
|
|
306
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
307
|
+
number provided, it will be total request
|
|
308
|
+
timeout. It can also be a pair (tuple) of
|
|
309
|
+
(connection, read) timeouts.
|
|
310
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
311
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
312
|
+
request; this effectively ignores the
|
|
313
|
+
authentication in the spec for a single request.
|
|
314
|
+
:type _request_auth: dict, optional
|
|
315
|
+
:param _content_type: force content-type for the request.
|
|
316
|
+
:type _content_type: str, Optional
|
|
317
|
+
:param _headers: set to override the headers for a single
|
|
318
|
+
request; this effectively ignores the headers
|
|
319
|
+
in the spec for a single request.
|
|
320
|
+
:type _headers: dict, optional
|
|
321
|
+
:param _host_index: set to override the host_index for a single
|
|
322
|
+
request; this effectively ignores the host_index
|
|
323
|
+
in the spec for a single request.
|
|
324
|
+
:type _host_index: int, optional
|
|
325
|
+
:return: Returns the result object.
|
|
326
|
+
""" # noqa: E501
|
|
327
|
+
|
|
328
|
+
_param = self._evaluators_calibrate_create2_serialize(
|
|
329
|
+
id=id,
|
|
330
|
+
skill_test_data_request=skill_test_data_request,
|
|
331
|
+
_request_auth=_request_auth,
|
|
332
|
+
_content_type=_content_type,
|
|
333
|
+
_headers=_headers,
|
|
334
|
+
_host_index=_host_index,
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
338
|
+
"200": "List[EvaluatorCalibrationOutput]",
|
|
339
|
+
}
|
|
340
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
341
|
+
response_data.read()
|
|
342
|
+
return self.api_client.response_deserialize(
|
|
343
|
+
response_data=response_data,
|
|
344
|
+
response_types_map=_response_types_map,
|
|
345
|
+
).data
|
|
346
|
+
|
|
347
|
+
@validate_call
|
|
348
|
+
def evaluators_calibrate_create2_with_http_info(
|
|
349
|
+
self,
|
|
350
|
+
id: StrictStr,
|
|
351
|
+
skill_test_data_request: Optional[SkillTestDataRequest] = None,
|
|
352
|
+
_request_timeout: Union[
|
|
353
|
+
None,
|
|
354
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
355
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
356
|
+
] = None,
|
|
357
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
358
|
+
_content_type: Optional[StrictStr] = None,
|
|
359
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
360
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
361
|
+
) -> ApiResponse[List[EvaluatorCalibrationOutput]]:
|
|
362
|
+
"""evaluators_calibrate_create2
|
|
363
|
+
|
|
364
|
+
Test an existing evaluator using calibration data
|
|
365
|
+
|
|
366
|
+
:param id: (required)
|
|
367
|
+
:type id: str
|
|
368
|
+
:param skill_test_data_request:
|
|
369
|
+
:type skill_test_data_request: SkillTestDataRequest
|
|
370
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
371
|
+
number provided, it will be total request
|
|
372
|
+
timeout. It can also be a pair (tuple) of
|
|
373
|
+
(connection, read) timeouts.
|
|
374
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
375
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
376
|
+
request; this effectively ignores the
|
|
377
|
+
authentication in the spec for a single request.
|
|
378
|
+
:type _request_auth: dict, optional
|
|
379
|
+
:param _content_type: force content-type for the request.
|
|
380
|
+
:type _content_type: str, Optional
|
|
381
|
+
:param _headers: set to override the headers for a single
|
|
382
|
+
request; this effectively ignores the headers
|
|
383
|
+
in the spec for a single request.
|
|
384
|
+
:type _headers: dict, optional
|
|
385
|
+
:param _host_index: set to override the host_index for a single
|
|
386
|
+
request; this effectively ignores the host_index
|
|
387
|
+
in the spec for a single request.
|
|
388
|
+
:type _host_index: int, optional
|
|
389
|
+
:return: Returns the result object.
|
|
390
|
+
""" # noqa: E501
|
|
391
|
+
|
|
392
|
+
_param = self._evaluators_calibrate_create2_serialize(
|
|
393
|
+
id=id,
|
|
394
|
+
skill_test_data_request=skill_test_data_request,
|
|
395
|
+
_request_auth=_request_auth,
|
|
396
|
+
_content_type=_content_type,
|
|
397
|
+
_headers=_headers,
|
|
398
|
+
_host_index=_host_index,
|
|
399
|
+
)
|
|
400
|
+
|
|
401
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
402
|
+
"200": "List[EvaluatorCalibrationOutput]",
|
|
403
|
+
}
|
|
404
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
405
|
+
response_data.read()
|
|
406
|
+
return self.api_client.response_deserialize(
|
|
407
|
+
response_data=response_data,
|
|
408
|
+
response_types_map=_response_types_map,
|
|
409
|
+
)
|
|
410
|
+
|
|
411
|
+
@validate_call
|
|
412
|
+
def evaluators_calibrate_create2_without_preload_content(
|
|
413
|
+
self,
|
|
414
|
+
id: StrictStr,
|
|
415
|
+
skill_test_data_request: Optional[SkillTestDataRequest] = None,
|
|
416
|
+
_request_timeout: Union[
|
|
417
|
+
None,
|
|
418
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
419
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
420
|
+
] = None,
|
|
421
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
422
|
+
_content_type: Optional[StrictStr] = None,
|
|
423
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
424
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
425
|
+
) -> RESTResponseType:
|
|
426
|
+
"""evaluators_calibrate_create2
|
|
427
|
+
|
|
428
|
+
Test an existing evaluator using calibration data
|
|
429
|
+
|
|
430
|
+
:param id: (required)
|
|
431
|
+
:type id: str
|
|
432
|
+
:param skill_test_data_request:
|
|
433
|
+
:type skill_test_data_request: SkillTestDataRequest
|
|
434
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
435
|
+
number provided, it will be total request
|
|
436
|
+
timeout. It can also be a pair (tuple) of
|
|
437
|
+
(connection, read) timeouts.
|
|
438
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
439
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
440
|
+
request; this effectively ignores the
|
|
441
|
+
authentication in the spec for a single request.
|
|
442
|
+
:type _request_auth: dict, optional
|
|
443
|
+
:param _content_type: force content-type for the request.
|
|
444
|
+
:type _content_type: str, Optional
|
|
445
|
+
:param _headers: set to override the headers for a single
|
|
446
|
+
request; this effectively ignores the headers
|
|
447
|
+
in the spec for a single request.
|
|
448
|
+
:type _headers: dict, optional
|
|
449
|
+
:param _host_index: set to override the host_index for a single
|
|
450
|
+
request; this effectively ignores the host_index
|
|
451
|
+
in the spec for a single request.
|
|
452
|
+
:type _host_index: int, optional
|
|
453
|
+
:return: Returns the result object.
|
|
454
|
+
""" # noqa: E501
|
|
455
|
+
|
|
456
|
+
_param = self._evaluators_calibrate_create2_serialize(
|
|
457
|
+
id=id,
|
|
458
|
+
skill_test_data_request=skill_test_data_request,
|
|
459
|
+
_request_auth=_request_auth,
|
|
460
|
+
_content_type=_content_type,
|
|
461
|
+
_headers=_headers,
|
|
462
|
+
_host_index=_host_index,
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
466
|
+
"200": "List[EvaluatorCalibrationOutput]",
|
|
467
|
+
}
|
|
468
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
469
|
+
return response_data.response
|
|
470
|
+
|
|
471
|
+
def _evaluators_calibrate_create2_serialize(
|
|
472
|
+
self,
|
|
473
|
+
id,
|
|
474
|
+
skill_test_data_request,
|
|
475
|
+
_request_auth,
|
|
476
|
+
_content_type,
|
|
477
|
+
_headers,
|
|
478
|
+
_host_index,
|
|
479
|
+
) -> RequestSerialized:
|
|
480
|
+
_host = None
|
|
481
|
+
|
|
482
|
+
_collection_formats: Dict[str, str] = {}
|
|
483
|
+
|
|
484
|
+
_path_params: Dict[str, str] = {}
|
|
485
|
+
_query_params: List[Tuple[str, str]] = []
|
|
486
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
487
|
+
_form_params: List[Tuple[str, str]] = []
|
|
488
|
+
_files: Dict[str, str] = {}
|
|
489
|
+
_body_params: Optional[bytes] = None
|
|
490
|
+
|
|
491
|
+
# process the path parameters
|
|
492
|
+
if id is not None:
|
|
493
|
+
_path_params["id"] = id
|
|
494
|
+
# process the query parameters
|
|
495
|
+
# process the header parameters
|
|
496
|
+
# process the form parameters
|
|
497
|
+
# process the body parameter
|
|
498
|
+
if skill_test_data_request is not None:
|
|
499
|
+
_body_params = skill_test_data_request
|
|
500
|
+
|
|
501
|
+
# set the HTTP header `Accept`
|
|
502
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
503
|
+
|
|
504
|
+
# set the HTTP header `Content-Type`
|
|
505
|
+
if _content_type:
|
|
506
|
+
_header_params["Content-Type"] = _content_type
|
|
507
|
+
else:
|
|
508
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
509
|
+
["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
|
|
510
|
+
)
|
|
511
|
+
if _default_content_type is not None:
|
|
512
|
+
_header_params["Content-Type"] = _default_content_type
|
|
513
|
+
|
|
514
|
+
# authentication setting
|
|
515
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
516
|
+
|
|
517
|
+
return self.api_client.param_serialize(
|
|
518
|
+
method="POST",
|
|
519
|
+
resource_path="/v1/evaluators/calibrate/{id}",
|
|
520
|
+
path_params=_path_params,
|
|
521
|
+
query_params=_query_params,
|
|
522
|
+
header_params=_header_params,
|
|
523
|
+
body=_body_params,
|
|
524
|
+
post_params=_form_params,
|
|
525
|
+
files=_files,
|
|
526
|
+
auth_settings=_auth_settings,
|
|
527
|
+
collection_formats=_collection_formats,
|
|
528
|
+
_host=_host,
|
|
529
|
+
_request_auth=_request_auth,
|
|
530
|
+
)
|
|
531
|
+
|
|
532
|
+
@validate_call
|
|
533
|
+
def evaluators_create(
|
|
534
|
+
self,
|
|
535
|
+
evaluator_request: EvaluatorRequest,
|
|
536
|
+
_request_timeout: Union[
|
|
537
|
+
None,
|
|
538
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
539
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
540
|
+
] = None,
|
|
541
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
542
|
+
_content_type: Optional[StrictStr] = None,
|
|
543
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
544
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
545
|
+
) -> Evaluator:
|
|
546
|
+
"""evaluators_create
|
|
547
|
+
|
|
548
|
+
Create a new evaluator.
|
|
549
|
+
|
|
550
|
+
:param evaluator_request: (required)
|
|
551
|
+
:type evaluator_request: EvaluatorRequest
|
|
552
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
553
|
+
number provided, it will be total request
|
|
554
|
+
timeout. It can also be a pair (tuple) of
|
|
555
|
+
(connection, read) timeouts.
|
|
556
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
557
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
558
|
+
request; this effectively ignores the
|
|
559
|
+
authentication in the spec for a single request.
|
|
560
|
+
:type _request_auth: dict, optional
|
|
561
|
+
:param _content_type: force content-type for the request.
|
|
562
|
+
:type _content_type: str, Optional
|
|
563
|
+
:param _headers: set to override the headers for a single
|
|
564
|
+
request; this effectively ignores the headers
|
|
565
|
+
in the spec for a single request.
|
|
566
|
+
:type _headers: dict, optional
|
|
567
|
+
:param _host_index: set to override the host_index for a single
|
|
568
|
+
request; this effectively ignores the host_index
|
|
569
|
+
in the spec for a single request.
|
|
570
|
+
:type _host_index: int, optional
|
|
571
|
+
:return: Returns the result object.
|
|
572
|
+
""" # noqa: E501
|
|
573
|
+
|
|
574
|
+
_param = self._evaluators_create_serialize(
|
|
575
|
+
evaluator_request=evaluator_request,
|
|
576
|
+
_request_auth=_request_auth,
|
|
577
|
+
_content_type=_content_type,
|
|
578
|
+
_headers=_headers,
|
|
579
|
+
_host_index=_host_index,
|
|
580
|
+
)
|
|
581
|
+
|
|
582
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
583
|
+
"201": "Evaluator",
|
|
584
|
+
}
|
|
585
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
586
|
+
response_data.read()
|
|
587
|
+
return self.api_client.response_deserialize(
|
|
588
|
+
response_data=response_data,
|
|
589
|
+
response_types_map=_response_types_map,
|
|
590
|
+
).data
|
|
591
|
+
|
|
592
|
+
@validate_call
|
|
593
|
+
def evaluators_create_with_http_info(
|
|
594
|
+
self,
|
|
595
|
+
evaluator_request: EvaluatorRequest,
|
|
596
|
+
_request_timeout: Union[
|
|
597
|
+
None,
|
|
598
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
599
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
600
|
+
] = None,
|
|
601
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
602
|
+
_content_type: Optional[StrictStr] = None,
|
|
603
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
604
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
605
|
+
) -> ApiResponse[Evaluator]:
|
|
606
|
+
"""evaluators_create
|
|
607
|
+
|
|
608
|
+
Create a new evaluator.
|
|
609
|
+
|
|
610
|
+
:param evaluator_request: (required)
|
|
611
|
+
:type evaluator_request: EvaluatorRequest
|
|
612
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
613
|
+
number provided, it will be total request
|
|
614
|
+
timeout. It can also be a pair (tuple) of
|
|
615
|
+
(connection, read) timeouts.
|
|
616
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
617
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
618
|
+
request; this effectively ignores the
|
|
619
|
+
authentication in the spec for a single request.
|
|
620
|
+
:type _request_auth: dict, optional
|
|
621
|
+
:param _content_type: force content-type for the request.
|
|
622
|
+
:type _content_type: str, Optional
|
|
623
|
+
:param _headers: set to override the headers for a single
|
|
624
|
+
request; this effectively ignores the headers
|
|
625
|
+
in the spec for a single request.
|
|
626
|
+
:type _headers: dict, optional
|
|
627
|
+
:param _host_index: set to override the host_index for a single
|
|
628
|
+
request; this effectively ignores the host_index
|
|
629
|
+
in the spec for a single request.
|
|
630
|
+
:type _host_index: int, optional
|
|
631
|
+
:return: Returns the result object.
|
|
632
|
+
""" # noqa: E501
|
|
633
|
+
|
|
634
|
+
_param = self._evaluators_create_serialize(
|
|
635
|
+
evaluator_request=evaluator_request,
|
|
636
|
+
_request_auth=_request_auth,
|
|
637
|
+
_content_type=_content_type,
|
|
638
|
+
_headers=_headers,
|
|
639
|
+
_host_index=_host_index,
|
|
640
|
+
)
|
|
641
|
+
|
|
642
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
643
|
+
"201": "Evaluator",
|
|
644
|
+
}
|
|
645
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
646
|
+
response_data.read()
|
|
647
|
+
return self.api_client.response_deserialize(
|
|
648
|
+
response_data=response_data,
|
|
649
|
+
response_types_map=_response_types_map,
|
|
650
|
+
)
|
|
651
|
+
|
|
652
|
+
@validate_call
|
|
653
|
+
def evaluators_create_without_preload_content(
|
|
654
|
+
self,
|
|
655
|
+
evaluator_request: EvaluatorRequest,
|
|
656
|
+
_request_timeout: Union[
|
|
657
|
+
None,
|
|
658
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
659
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
660
|
+
] = None,
|
|
661
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
662
|
+
_content_type: Optional[StrictStr] = None,
|
|
663
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
664
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
665
|
+
) -> RESTResponseType:
|
|
666
|
+
"""evaluators_create
|
|
667
|
+
|
|
668
|
+
Create a new evaluator.
|
|
669
|
+
|
|
670
|
+
:param evaluator_request: (required)
|
|
671
|
+
:type evaluator_request: EvaluatorRequest
|
|
672
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
673
|
+
number provided, it will be total request
|
|
674
|
+
timeout. It can also be a pair (tuple) of
|
|
675
|
+
(connection, read) timeouts.
|
|
676
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
677
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
678
|
+
request; this effectively ignores the
|
|
679
|
+
authentication in the spec for a single request.
|
|
680
|
+
:type _request_auth: dict, optional
|
|
681
|
+
:param _content_type: force content-type for the request.
|
|
682
|
+
:type _content_type: str, Optional
|
|
683
|
+
:param _headers: set to override the headers for a single
|
|
684
|
+
request; this effectively ignores the headers
|
|
685
|
+
in the spec for a single request.
|
|
686
|
+
:type _headers: dict, optional
|
|
687
|
+
:param _host_index: set to override the host_index for a single
|
|
688
|
+
request; this effectively ignores the host_index
|
|
689
|
+
in the spec for a single request.
|
|
690
|
+
:type _host_index: int, optional
|
|
691
|
+
:return: Returns the result object.
|
|
692
|
+
""" # noqa: E501
|
|
693
|
+
|
|
694
|
+
_param = self._evaluators_create_serialize(
|
|
695
|
+
evaluator_request=evaluator_request,
|
|
696
|
+
_request_auth=_request_auth,
|
|
697
|
+
_content_type=_content_type,
|
|
698
|
+
_headers=_headers,
|
|
699
|
+
_host_index=_host_index,
|
|
700
|
+
)
|
|
701
|
+
|
|
702
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
703
|
+
"201": "Evaluator",
|
|
704
|
+
}
|
|
705
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
706
|
+
return response_data.response
|
|
707
|
+
|
|
708
|
+
def _evaluators_create_serialize(
|
|
709
|
+
self,
|
|
710
|
+
evaluator_request,
|
|
711
|
+
_request_auth,
|
|
712
|
+
_content_type,
|
|
713
|
+
_headers,
|
|
714
|
+
_host_index,
|
|
715
|
+
) -> RequestSerialized:
|
|
716
|
+
_host = None
|
|
717
|
+
|
|
718
|
+
_collection_formats: Dict[str, str] = {}
|
|
719
|
+
|
|
720
|
+
_path_params: Dict[str, str] = {}
|
|
721
|
+
_query_params: List[Tuple[str, str]] = []
|
|
722
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
723
|
+
_form_params: List[Tuple[str, str]] = []
|
|
724
|
+
_files: Dict[str, str] = {}
|
|
725
|
+
_body_params: Optional[bytes] = None
|
|
726
|
+
|
|
727
|
+
# process the path parameters
|
|
728
|
+
# process the query parameters
|
|
729
|
+
# process the header parameters
|
|
730
|
+
# process the form parameters
|
|
731
|
+
# process the body parameter
|
|
732
|
+
if evaluator_request is not None:
|
|
733
|
+
_body_params = evaluator_request
|
|
734
|
+
|
|
735
|
+
# set the HTTP header `Accept`
|
|
736
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
737
|
+
|
|
738
|
+
# set the HTTP header `Content-Type`
|
|
739
|
+
if _content_type:
|
|
740
|
+
_header_params["Content-Type"] = _content_type
|
|
741
|
+
else:
|
|
742
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
743
|
+
["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
|
|
744
|
+
)
|
|
745
|
+
if _default_content_type is not None:
|
|
746
|
+
_header_params["Content-Type"] = _default_content_type
|
|
747
|
+
|
|
748
|
+
# authentication setting
|
|
749
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
750
|
+
|
|
751
|
+
return self.api_client.param_serialize(
|
|
752
|
+
method="POST",
|
|
753
|
+
resource_path="/v1/evaluators/",
|
|
754
|
+
path_params=_path_params,
|
|
755
|
+
query_params=_query_params,
|
|
756
|
+
header_params=_header_params,
|
|
757
|
+
body=_body_params,
|
|
758
|
+
post_params=_form_params,
|
|
759
|
+
files=_files,
|
|
760
|
+
auth_settings=_auth_settings,
|
|
761
|
+
collection_formats=_collection_formats,
|
|
762
|
+
_host=_host,
|
|
763
|
+
_request_auth=_request_auth,
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
@validate_call
|
|
767
|
+
def evaluators_destroy(
|
|
768
|
+
self,
|
|
769
|
+
id: StrictStr,
|
|
770
|
+
_request_timeout: Union[
|
|
771
|
+
None,
|
|
772
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
773
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
774
|
+
] = None,
|
|
775
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
776
|
+
_content_type: Optional[StrictStr] = None,
|
|
777
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
778
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
779
|
+
) -> None:
|
|
780
|
+
"""evaluators_destroy
|
|
781
|
+
|
|
782
|
+
Delete an evaluator.
|
|
783
|
+
|
|
784
|
+
:param id: (required)
|
|
785
|
+
:type id: str
|
|
786
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
787
|
+
number provided, it will be total request
|
|
788
|
+
timeout. It can also be a pair (tuple) of
|
|
789
|
+
(connection, read) timeouts.
|
|
790
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
791
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
792
|
+
request; this effectively ignores the
|
|
793
|
+
authentication in the spec for a single request.
|
|
794
|
+
:type _request_auth: dict, optional
|
|
795
|
+
:param _content_type: force content-type for the request.
|
|
796
|
+
:type _content_type: str, Optional
|
|
797
|
+
:param _headers: set to override the headers for a single
|
|
798
|
+
request; this effectively ignores the headers
|
|
799
|
+
in the spec for a single request.
|
|
800
|
+
:type _headers: dict, optional
|
|
801
|
+
:param _host_index: set to override the host_index for a single
|
|
802
|
+
request; this effectively ignores the host_index
|
|
803
|
+
in the spec for a single request.
|
|
804
|
+
:type _host_index: int, optional
|
|
805
|
+
:return: Returns the result object.
|
|
806
|
+
""" # noqa: E501
|
|
807
|
+
|
|
808
|
+
_param = self._evaluators_destroy_serialize(
|
|
809
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
810
|
+
)
|
|
811
|
+
|
|
812
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
813
|
+
"204": None,
|
|
814
|
+
}
|
|
815
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
816
|
+
response_data.read()
|
|
817
|
+
return self.api_client.response_deserialize(
|
|
818
|
+
response_data=response_data,
|
|
819
|
+
response_types_map=_response_types_map,
|
|
820
|
+
).data
|
|
821
|
+
|
|
822
|
+
@validate_call
|
|
823
|
+
def evaluators_destroy_with_http_info(
|
|
824
|
+
self,
|
|
825
|
+
id: StrictStr,
|
|
826
|
+
_request_timeout: Union[
|
|
827
|
+
None,
|
|
828
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
829
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
830
|
+
] = None,
|
|
831
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
832
|
+
_content_type: Optional[StrictStr] = None,
|
|
833
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
834
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
835
|
+
) -> ApiResponse[None]:
|
|
836
|
+
"""evaluators_destroy
|
|
837
|
+
|
|
838
|
+
Delete an evaluator.
|
|
839
|
+
|
|
840
|
+
:param id: (required)
|
|
841
|
+
:type id: str
|
|
842
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
843
|
+
number provided, it will be total request
|
|
844
|
+
timeout. It can also be a pair (tuple) of
|
|
845
|
+
(connection, read) timeouts.
|
|
846
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
847
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
848
|
+
request; this effectively ignores the
|
|
849
|
+
authentication in the spec for a single request.
|
|
850
|
+
:type _request_auth: dict, optional
|
|
851
|
+
:param _content_type: force content-type for the request.
|
|
852
|
+
:type _content_type: str, Optional
|
|
853
|
+
:param _headers: set to override the headers for a single
|
|
854
|
+
request; this effectively ignores the headers
|
|
855
|
+
in the spec for a single request.
|
|
856
|
+
:type _headers: dict, optional
|
|
857
|
+
:param _host_index: set to override the host_index for a single
|
|
858
|
+
request; this effectively ignores the host_index
|
|
859
|
+
in the spec for a single request.
|
|
860
|
+
:type _host_index: int, optional
|
|
861
|
+
:return: Returns the result object.
|
|
862
|
+
""" # noqa: E501
|
|
863
|
+
|
|
864
|
+
_param = self._evaluators_destroy_serialize(
|
|
865
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
866
|
+
)
|
|
867
|
+
|
|
868
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
869
|
+
"204": None,
|
|
870
|
+
}
|
|
871
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
872
|
+
response_data.read()
|
|
873
|
+
return self.api_client.response_deserialize(
|
|
874
|
+
response_data=response_data,
|
|
875
|
+
response_types_map=_response_types_map,
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
@validate_call
|
|
879
|
+
def evaluators_destroy_without_preload_content(
|
|
880
|
+
self,
|
|
881
|
+
id: StrictStr,
|
|
882
|
+
_request_timeout: Union[
|
|
883
|
+
None,
|
|
884
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
885
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
886
|
+
] = None,
|
|
887
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
888
|
+
_content_type: Optional[StrictStr] = None,
|
|
889
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
890
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
891
|
+
) -> RESTResponseType:
|
|
892
|
+
"""evaluators_destroy
|
|
893
|
+
|
|
894
|
+
Delete an evaluator.
|
|
895
|
+
|
|
896
|
+
:param id: (required)
|
|
897
|
+
:type id: str
|
|
898
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
899
|
+
number provided, it will be total request
|
|
900
|
+
timeout. It can also be a pair (tuple) of
|
|
901
|
+
(connection, read) timeouts.
|
|
902
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
903
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
904
|
+
request; this effectively ignores the
|
|
905
|
+
authentication in the spec for a single request.
|
|
906
|
+
:type _request_auth: dict, optional
|
|
907
|
+
:param _content_type: force content-type for the request.
|
|
908
|
+
:type _content_type: str, Optional
|
|
909
|
+
:param _headers: set to override the headers for a single
|
|
910
|
+
request; this effectively ignores the headers
|
|
911
|
+
in the spec for a single request.
|
|
912
|
+
:type _headers: dict, optional
|
|
913
|
+
:param _host_index: set to override the host_index for a single
|
|
914
|
+
request; this effectively ignores the host_index
|
|
915
|
+
in the spec for a single request.
|
|
916
|
+
:type _host_index: int, optional
|
|
917
|
+
:return: Returns the result object.
|
|
918
|
+
""" # noqa: E501
|
|
919
|
+
|
|
920
|
+
_param = self._evaluators_destroy_serialize(
|
|
921
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
922
|
+
)
|
|
923
|
+
|
|
924
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
925
|
+
"204": None,
|
|
926
|
+
}
|
|
927
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
928
|
+
return response_data.response
|
|
929
|
+
|
|
930
|
+
def _evaluators_destroy_serialize(
|
|
931
|
+
self,
|
|
932
|
+
id,
|
|
933
|
+
_request_auth,
|
|
934
|
+
_content_type,
|
|
935
|
+
_headers,
|
|
936
|
+
_host_index,
|
|
937
|
+
) -> RequestSerialized:
|
|
938
|
+
_host = None
|
|
939
|
+
|
|
940
|
+
_collection_formats: Dict[str, str] = {}
|
|
941
|
+
|
|
942
|
+
_path_params: Dict[str, str] = {}
|
|
943
|
+
_query_params: List[Tuple[str, str]] = []
|
|
944
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
945
|
+
_form_params: List[Tuple[str, str]] = []
|
|
946
|
+
_files: Dict[str, str] = {}
|
|
947
|
+
_body_params: Optional[bytes] = None
|
|
948
|
+
|
|
949
|
+
# process the path parameters
|
|
950
|
+
if id is not None:
|
|
951
|
+
_path_params["id"] = id
|
|
952
|
+
# process the query parameters
|
|
953
|
+
# process the header parameters
|
|
954
|
+
# process the form parameters
|
|
955
|
+
# process the body parameter
|
|
956
|
+
|
|
957
|
+
# authentication setting
|
|
958
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
959
|
+
|
|
960
|
+
return self.api_client.param_serialize(
|
|
961
|
+
method="DELETE",
|
|
962
|
+
resource_path="/v1/evaluators/{id}/",
|
|
963
|
+
path_params=_path_params,
|
|
964
|
+
query_params=_query_params,
|
|
965
|
+
header_params=_header_params,
|
|
966
|
+
body=_body_params,
|
|
967
|
+
post_params=_form_params,
|
|
968
|
+
files=_files,
|
|
969
|
+
auth_settings=_auth_settings,
|
|
970
|
+
collection_formats=_collection_formats,
|
|
971
|
+
_host=_host,
|
|
972
|
+
_request_auth=_request_auth,
|
|
973
|
+
)
|
|
974
|
+
|
|
975
|
+
@validate_call
|
|
976
|
+
def evaluators_duplicate_create(
|
|
977
|
+
self,
|
|
978
|
+
id: StrictStr,
|
|
979
|
+
_request_timeout: Union[
|
|
980
|
+
None,
|
|
981
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
982
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
983
|
+
] = None,
|
|
984
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
985
|
+
_content_type: Optional[StrictStr] = None,
|
|
986
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
987
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
988
|
+
) -> Evaluator:
|
|
989
|
+
"""evaluators_duplicate_create
|
|
990
|
+
|
|
991
|
+
Duplicate an evaluator
|
|
992
|
+
|
|
993
|
+
:param id: (required)
|
|
994
|
+
:type id: str
|
|
995
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
996
|
+
number provided, it will be total request
|
|
997
|
+
timeout. It can also be a pair (tuple) of
|
|
998
|
+
(connection, read) timeouts.
|
|
999
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1000
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1001
|
+
request; this effectively ignores the
|
|
1002
|
+
authentication in the spec for a single request.
|
|
1003
|
+
:type _request_auth: dict, optional
|
|
1004
|
+
:param _content_type: force content-type for the request.
|
|
1005
|
+
:type _content_type: str, Optional
|
|
1006
|
+
:param _headers: set to override the headers for a single
|
|
1007
|
+
request; this effectively ignores the headers
|
|
1008
|
+
in the spec for a single request.
|
|
1009
|
+
:type _headers: dict, optional
|
|
1010
|
+
:param _host_index: set to override the host_index for a single
|
|
1011
|
+
request; this effectively ignores the host_index
|
|
1012
|
+
in the spec for a single request.
|
|
1013
|
+
:type _host_index: int, optional
|
|
1014
|
+
:return: Returns the result object.
|
|
1015
|
+
""" # noqa: E501
|
|
1016
|
+
|
|
1017
|
+
_param = self._evaluators_duplicate_create_serialize(
|
|
1018
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1019
|
+
)
|
|
1020
|
+
|
|
1021
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1022
|
+
"201": "Evaluator",
|
|
1023
|
+
}
|
|
1024
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1025
|
+
response_data.read()
|
|
1026
|
+
return self.api_client.response_deserialize(
|
|
1027
|
+
response_data=response_data,
|
|
1028
|
+
response_types_map=_response_types_map,
|
|
1029
|
+
).data
|
|
1030
|
+
|
|
1031
|
+
@validate_call
|
|
1032
|
+
def evaluators_duplicate_create_with_http_info(
|
|
1033
|
+
self,
|
|
1034
|
+
id: StrictStr,
|
|
1035
|
+
_request_timeout: Union[
|
|
1036
|
+
None,
|
|
1037
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1038
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1039
|
+
] = None,
|
|
1040
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1041
|
+
_content_type: Optional[StrictStr] = None,
|
|
1042
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1043
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1044
|
+
) -> ApiResponse[Evaluator]:
|
|
1045
|
+
"""evaluators_duplicate_create
|
|
1046
|
+
|
|
1047
|
+
Duplicate an evaluator
|
|
1048
|
+
|
|
1049
|
+
:param id: (required)
|
|
1050
|
+
:type id: str
|
|
1051
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1052
|
+
number provided, it will be total request
|
|
1053
|
+
timeout. It can also be a pair (tuple) of
|
|
1054
|
+
(connection, read) timeouts.
|
|
1055
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1056
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1057
|
+
request; this effectively ignores the
|
|
1058
|
+
authentication in the spec for a single request.
|
|
1059
|
+
:type _request_auth: dict, optional
|
|
1060
|
+
:param _content_type: force content-type for the request.
|
|
1061
|
+
:type _content_type: str, Optional
|
|
1062
|
+
:param _headers: set to override the headers for a single
|
|
1063
|
+
request; this effectively ignores the headers
|
|
1064
|
+
in the spec for a single request.
|
|
1065
|
+
:type _headers: dict, optional
|
|
1066
|
+
:param _host_index: set to override the host_index for a single
|
|
1067
|
+
request; this effectively ignores the host_index
|
|
1068
|
+
in the spec for a single request.
|
|
1069
|
+
:type _host_index: int, optional
|
|
1070
|
+
:return: Returns the result object.
|
|
1071
|
+
""" # noqa: E501
|
|
1072
|
+
|
|
1073
|
+
_param = self._evaluators_duplicate_create_serialize(
|
|
1074
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1075
|
+
)
|
|
1076
|
+
|
|
1077
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1078
|
+
"201": "Evaluator",
|
|
1079
|
+
}
|
|
1080
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1081
|
+
response_data.read()
|
|
1082
|
+
return self.api_client.response_deserialize(
|
|
1083
|
+
response_data=response_data,
|
|
1084
|
+
response_types_map=_response_types_map,
|
|
1085
|
+
)
|
|
1086
|
+
|
|
1087
|
+
@validate_call
|
|
1088
|
+
def evaluators_duplicate_create_without_preload_content(
|
|
1089
|
+
self,
|
|
1090
|
+
id: StrictStr,
|
|
1091
|
+
_request_timeout: Union[
|
|
1092
|
+
None,
|
|
1093
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1094
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1095
|
+
] = None,
|
|
1096
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1097
|
+
_content_type: Optional[StrictStr] = None,
|
|
1098
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1099
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1100
|
+
) -> RESTResponseType:
|
|
1101
|
+
"""evaluators_duplicate_create
|
|
1102
|
+
|
|
1103
|
+
Duplicate an evaluator
|
|
1104
|
+
|
|
1105
|
+
:param id: (required)
|
|
1106
|
+
:type id: str
|
|
1107
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1108
|
+
number provided, it will be total request
|
|
1109
|
+
timeout. It can also be a pair (tuple) of
|
|
1110
|
+
(connection, read) timeouts.
|
|
1111
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1112
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1113
|
+
request; this effectively ignores the
|
|
1114
|
+
authentication in the spec for a single request.
|
|
1115
|
+
:type _request_auth: dict, optional
|
|
1116
|
+
:param _content_type: force content-type for the request.
|
|
1117
|
+
:type _content_type: str, Optional
|
|
1118
|
+
:param _headers: set to override the headers for a single
|
|
1119
|
+
request; this effectively ignores the headers
|
|
1120
|
+
in the spec for a single request.
|
|
1121
|
+
:type _headers: dict, optional
|
|
1122
|
+
:param _host_index: set to override the host_index for a single
|
|
1123
|
+
request; this effectively ignores the host_index
|
|
1124
|
+
in the spec for a single request.
|
|
1125
|
+
:type _host_index: int, optional
|
|
1126
|
+
:return: Returns the result object.
|
|
1127
|
+
""" # noqa: E501
|
|
1128
|
+
|
|
1129
|
+
_param = self._evaluators_duplicate_create_serialize(
|
|
1130
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1131
|
+
)
|
|
1132
|
+
|
|
1133
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1134
|
+
"201": "Evaluator",
|
|
1135
|
+
}
|
|
1136
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1137
|
+
return response_data.response
|
|
1138
|
+
|
|
1139
|
+
def _evaluators_duplicate_create_serialize(
|
|
1140
|
+
self,
|
|
1141
|
+
id,
|
|
1142
|
+
_request_auth,
|
|
1143
|
+
_content_type,
|
|
1144
|
+
_headers,
|
|
1145
|
+
_host_index,
|
|
1146
|
+
) -> RequestSerialized:
|
|
1147
|
+
_host = None
|
|
1148
|
+
|
|
1149
|
+
_collection_formats: Dict[str, str] = {}
|
|
1150
|
+
|
|
1151
|
+
_path_params: Dict[str, str] = {}
|
|
1152
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1153
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1154
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1155
|
+
_files: Dict[str, str] = {}
|
|
1156
|
+
_body_params: Optional[bytes] = None
|
|
1157
|
+
|
|
1158
|
+
# process the path parameters
|
|
1159
|
+
if id is not None:
|
|
1160
|
+
_path_params["id"] = id
|
|
1161
|
+
# process the query parameters
|
|
1162
|
+
# process the header parameters
|
|
1163
|
+
# process the form parameters
|
|
1164
|
+
# process the body parameter
|
|
1165
|
+
|
|
1166
|
+
# set the HTTP header `Accept`
|
|
1167
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1168
|
+
|
|
1169
|
+
# authentication setting
|
|
1170
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
1171
|
+
|
|
1172
|
+
return self.api_client.param_serialize(
|
|
1173
|
+
method="POST",
|
|
1174
|
+
resource_path="/v1/evaluators/duplicate/{id}/",
|
|
1175
|
+
path_params=_path_params,
|
|
1176
|
+
query_params=_query_params,
|
|
1177
|
+
header_params=_header_params,
|
|
1178
|
+
body=_body_params,
|
|
1179
|
+
post_params=_form_params,
|
|
1180
|
+
files=_files,
|
|
1181
|
+
auth_settings=_auth_settings,
|
|
1182
|
+
collection_formats=_collection_formats,
|
|
1183
|
+
_host=_host,
|
|
1184
|
+
_request_auth=_request_auth,
|
|
1185
|
+
)
|
|
1186
|
+
|
|
1187
|
+
@validate_call
|
|
1188
|
+
def evaluators_execute_by_name_create(
|
|
1189
|
+
self,
|
|
1190
|
+
name: Annotated[StrictStr, Field(description="The name of the evaluator to execute")],
|
|
1191
|
+
evaluator_execution_request: Optional[EvaluatorExecutionRequest] = None,
|
|
1192
|
+
_request_timeout: Union[
|
|
1193
|
+
None,
|
|
1194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1195
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1196
|
+
] = None,
|
|
1197
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1198
|
+
_content_type: Optional[StrictStr] = None,
|
|
1199
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1200
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1201
|
+
) -> EvaluatorExecutionResult:
|
|
1202
|
+
"""evaluators_execute_by_name_create
|
|
1203
|
+
|
|
1204
|
+
Execute an evaluator by name. Check the evaluator's requirements to know which parameters are needed for execution.
|
|
1205
|
+
|
|
1206
|
+
:param name: The name of the evaluator to execute (required)
|
|
1207
|
+
:type name: str
|
|
1208
|
+
:param evaluator_execution_request:
|
|
1209
|
+
:type evaluator_execution_request: EvaluatorExecutionRequest
|
|
1210
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1211
|
+
number provided, it will be total request
|
|
1212
|
+
timeout. It can also be a pair (tuple) of
|
|
1213
|
+
(connection, read) timeouts.
|
|
1214
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1215
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1216
|
+
request; this effectively ignores the
|
|
1217
|
+
authentication in the spec for a single request.
|
|
1218
|
+
:type _request_auth: dict, optional
|
|
1219
|
+
:param _content_type: force content-type for the request.
|
|
1220
|
+
:type _content_type: str, Optional
|
|
1221
|
+
:param _headers: set to override the headers for a single
|
|
1222
|
+
request; this effectively ignores the headers
|
|
1223
|
+
in the spec for a single request.
|
|
1224
|
+
:type _headers: dict, optional
|
|
1225
|
+
:param _host_index: set to override the host_index for a single
|
|
1226
|
+
request; this effectively ignores the host_index
|
|
1227
|
+
in the spec for a single request.
|
|
1228
|
+
:type _host_index: int, optional
|
|
1229
|
+
:return: Returns the result object.
|
|
1230
|
+
""" # noqa: E501
|
|
1231
|
+
|
|
1232
|
+
_param = self._evaluators_execute_by_name_create_serialize(
|
|
1233
|
+
name=name,
|
|
1234
|
+
evaluator_execution_request=evaluator_execution_request,
|
|
1235
|
+
_request_auth=_request_auth,
|
|
1236
|
+
_content_type=_content_type,
|
|
1237
|
+
_headers=_headers,
|
|
1238
|
+
_host_index=_host_index,
|
|
1239
|
+
)
|
|
1240
|
+
|
|
1241
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1242
|
+
"200": "EvaluatorExecutionResult",
|
|
1243
|
+
}
|
|
1244
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1245
|
+
response_data.read()
|
|
1246
|
+
return self.api_client.response_deserialize(
|
|
1247
|
+
response_data=response_data,
|
|
1248
|
+
response_types_map=_response_types_map,
|
|
1249
|
+
).data
|
|
1250
|
+
|
|
1251
|
+
@validate_call
|
|
1252
|
+
def evaluators_execute_by_name_create_with_http_info(
|
|
1253
|
+
self,
|
|
1254
|
+
name: Annotated[StrictStr, Field(description="The name of the evaluator to execute")],
|
|
1255
|
+
evaluator_execution_request: Optional[EvaluatorExecutionRequest] = None,
|
|
1256
|
+
_request_timeout: Union[
|
|
1257
|
+
None,
|
|
1258
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1259
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1260
|
+
] = None,
|
|
1261
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1262
|
+
_content_type: Optional[StrictStr] = None,
|
|
1263
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1264
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1265
|
+
) -> ApiResponse[EvaluatorExecutionResult]:
|
|
1266
|
+
"""evaluators_execute_by_name_create
|
|
1267
|
+
|
|
1268
|
+
Execute an evaluator by name. Check the evaluator's requirements to know which parameters are needed for execution.
|
|
1269
|
+
|
|
1270
|
+
:param name: The name of the evaluator to execute (required)
|
|
1271
|
+
:type name: str
|
|
1272
|
+
:param evaluator_execution_request:
|
|
1273
|
+
:type evaluator_execution_request: EvaluatorExecutionRequest
|
|
1274
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1275
|
+
number provided, it will be total request
|
|
1276
|
+
timeout. It can also be a pair (tuple) of
|
|
1277
|
+
(connection, read) timeouts.
|
|
1278
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1279
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1280
|
+
request; this effectively ignores the
|
|
1281
|
+
authentication in the spec for a single request.
|
|
1282
|
+
:type _request_auth: dict, optional
|
|
1283
|
+
:param _content_type: force content-type for the request.
|
|
1284
|
+
:type _content_type: str, Optional
|
|
1285
|
+
:param _headers: set to override the headers for a single
|
|
1286
|
+
request; this effectively ignores the headers
|
|
1287
|
+
in the spec for a single request.
|
|
1288
|
+
:type _headers: dict, optional
|
|
1289
|
+
:param _host_index: set to override the host_index for a single
|
|
1290
|
+
request; this effectively ignores the host_index
|
|
1291
|
+
in the spec for a single request.
|
|
1292
|
+
:type _host_index: int, optional
|
|
1293
|
+
:return: Returns the result object.
|
|
1294
|
+
""" # noqa: E501
|
|
1295
|
+
|
|
1296
|
+
_param = self._evaluators_execute_by_name_create_serialize(
|
|
1297
|
+
name=name,
|
|
1298
|
+
evaluator_execution_request=evaluator_execution_request,
|
|
1299
|
+
_request_auth=_request_auth,
|
|
1300
|
+
_content_type=_content_type,
|
|
1301
|
+
_headers=_headers,
|
|
1302
|
+
_host_index=_host_index,
|
|
1303
|
+
)
|
|
1304
|
+
|
|
1305
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1306
|
+
"200": "EvaluatorExecutionResult",
|
|
1307
|
+
}
|
|
1308
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1309
|
+
response_data.read()
|
|
1310
|
+
return self.api_client.response_deserialize(
|
|
1311
|
+
response_data=response_data,
|
|
1312
|
+
response_types_map=_response_types_map,
|
|
1313
|
+
)
|
|
1314
|
+
|
|
1315
|
+
@validate_call
|
|
1316
|
+
def evaluators_execute_by_name_create_without_preload_content(
|
|
1317
|
+
self,
|
|
1318
|
+
name: Annotated[StrictStr, Field(description="The name of the evaluator to execute")],
|
|
1319
|
+
evaluator_execution_request: Optional[EvaluatorExecutionRequest] = None,
|
|
1320
|
+
_request_timeout: Union[
|
|
1321
|
+
None,
|
|
1322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1323
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1324
|
+
] = None,
|
|
1325
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1326
|
+
_content_type: Optional[StrictStr] = None,
|
|
1327
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1328
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1329
|
+
) -> RESTResponseType:
|
|
1330
|
+
"""evaluators_execute_by_name_create
|
|
1331
|
+
|
|
1332
|
+
Execute an evaluator by name. Check the evaluator's requirements to know which parameters are needed for execution.
|
|
1333
|
+
|
|
1334
|
+
:param name: The name of the evaluator to execute (required)
|
|
1335
|
+
:type name: str
|
|
1336
|
+
:param evaluator_execution_request:
|
|
1337
|
+
:type evaluator_execution_request: EvaluatorExecutionRequest
|
|
1338
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1339
|
+
number provided, it will be total request
|
|
1340
|
+
timeout. It can also be a pair (tuple) of
|
|
1341
|
+
(connection, read) timeouts.
|
|
1342
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1343
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1344
|
+
request; this effectively ignores the
|
|
1345
|
+
authentication in the spec for a single request.
|
|
1346
|
+
:type _request_auth: dict, optional
|
|
1347
|
+
:param _content_type: force content-type for the request.
|
|
1348
|
+
:type _content_type: str, Optional
|
|
1349
|
+
:param _headers: set to override the headers for a single
|
|
1350
|
+
request; this effectively ignores the headers
|
|
1351
|
+
in the spec for a single request.
|
|
1352
|
+
:type _headers: dict, optional
|
|
1353
|
+
:param _host_index: set to override the host_index for a single
|
|
1354
|
+
request; this effectively ignores the host_index
|
|
1355
|
+
in the spec for a single request.
|
|
1356
|
+
:type _host_index: int, optional
|
|
1357
|
+
:return: Returns the result object.
|
|
1358
|
+
""" # noqa: E501
|
|
1359
|
+
|
|
1360
|
+
_param = self._evaluators_execute_by_name_create_serialize(
|
|
1361
|
+
name=name,
|
|
1362
|
+
evaluator_execution_request=evaluator_execution_request,
|
|
1363
|
+
_request_auth=_request_auth,
|
|
1364
|
+
_content_type=_content_type,
|
|
1365
|
+
_headers=_headers,
|
|
1366
|
+
_host_index=_host_index,
|
|
1367
|
+
)
|
|
1368
|
+
|
|
1369
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1370
|
+
"200": "EvaluatorExecutionResult",
|
|
1371
|
+
}
|
|
1372
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1373
|
+
return response_data.response
|
|
1374
|
+
|
|
1375
|
+
def _evaluators_execute_by_name_create_serialize(
|
|
1376
|
+
self,
|
|
1377
|
+
name,
|
|
1378
|
+
evaluator_execution_request,
|
|
1379
|
+
_request_auth,
|
|
1380
|
+
_content_type,
|
|
1381
|
+
_headers,
|
|
1382
|
+
_host_index,
|
|
1383
|
+
) -> RequestSerialized:
|
|
1384
|
+
_host = None
|
|
1385
|
+
|
|
1386
|
+
_collection_formats: Dict[str, str] = {}
|
|
1387
|
+
|
|
1388
|
+
_path_params: Dict[str, str] = {}
|
|
1389
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1390
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1391
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1392
|
+
_files: Dict[str, str] = {}
|
|
1393
|
+
_body_params: Optional[bytes] = None
|
|
1394
|
+
|
|
1395
|
+
# process the path parameters
|
|
1396
|
+
# process the query parameters
|
|
1397
|
+
if name is not None:
|
|
1398
|
+
_query_params.append(("name", name))
|
|
1399
|
+
|
|
1400
|
+
# process the header parameters
|
|
1401
|
+
# process the form parameters
|
|
1402
|
+
# process the body parameter
|
|
1403
|
+
if evaluator_execution_request is not None:
|
|
1404
|
+
_body_params = evaluator_execution_request
|
|
1405
|
+
|
|
1406
|
+
# set the HTTP header `Accept`
|
|
1407
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1408
|
+
|
|
1409
|
+
# set the HTTP header `Content-Type`
|
|
1410
|
+
if _content_type:
|
|
1411
|
+
_header_params["Content-Type"] = _content_type
|
|
1412
|
+
else:
|
|
1413
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
1414
|
+
["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
|
|
1415
|
+
)
|
|
1416
|
+
if _default_content_type is not None:
|
|
1417
|
+
_header_params["Content-Type"] = _default_content_type
|
|
1418
|
+
|
|
1419
|
+
# authentication setting
|
|
1420
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
1421
|
+
|
|
1422
|
+
return self.api_client.param_serialize(
|
|
1423
|
+
method="POST",
|
|
1424
|
+
resource_path="/v1/evaluators/execute/by-name/",
|
|
1425
|
+
path_params=_path_params,
|
|
1426
|
+
query_params=_query_params,
|
|
1427
|
+
header_params=_header_params,
|
|
1428
|
+
body=_body_params,
|
|
1429
|
+
post_params=_form_params,
|
|
1430
|
+
files=_files,
|
|
1431
|
+
auth_settings=_auth_settings,
|
|
1432
|
+
collection_formats=_collection_formats,
|
|
1433
|
+
_host=_host,
|
|
1434
|
+
_request_auth=_request_auth,
|
|
1435
|
+
)
|
|
1436
|
+
|
|
1437
|
+
@validate_call
|
|
1438
|
+
def evaluators_execute_create(
|
|
1439
|
+
self,
|
|
1440
|
+
id: Annotated[str, Field(strict=True)],
|
|
1441
|
+
evaluator_execution_request: Optional[EvaluatorExecutionRequest] = None,
|
|
1442
|
+
_request_timeout: Union[
|
|
1443
|
+
None,
|
|
1444
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1445
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1446
|
+
] = None,
|
|
1447
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1448
|
+
_content_type: Optional[StrictStr] = None,
|
|
1449
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1450
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1451
|
+
) -> EvaluatorExecutionResult:
|
|
1452
|
+
"""evaluators_execute_create
|
|
1453
|
+
|
|
1454
|
+
Execute an evaluator. Check the evaluator's requirements to know which parameters are needed for execution.
|
|
1455
|
+
|
|
1456
|
+
:param id: (required)
|
|
1457
|
+
:type id: str
|
|
1458
|
+
:param evaluator_execution_request:
|
|
1459
|
+
:type evaluator_execution_request: EvaluatorExecutionRequest
|
|
1460
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1461
|
+
number provided, it will be total request
|
|
1462
|
+
timeout. It can also be a pair (tuple) of
|
|
1463
|
+
(connection, read) timeouts.
|
|
1464
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1465
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1466
|
+
request; this effectively ignores the
|
|
1467
|
+
authentication in the spec for a single request.
|
|
1468
|
+
:type _request_auth: dict, optional
|
|
1469
|
+
:param _content_type: force content-type for the request.
|
|
1470
|
+
:type _content_type: str, Optional
|
|
1471
|
+
:param _headers: set to override the headers for a single
|
|
1472
|
+
request; this effectively ignores the headers
|
|
1473
|
+
in the spec for a single request.
|
|
1474
|
+
:type _headers: dict, optional
|
|
1475
|
+
:param _host_index: set to override the host_index for a single
|
|
1476
|
+
request; this effectively ignores the host_index
|
|
1477
|
+
in the spec for a single request.
|
|
1478
|
+
:type _host_index: int, optional
|
|
1479
|
+
:return: Returns the result object.
|
|
1480
|
+
""" # noqa: E501
|
|
1481
|
+
|
|
1482
|
+
_param = self._evaluators_execute_create_serialize(
|
|
1483
|
+
id=id,
|
|
1484
|
+
evaluator_execution_request=evaluator_execution_request,
|
|
1485
|
+
_request_auth=_request_auth,
|
|
1486
|
+
_content_type=_content_type,
|
|
1487
|
+
_headers=_headers,
|
|
1488
|
+
_host_index=_host_index,
|
|
1489
|
+
)
|
|
1490
|
+
|
|
1491
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1492
|
+
"200": "EvaluatorExecutionResult",
|
|
1493
|
+
}
|
|
1494
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1495
|
+
response_data.read()
|
|
1496
|
+
return self.api_client.response_deserialize(
|
|
1497
|
+
response_data=response_data,
|
|
1498
|
+
response_types_map=_response_types_map,
|
|
1499
|
+
).data
|
|
1500
|
+
|
|
1501
|
+
@validate_call
|
|
1502
|
+
def evaluators_execute_create_with_http_info(
|
|
1503
|
+
self,
|
|
1504
|
+
id: Annotated[str, Field(strict=True)],
|
|
1505
|
+
evaluator_execution_request: Optional[EvaluatorExecutionRequest] = None,
|
|
1506
|
+
_request_timeout: Union[
|
|
1507
|
+
None,
|
|
1508
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1509
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1510
|
+
] = None,
|
|
1511
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1512
|
+
_content_type: Optional[StrictStr] = None,
|
|
1513
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1514
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1515
|
+
) -> ApiResponse[EvaluatorExecutionResult]:
|
|
1516
|
+
"""evaluators_execute_create
|
|
1517
|
+
|
|
1518
|
+
Execute an evaluator. Check the evaluator's requirements to know which parameters are needed for execution.
|
|
1519
|
+
|
|
1520
|
+
:param id: (required)
|
|
1521
|
+
:type id: str
|
|
1522
|
+
:param evaluator_execution_request:
|
|
1523
|
+
:type evaluator_execution_request: EvaluatorExecutionRequest
|
|
1524
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1525
|
+
number provided, it will be total request
|
|
1526
|
+
timeout. It can also be a pair (tuple) of
|
|
1527
|
+
(connection, read) timeouts.
|
|
1528
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1529
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1530
|
+
request; this effectively ignores the
|
|
1531
|
+
authentication in the spec for a single request.
|
|
1532
|
+
:type _request_auth: dict, optional
|
|
1533
|
+
:param _content_type: force content-type for the request.
|
|
1534
|
+
:type _content_type: str, Optional
|
|
1535
|
+
:param _headers: set to override the headers for a single
|
|
1536
|
+
request; this effectively ignores the headers
|
|
1537
|
+
in the spec for a single request.
|
|
1538
|
+
:type _headers: dict, optional
|
|
1539
|
+
:param _host_index: set to override the host_index for a single
|
|
1540
|
+
request; this effectively ignores the host_index
|
|
1541
|
+
in the spec for a single request.
|
|
1542
|
+
:type _host_index: int, optional
|
|
1543
|
+
:return: Returns the result object.
|
|
1544
|
+
""" # noqa: E501
|
|
1545
|
+
|
|
1546
|
+
_param = self._evaluators_execute_create_serialize(
|
|
1547
|
+
id=id,
|
|
1548
|
+
evaluator_execution_request=evaluator_execution_request,
|
|
1549
|
+
_request_auth=_request_auth,
|
|
1550
|
+
_content_type=_content_type,
|
|
1551
|
+
_headers=_headers,
|
|
1552
|
+
_host_index=_host_index,
|
|
1553
|
+
)
|
|
1554
|
+
|
|
1555
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1556
|
+
"200": "EvaluatorExecutionResult",
|
|
1557
|
+
}
|
|
1558
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1559
|
+
response_data.read()
|
|
1560
|
+
return self.api_client.response_deserialize(
|
|
1561
|
+
response_data=response_data,
|
|
1562
|
+
response_types_map=_response_types_map,
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
@validate_call
|
|
1566
|
+
def evaluators_execute_create_without_preload_content(
|
|
1567
|
+
self,
|
|
1568
|
+
id: Annotated[str, Field(strict=True)],
|
|
1569
|
+
evaluator_execution_request: Optional[EvaluatorExecutionRequest] = None,
|
|
1570
|
+
_request_timeout: Union[
|
|
1571
|
+
None,
|
|
1572
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1573
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1574
|
+
] = None,
|
|
1575
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1576
|
+
_content_type: Optional[StrictStr] = None,
|
|
1577
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1578
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1579
|
+
) -> RESTResponseType:
|
|
1580
|
+
"""evaluators_execute_create
|
|
1581
|
+
|
|
1582
|
+
Execute an evaluator. Check the evaluator's requirements to know which parameters are needed for execution.
|
|
1583
|
+
|
|
1584
|
+
:param id: (required)
|
|
1585
|
+
:type id: str
|
|
1586
|
+
:param evaluator_execution_request:
|
|
1587
|
+
:type evaluator_execution_request: EvaluatorExecutionRequest
|
|
1588
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1589
|
+
number provided, it will be total request
|
|
1590
|
+
timeout. It can also be a pair (tuple) of
|
|
1591
|
+
(connection, read) timeouts.
|
|
1592
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1593
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1594
|
+
request; this effectively ignores the
|
|
1595
|
+
authentication in the spec for a single request.
|
|
1596
|
+
:type _request_auth: dict, optional
|
|
1597
|
+
:param _content_type: force content-type for the request.
|
|
1598
|
+
:type _content_type: str, Optional
|
|
1599
|
+
:param _headers: set to override the headers for a single
|
|
1600
|
+
request; this effectively ignores the headers
|
|
1601
|
+
in the spec for a single request.
|
|
1602
|
+
:type _headers: dict, optional
|
|
1603
|
+
:param _host_index: set to override the host_index for a single
|
|
1604
|
+
request; this effectively ignores the host_index
|
|
1605
|
+
in the spec for a single request.
|
|
1606
|
+
:type _host_index: int, optional
|
|
1607
|
+
:return: Returns the result object.
|
|
1608
|
+
""" # noqa: E501
|
|
1609
|
+
|
|
1610
|
+
_param = self._evaluators_execute_create_serialize(
|
|
1611
|
+
id=id,
|
|
1612
|
+
evaluator_execution_request=evaluator_execution_request,
|
|
1613
|
+
_request_auth=_request_auth,
|
|
1614
|
+
_content_type=_content_type,
|
|
1615
|
+
_headers=_headers,
|
|
1616
|
+
_host_index=_host_index,
|
|
1617
|
+
)
|
|
1618
|
+
|
|
1619
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1620
|
+
"200": "EvaluatorExecutionResult",
|
|
1621
|
+
}
|
|
1622
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1623
|
+
return response_data.response
|
|
1624
|
+
|
|
1625
|
+
def _evaluators_execute_create_serialize(
|
|
1626
|
+
self,
|
|
1627
|
+
id,
|
|
1628
|
+
evaluator_execution_request,
|
|
1629
|
+
_request_auth,
|
|
1630
|
+
_content_type,
|
|
1631
|
+
_headers,
|
|
1632
|
+
_host_index,
|
|
1633
|
+
) -> RequestSerialized:
|
|
1634
|
+
_host = None
|
|
1635
|
+
|
|
1636
|
+
_collection_formats: Dict[str, str] = {}
|
|
1637
|
+
|
|
1638
|
+
_path_params: Dict[str, str] = {}
|
|
1639
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1640
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1641
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1642
|
+
_files: Dict[str, str] = {}
|
|
1643
|
+
_body_params: Optional[bytes] = None
|
|
1644
|
+
|
|
1645
|
+
# process the path parameters
|
|
1646
|
+
if id is not None:
|
|
1647
|
+
_path_params["id"] = id
|
|
1648
|
+
# process the query parameters
|
|
1649
|
+
# process the header parameters
|
|
1650
|
+
# process the form parameters
|
|
1651
|
+
# process the body parameter
|
|
1652
|
+
if evaluator_execution_request is not None:
|
|
1653
|
+
_body_params = evaluator_execution_request
|
|
1654
|
+
|
|
1655
|
+
# set the HTTP header `Accept`
|
|
1656
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1657
|
+
|
|
1658
|
+
# set the HTTP header `Content-Type`
|
|
1659
|
+
if _content_type:
|
|
1660
|
+
_header_params["Content-Type"] = _content_type
|
|
1661
|
+
else:
|
|
1662
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
1663
|
+
["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
|
|
1664
|
+
)
|
|
1665
|
+
if _default_content_type is not None:
|
|
1666
|
+
_header_params["Content-Type"] = _default_content_type
|
|
1667
|
+
|
|
1668
|
+
# authentication setting
|
|
1669
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
1670
|
+
|
|
1671
|
+
return self.api_client.param_serialize(
|
|
1672
|
+
method="POST",
|
|
1673
|
+
resource_path="/v1/evaluators/execute/{id}/",
|
|
1674
|
+
path_params=_path_params,
|
|
1675
|
+
query_params=_query_params,
|
|
1676
|
+
header_params=_header_params,
|
|
1677
|
+
body=_body_params,
|
|
1678
|
+
post_params=_form_params,
|
|
1679
|
+
files=_files,
|
|
1680
|
+
auth_settings=_auth_settings,
|
|
1681
|
+
collection_formats=_collection_formats,
|
|
1682
|
+
_host=_host,
|
|
1683
|
+
_request_auth=_request_auth,
|
|
1684
|
+
)
|
|
1685
|
+
|
|
1686
|
+
@validate_call
|
|
1687
|
+
def evaluators_list(
|
|
1688
|
+
self,
|
|
1689
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
|
|
1690
|
+
is_root_evaluator: Annotated[
|
|
1691
|
+
Optional[StrictBool], Field(description="Return only Root Signals defined evaluators.")
|
|
1692
|
+
] = None,
|
|
1693
|
+
name: Annotated[Optional[StrictStr], Field(description="Search for evaluators by name (exact match).")] = None,
|
|
1694
|
+
objective__intent: Optional[StrictStr] = None,
|
|
1695
|
+
ordering: Annotated[
|
|
1696
|
+
Optional[StrictStr], Field(description="Which field to use when ordering the results.")
|
|
1697
|
+
] = None,
|
|
1698
|
+
owner__email: Optional[StrictStr] = None,
|
|
1699
|
+
owner__first_name: Optional[StrictStr] = None,
|
|
1700
|
+
owner__last_name: Optional[StrictStr] = None,
|
|
1701
|
+
page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
|
|
1702
|
+
search: Annotated[
|
|
1703
|
+
Optional[StrictStr], Field(description="Search for evaluators by name or description.")
|
|
1704
|
+
] = None,
|
|
1705
|
+
skill_type: Annotated[
|
|
1706
|
+
Optional[StrictStr], Field(description="* `managed` - managed * `native` - native")
|
|
1707
|
+
] = None,
|
|
1708
|
+
status: Annotated[
|
|
1709
|
+
Optional[StrictStr],
|
|
1710
|
+
Field(
|
|
1711
|
+
description="* `unlisted` - unlisted * `listed` - listed * `public` - public * `public_unlisted` - public_unlisted"
|
|
1712
|
+
),
|
|
1713
|
+
] = None,
|
|
1714
|
+
_request_timeout: Union[
|
|
1715
|
+
None,
|
|
1716
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1717
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1718
|
+
] = None,
|
|
1719
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1720
|
+
_content_type: Optional[StrictStr] = None,
|
|
1721
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1722
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1723
|
+
) -> PaginatedEvaluatorListOutputList:
|
|
1724
|
+
"""evaluators_list
|
|
1725
|
+
|
|
1726
|
+
List all evaluators. The response includes a 'requirements' field for each evaluator that specifies what parameters are required for execution. The requirements field indicates whether the evaluator requires request, response, contexts, functions, expected_output, or reference variables.
|
|
1727
|
+
|
|
1728
|
+
:param cursor: The pagination cursor value.
|
|
1729
|
+
:type cursor: str
|
|
1730
|
+
:param is_root_evaluator: Return only Root Signals defined evaluators.
|
|
1731
|
+
:type is_root_evaluator: bool
|
|
1732
|
+
:param name: Search for evaluators by name (exact match).
|
|
1733
|
+
:type name: str
|
|
1734
|
+
:param objective__intent:
|
|
1735
|
+
:type objective__intent: str
|
|
1736
|
+
:param ordering: Which field to use when ordering the results.
|
|
1737
|
+
:type ordering: str
|
|
1738
|
+
:param owner__email:
|
|
1739
|
+
:type owner__email: str
|
|
1740
|
+
:param owner__first_name:
|
|
1741
|
+
:type owner__first_name: str
|
|
1742
|
+
:param owner__last_name:
|
|
1743
|
+
:type owner__last_name: str
|
|
1744
|
+
:param page_size: Number of results to return per page.
|
|
1745
|
+
:type page_size: int
|
|
1746
|
+
:param search: Search for evaluators by name or description.
|
|
1747
|
+
:type search: str
|
|
1748
|
+
:param skill_type: * `managed` - managed * `native` - native
|
|
1749
|
+
:type skill_type: str
|
|
1750
|
+
:param status: * `unlisted` - unlisted * `listed` - listed * `public` - public * `public_unlisted` - public_unlisted
|
|
1751
|
+
:type status: str
|
|
1752
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1753
|
+
number provided, it will be total request
|
|
1754
|
+
timeout. It can also be a pair (tuple) of
|
|
1755
|
+
(connection, read) timeouts.
|
|
1756
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1757
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1758
|
+
request; this effectively ignores the
|
|
1759
|
+
authentication in the spec for a single request.
|
|
1760
|
+
:type _request_auth: dict, optional
|
|
1761
|
+
:param _content_type: force content-type for the request.
|
|
1762
|
+
:type _content_type: str, Optional
|
|
1763
|
+
:param _headers: set to override the headers for a single
|
|
1764
|
+
request; this effectively ignores the headers
|
|
1765
|
+
in the spec for a single request.
|
|
1766
|
+
:type _headers: dict, optional
|
|
1767
|
+
:param _host_index: set to override the host_index for a single
|
|
1768
|
+
request; this effectively ignores the host_index
|
|
1769
|
+
in the spec for a single request.
|
|
1770
|
+
:type _host_index: int, optional
|
|
1771
|
+
:return: Returns the result object.
|
|
1772
|
+
""" # noqa: E501
|
|
1773
|
+
|
|
1774
|
+
_param = self._evaluators_list_serialize(
|
|
1775
|
+
cursor=cursor,
|
|
1776
|
+
is_root_evaluator=is_root_evaluator,
|
|
1777
|
+
name=name,
|
|
1778
|
+
objective__intent=objective__intent,
|
|
1779
|
+
ordering=ordering,
|
|
1780
|
+
owner__email=owner__email,
|
|
1781
|
+
owner__first_name=owner__first_name,
|
|
1782
|
+
owner__last_name=owner__last_name,
|
|
1783
|
+
page_size=page_size,
|
|
1784
|
+
search=search,
|
|
1785
|
+
skill_type=skill_type,
|
|
1786
|
+
status=status,
|
|
1787
|
+
_request_auth=_request_auth,
|
|
1788
|
+
_content_type=_content_type,
|
|
1789
|
+
_headers=_headers,
|
|
1790
|
+
_host_index=_host_index,
|
|
1791
|
+
)
|
|
1792
|
+
|
|
1793
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1794
|
+
"200": "PaginatedEvaluatorListOutputList",
|
|
1795
|
+
}
|
|
1796
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1797
|
+
response_data.read()
|
|
1798
|
+
return self.api_client.response_deserialize(
|
|
1799
|
+
response_data=response_data,
|
|
1800
|
+
response_types_map=_response_types_map,
|
|
1801
|
+
).data
|
|
1802
|
+
|
|
1803
|
+
@validate_call
|
|
1804
|
+
def evaluators_list_with_http_info(
|
|
1805
|
+
self,
|
|
1806
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
|
|
1807
|
+
is_root_evaluator: Annotated[
|
|
1808
|
+
Optional[StrictBool], Field(description="Return only Root Signals defined evaluators.")
|
|
1809
|
+
] = None,
|
|
1810
|
+
name: Annotated[Optional[StrictStr], Field(description="Search for evaluators by name (exact match).")] = None,
|
|
1811
|
+
objective__intent: Optional[StrictStr] = None,
|
|
1812
|
+
ordering: Annotated[
|
|
1813
|
+
Optional[StrictStr], Field(description="Which field to use when ordering the results.")
|
|
1814
|
+
] = None,
|
|
1815
|
+
owner__email: Optional[StrictStr] = None,
|
|
1816
|
+
owner__first_name: Optional[StrictStr] = None,
|
|
1817
|
+
owner__last_name: Optional[StrictStr] = None,
|
|
1818
|
+
page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
|
|
1819
|
+
search: Annotated[
|
|
1820
|
+
Optional[StrictStr], Field(description="Search for evaluators by name or description.")
|
|
1821
|
+
] = None,
|
|
1822
|
+
skill_type: Annotated[
|
|
1823
|
+
Optional[StrictStr], Field(description="* `managed` - managed * `native` - native")
|
|
1824
|
+
] = None,
|
|
1825
|
+
status: Annotated[
|
|
1826
|
+
Optional[StrictStr],
|
|
1827
|
+
Field(
|
|
1828
|
+
description="* `unlisted` - unlisted * `listed` - listed * `public` - public * `public_unlisted` - public_unlisted"
|
|
1829
|
+
),
|
|
1830
|
+
] = None,
|
|
1831
|
+
_request_timeout: Union[
|
|
1832
|
+
None,
|
|
1833
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1834
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1835
|
+
] = None,
|
|
1836
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1837
|
+
_content_type: Optional[StrictStr] = None,
|
|
1838
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1839
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1840
|
+
) -> ApiResponse[PaginatedEvaluatorListOutputList]:
|
|
1841
|
+
"""evaluators_list
|
|
1842
|
+
|
|
1843
|
+
List all evaluators. The response includes a 'requirements' field for each evaluator that specifies what parameters are required for execution. The requirements field indicates whether the evaluator requires request, response, contexts, functions, expected_output, or reference variables.
|
|
1844
|
+
|
|
1845
|
+
:param cursor: The pagination cursor value.
|
|
1846
|
+
:type cursor: str
|
|
1847
|
+
:param is_root_evaluator: Return only Root Signals defined evaluators.
|
|
1848
|
+
:type is_root_evaluator: bool
|
|
1849
|
+
:param name: Search for evaluators by name (exact match).
|
|
1850
|
+
:type name: str
|
|
1851
|
+
:param objective__intent:
|
|
1852
|
+
:type objective__intent: str
|
|
1853
|
+
:param ordering: Which field to use when ordering the results.
|
|
1854
|
+
:type ordering: str
|
|
1855
|
+
:param owner__email:
|
|
1856
|
+
:type owner__email: str
|
|
1857
|
+
:param owner__first_name:
|
|
1858
|
+
:type owner__first_name: str
|
|
1859
|
+
:param owner__last_name:
|
|
1860
|
+
:type owner__last_name: str
|
|
1861
|
+
:param page_size: Number of results to return per page.
|
|
1862
|
+
:type page_size: int
|
|
1863
|
+
:param search: Search for evaluators by name or description.
|
|
1864
|
+
:type search: str
|
|
1865
|
+
:param skill_type: * `managed` - managed * `native` - native
|
|
1866
|
+
:type skill_type: str
|
|
1867
|
+
:param status: * `unlisted` - unlisted * `listed` - listed * `public` - public * `public_unlisted` - public_unlisted
|
|
1868
|
+
:type status: str
|
|
1869
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1870
|
+
number provided, it will be total request
|
|
1871
|
+
timeout. It can also be a pair (tuple) of
|
|
1872
|
+
(connection, read) timeouts.
|
|
1873
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1874
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1875
|
+
request; this effectively ignores the
|
|
1876
|
+
authentication in the spec for a single request.
|
|
1877
|
+
:type _request_auth: dict, optional
|
|
1878
|
+
:param _content_type: force content-type for the request.
|
|
1879
|
+
:type _content_type: str, Optional
|
|
1880
|
+
:param _headers: set to override the headers for a single
|
|
1881
|
+
request; this effectively ignores the headers
|
|
1882
|
+
in the spec for a single request.
|
|
1883
|
+
:type _headers: dict, optional
|
|
1884
|
+
:param _host_index: set to override the host_index for a single
|
|
1885
|
+
request; this effectively ignores the host_index
|
|
1886
|
+
in the spec for a single request.
|
|
1887
|
+
:type _host_index: int, optional
|
|
1888
|
+
:return: Returns the result object.
|
|
1889
|
+
""" # noqa: E501
|
|
1890
|
+
|
|
1891
|
+
_param = self._evaluators_list_serialize(
|
|
1892
|
+
cursor=cursor,
|
|
1893
|
+
is_root_evaluator=is_root_evaluator,
|
|
1894
|
+
name=name,
|
|
1895
|
+
objective__intent=objective__intent,
|
|
1896
|
+
ordering=ordering,
|
|
1897
|
+
owner__email=owner__email,
|
|
1898
|
+
owner__first_name=owner__first_name,
|
|
1899
|
+
owner__last_name=owner__last_name,
|
|
1900
|
+
page_size=page_size,
|
|
1901
|
+
search=search,
|
|
1902
|
+
skill_type=skill_type,
|
|
1903
|
+
status=status,
|
|
1904
|
+
_request_auth=_request_auth,
|
|
1905
|
+
_content_type=_content_type,
|
|
1906
|
+
_headers=_headers,
|
|
1907
|
+
_host_index=_host_index,
|
|
1908
|
+
)
|
|
1909
|
+
|
|
1910
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1911
|
+
"200": "PaginatedEvaluatorListOutputList",
|
|
1912
|
+
}
|
|
1913
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1914
|
+
response_data.read()
|
|
1915
|
+
return self.api_client.response_deserialize(
|
|
1916
|
+
response_data=response_data,
|
|
1917
|
+
response_types_map=_response_types_map,
|
|
1918
|
+
)
|
|
1919
|
+
|
|
1920
|
+
@validate_call
|
|
1921
|
+
def evaluators_list_without_preload_content(
|
|
1922
|
+
self,
|
|
1923
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
|
|
1924
|
+
is_root_evaluator: Annotated[
|
|
1925
|
+
Optional[StrictBool], Field(description="Return only Root Signals defined evaluators.")
|
|
1926
|
+
] = None,
|
|
1927
|
+
name: Annotated[Optional[StrictStr], Field(description="Search for evaluators by name (exact match).")] = None,
|
|
1928
|
+
objective__intent: Optional[StrictStr] = None,
|
|
1929
|
+
ordering: Annotated[
|
|
1930
|
+
Optional[StrictStr], Field(description="Which field to use when ordering the results.")
|
|
1931
|
+
] = None,
|
|
1932
|
+
owner__email: Optional[StrictStr] = None,
|
|
1933
|
+
owner__first_name: Optional[StrictStr] = None,
|
|
1934
|
+
owner__last_name: Optional[StrictStr] = None,
|
|
1935
|
+
page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
|
|
1936
|
+
search: Annotated[
|
|
1937
|
+
Optional[StrictStr], Field(description="Search for evaluators by name or description.")
|
|
1938
|
+
] = None,
|
|
1939
|
+
skill_type: Annotated[
|
|
1940
|
+
Optional[StrictStr], Field(description="* `managed` - managed * `native` - native")
|
|
1941
|
+
] = None,
|
|
1942
|
+
status: Annotated[
|
|
1943
|
+
Optional[StrictStr],
|
|
1944
|
+
Field(
|
|
1945
|
+
description="* `unlisted` - unlisted * `listed` - listed * `public` - public * `public_unlisted` - public_unlisted"
|
|
1946
|
+
),
|
|
1947
|
+
] = None,
|
|
1948
|
+
_request_timeout: Union[
|
|
1949
|
+
None,
|
|
1950
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1951
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1952
|
+
] = None,
|
|
1953
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1954
|
+
_content_type: Optional[StrictStr] = None,
|
|
1955
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1956
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1957
|
+
) -> RESTResponseType:
|
|
1958
|
+
"""evaluators_list
|
|
1959
|
+
|
|
1960
|
+
List all evaluators. The response includes a 'requirements' field for each evaluator that specifies what parameters are required for execution. The requirements field indicates whether the evaluator requires request, response, contexts, functions, expected_output, or reference variables.
|
|
1961
|
+
|
|
1962
|
+
:param cursor: The pagination cursor value.
|
|
1963
|
+
:type cursor: str
|
|
1964
|
+
:param is_root_evaluator: Return only Root Signals defined evaluators.
|
|
1965
|
+
:type is_root_evaluator: bool
|
|
1966
|
+
:param name: Search for evaluators by name (exact match).
|
|
1967
|
+
:type name: str
|
|
1968
|
+
:param objective__intent:
|
|
1969
|
+
:type objective__intent: str
|
|
1970
|
+
:param ordering: Which field to use when ordering the results.
|
|
1971
|
+
:type ordering: str
|
|
1972
|
+
:param owner__email:
|
|
1973
|
+
:type owner__email: str
|
|
1974
|
+
:param owner__first_name:
|
|
1975
|
+
:type owner__first_name: str
|
|
1976
|
+
:param owner__last_name:
|
|
1977
|
+
:type owner__last_name: str
|
|
1978
|
+
:param page_size: Number of results to return per page.
|
|
1979
|
+
:type page_size: int
|
|
1980
|
+
:param search: Search for evaluators by name or description.
|
|
1981
|
+
:type search: str
|
|
1982
|
+
:param skill_type: * `managed` - managed * `native` - native
|
|
1983
|
+
:type skill_type: str
|
|
1984
|
+
:param status: * `unlisted` - unlisted * `listed` - listed * `public` - public * `public_unlisted` - public_unlisted
|
|
1985
|
+
:type status: str
|
|
1986
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1987
|
+
number provided, it will be total request
|
|
1988
|
+
timeout. It can also be a pair (tuple) of
|
|
1989
|
+
(connection, read) timeouts.
|
|
1990
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1991
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1992
|
+
request; this effectively ignores the
|
|
1993
|
+
authentication in the spec for a single request.
|
|
1994
|
+
:type _request_auth: dict, optional
|
|
1995
|
+
:param _content_type: force content-type for the request.
|
|
1996
|
+
:type _content_type: str, Optional
|
|
1997
|
+
:param _headers: set to override the headers for a single
|
|
1998
|
+
request; this effectively ignores the headers
|
|
1999
|
+
in the spec for a single request.
|
|
2000
|
+
:type _headers: dict, optional
|
|
2001
|
+
:param _host_index: set to override the host_index for a single
|
|
2002
|
+
request; this effectively ignores the host_index
|
|
2003
|
+
in the spec for a single request.
|
|
2004
|
+
:type _host_index: int, optional
|
|
2005
|
+
:return: Returns the result object.
|
|
2006
|
+
""" # noqa: E501
|
|
2007
|
+
|
|
2008
|
+
_param = self._evaluators_list_serialize(
|
|
2009
|
+
cursor=cursor,
|
|
2010
|
+
is_root_evaluator=is_root_evaluator,
|
|
2011
|
+
name=name,
|
|
2012
|
+
objective__intent=objective__intent,
|
|
2013
|
+
ordering=ordering,
|
|
2014
|
+
owner__email=owner__email,
|
|
2015
|
+
owner__first_name=owner__first_name,
|
|
2016
|
+
owner__last_name=owner__last_name,
|
|
2017
|
+
page_size=page_size,
|
|
2018
|
+
search=search,
|
|
2019
|
+
skill_type=skill_type,
|
|
2020
|
+
status=status,
|
|
2021
|
+
_request_auth=_request_auth,
|
|
2022
|
+
_content_type=_content_type,
|
|
2023
|
+
_headers=_headers,
|
|
2024
|
+
_host_index=_host_index,
|
|
2025
|
+
)
|
|
2026
|
+
|
|
2027
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2028
|
+
"200": "PaginatedEvaluatorListOutputList",
|
|
2029
|
+
}
|
|
2030
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2031
|
+
return response_data.response
|
|
2032
|
+
|
|
2033
|
+
def _evaluators_list_serialize(
|
|
2034
|
+
self,
|
|
2035
|
+
cursor,
|
|
2036
|
+
is_root_evaluator,
|
|
2037
|
+
name,
|
|
2038
|
+
objective__intent,
|
|
2039
|
+
ordering,
|
|
2040
|
+
owner__email,
|
|
2041
|
+
owner__first_name,
|
|
2042
|
+
owner__last_name,
|
|
2043
|
+
page_size,
|
|
2044
|
+
search,
|
|
2045
|
+
skill_type,
|
|
2046
|
+
status,
|
|
2047
|
+
_request_auth,
|
|
2048
|
+
_content_type,
|
|
2049
|
+
_headers,
|
|
2050
|
+
_host_index,
|
|
2051
|
+
) -> RequestSerialized:
|
|
2052
|
+
_host = None
|
|
2053
|
+
|
|
2054
|
+
_collection_formats: Dict[str, str] = {}
|
|
2055
|
+
|
|
2056
|
+
_path_params: Dict[str, str] = {}
|
|
2057
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2058
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2059
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2060
|
+
_files: Dict[str, str] = {}
|
|
2061
|
+
_body_params: Optional[bytes] = None
|
|
2062
|
+
|
|
2063
|
+
# process the path parameters
|
|
2064
|
+
# process the query parameters
|
|
2065
|
+
if cursor is not None:
|
|
2066
|
+
_query_params.append(("cursor", cursor))
|
|
2067
|
+
|
|
2068
|
+
if is_root_evaluator is not None:
|
|
2069
|
+
_query_params.append(("is_root_evaluator", is_root_evaluator))
|
|
2070
|
+
|
|
2071
|
+
if name is not None:
|
|
2072
|
+
_query_params.append(("name", name))
|
|
2073
|
+
|
|
2074
|
+
if objective__intent is not None:
|
|
2075
|
+
_query_params.append(("objective__intent", objective__intent))
|
|
2076
|
+
|
|
2077
|
+
if ordering is not None:
|
|
2078
|
+
_query_params.append(("ordering", ordering))
|
|
2079
|
+
|
|
2080
|
+
if owner__email is not None:
|
|
2081
|
+
_query_params.append(("owner__email", owner__email))
|
|
2082
|
+
|
|
2083
|
+
if owner__first_name is not None:
|
|
2084
|
+
_query_params.append(("owner__first_name", owner__first_name))
|
|
2085
|
+
|
|
2086
|
+
if owner__last_name is not None:
|
|
2087
|
+
_query_params.append(("owner__last_name", owner__last_name))
|
|
2088
|
+
|
|
2089
|
+
if page_size is not None:
|
|
2090
|
+
_query_params.append(("page_size", page_size))
|
|
2091
|
+
|
|
2092
|
+
if search is not None:
|
|
2093
|
+
_query_params.append(("search", search))
|
|
2094
|
+
|
|
2095
|
+
if skill_type is not None:
|
|
2096
|
+
_query_params.append(("skill_type", skill_type))
|
|
2097
|
+
|
|
2098
|
+
if status is not None:
|
|
2099
|
+
_query_params.append(("status", status))
|
|
2100
|
+
|
|
2101
|
+
# process the header parameters
|
|
2102
|
+
# process the form parameters
|
|
2103
|
+
# process the body parameter
|
|
2104
|
+
|
|
2105
|
+
# set the HTTP header `Accept`
|
|
2106
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2107
|
+
|
|
2108
|
+
# authentication setting
|
|
2109
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
2110
|
+
|
|
2111
|
+
return self.api_client.param_serialize(
|
|
2112
|
+
method="GET",
|
|
2113
|
+
resource_path="/v1/evaluators/",
|
|
2114
|
+
path_params=_path_params,
|
|
2115
|
+
query_params=_query_params,
|
|
2116
|
+
header_params=_header_params,
|
|
2117
|
+
body=_body_params,
|
|
2118
|
+
post_params=_form_params,
|
|
2119
|
+
files=_files,
|
|
2120
|
+
auth_settings=_auth_settings,
|
|
2121
|
+
collection_formats=_collection_formats,
|
|
2122
|
+
_host=_host,
|
|
2123
|
+
_request_auth=_request_auth,
|
|
2124
|
+
)
|
|
2125
|
+
|
|
2126
|
+
@validate_call
|
|
2127
|
+
def evaluators_partial_update(
|
|
2128
|
+
self,
|
|
2129
|
+
id: StrictStr,
|
|
2130
|
+
patched_evaluator_request: Optional[PatchedEvaluatorRequest] = None,
|
|
2131
|
+
_request_timeout: Union[
|
|
2132
|
+
None,
|
|
2133
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2134
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2135
|
+
] = None,
|
|
2136
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2137
|
+
_content_type: Optional[StrictStr] = None,
|
|
2138
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2139
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2140
|
+
) -> Evaluator:
|
|
2141
|
+
"""evaluators_partial_update
|
|
2142
|
+
|
|
2143
|
+
Update an evaluator. All fields are optional.
|
|
2144
|
+
|
|
2145
|
+
:param id: (required)
|
|
2146
|
+
:type id: str
|
|
2147
|
+
:param patched_evaluator_request:
|
|
2148
|
+
:type patched_evaluator_request: PatchedEvaluatorRequest
|
|
2149
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2150
|
+
number provided, it will be total request
|
|
2151
|
+
timeout. It can also be a pair (tuple) of
|
|
2152
|
+
(connection, read) timeouts.
|
|
2153
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2154
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2155
|
+
request; this effectively ignores the
|
|
2156
|
+
authentication in the spec for a single request.
|
|
2157
|
+
:type _request_auth: dict, optional
|
|
2158
|
+
:param _content_type: force content-type for the request.
|
|
2159
|
+
:type _content_type: str, Optional
|
|
2160
|
+
:param _headers: set to override the headers for a single
|
|
2161
|
+
request; this effectively ignores the headers
|
|
2162
|
+
in the spec for a single request.
|
|
2163
|
+
:type _headers: dict, optional
|
|
2164
|
+
:param _host_index: set to override the host_index for a single
|
|
2165
|
+
request; this effectively ignores the host_index
|
|
2166
|
+
in the spec for a single request.
|
|
2167
|
+
:type _host_index: int, optional
|
|
2168
|
+
:return: Returns the result object.
|
|
2169
|
+
""" # noqa: E501
|
|
2170
|
+
|
|
2171
|
+
_param = self._evaluators_partial_update_serialize(
|
|
2172
|
+
id=id,
|
|
2173
|
+
patched_evaluator_request=patched_evaluator_request,
|
|
2174
|
+
_request_auth=_request_auth,
|
|
2175
|
+
_content_type=_content_type,
|
|
2176
|
+
_headers=_headers,
|
|
2177
|
+
_host_index=_host_index,
|
|
2178
|
+
)
|
|
2179
|
+
|
|
2180
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2181
|
+
"200": "Evaluator",
|
|
2182
|
+
}
|
|
2183
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2184
|
+
response_data.read()
|
|
2185
|
+
return self.api_client.response_deserialize(
|
|
2186
|
+
response_data=response_data,
|
|
2187
|
+
response_types_map=_response_types_map,
|
|
2188
|
+
).data
|
|
2189
|
+
|
|
2190
|
+
@validate_call
|
|
2191
|
+
def evaluators_partial_update_with_http_info(
|
|
2192
|
+
self,
|
|
2193
|
+
id: StrictStr,
|
|
2194
|
+
patched_evaluator_request: Optional[PatchedEvaluatorRequest] = None,
|
|
2195
|
+
_request_timeout: Union[
|
|
2196
|
+
None,
|
|
2197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2198
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2199
|
+
] = None,
|
|
2200
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2201
|
+
_content_type: Optional[StrictStr] = None,
|
|
2202
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2203
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2204
|
+
) -> ApiResponse[Evaluator]:
|
|
2205
|
+
"""evaluators_partial_update
|
|
2206
|
+
|
|
2207
|
+
Update an evaluator. All fields are optional.
|
|
2208
|
+
|
|
2209
|
+
:param id: (required)
|
|
2210
|
+
:type id: str
|
|
2211
|
+
:param patched_evaluator_request:
|
|
2212
|
+
:type patched_evaluator_request: PatchedEvaluatorRequest
|
|
2213
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2214
|
+
number provided, it will be total request
|
|
2215
|
+
timeout. It can also be a pair (tuple) of
|
|
2216
|
+
(connection, read) timeouts.
|
|
2217
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2218
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2219
|
+
request; this effectively ignores the
|
|
2220
|
+
authentication in the spec for a single request.
|
|
2221
|
+
:type _request_auth: dict, optional
|
|
2222
|
+
:param _content_type: force content-type for the request.
|
|
2223
|
+
:type _content_type: str, Optional
|
|
2224
|
+
:param _headers: set to override the headers for a single
|
|
2225
|
+
request; this effectively ignores the headers
|
|
2226
|
+
in the spec for a single request.
|
|
2227
|
+
:type _headers: dict, optional
|
|
2228
|
+
:param _host_index: set to override the host_index for a single
|
|
2229
|
+
request; this effectively ignores the host_index
|
|
2230
|
+
in the spec for a single request.
|
|
2231
|
+
:type _host_index: int, optional
|
|
2232
|
+
:return: Returns the result object.
|
|
2233
|
+
""" # noqa: E501
|
|
2234
|
+
|
|
2235
|
+
_param = self._evaluators_partial_update_serialize(
|
|
2236
|
+
id=id,
|
|
2237
|
+
patched_evaluator_request=patched_evaluator_request,
|
|
2238
|
+
_request_auth=_request_auth,
|
|
2239
|
+
_content_type=_content_type,
|
|
2240
|
+
_headers=_headers,
|
|
2241
|
+
_host_index=_host_index,
|
|
2242
|
+
)
|
|
2243
|
+
|
|
2244
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2245
|
+
"200": "Evaluator",
|
|
2246
|
+
}
|
|
2247
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2248
|
+
response_data.read()
|
|
2249
|
+
return self.api_client.response_deserialize(
|
|
2250
|
+
response_data=response_data,
|
|
2251
|
+
response_types_map=_response_types_map,
|
|
2252
|
+
)
|
|
2253
|
+
|
|
2254
|
+
@validate_call
|
|
2255
|
+
def evaluators_partial_update_without_preload_content(
|
|
2256
|
+
self,
|
|
2257
|
+
id: StrictStr,
|
|
2258
|
+
patched_evaluator_request: Optional[PatchedEvaluatorRequest] = None,
|
|
2259
|
+
_request_timeout: Union[
|
|
2260
|
+
None,
|
|
2261
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2262
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2263
|
+
] = None,
|
|
2264
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2265
|
+
_content_type: Optional[StrictStr] = None,
|
|
2266
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2267
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2268
|
+
) -> RESTResponseType:
|
|
2269
|
+
"""evaluators_partial_update
|
|
2270
|
+
|
|
2271
|
+
Update an evaluator. All fields are optional.
|
|
2272
|
+
|
|
2273
|
+
:param id: (required)
|
|
2274
|
+
:type id: str
|
|
2275
|
+
:param patched_evaluator_request:
|
|
2276
|
+
:type patched_evaluator_request: PatchedEvaluatorRequest
|
|
2277
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2278
|
+
number provided, it will be total request
|
|
2279
|
+
timeout. It can also be a pair (tuple) of
|
|
2280
|
+
(connection, read) timeouts.
|
|
2281
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2282
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2283
|
+
request; this effectively ignores the
|
|
2284
|
+
authentication in the spec for a single request.
|
|
2285
|
+
:type _request_auth: dict, optional
|
|
2286
|
+
:param _content_type: force content-type for the request.
|
|
2287
|
+
:type _content_type: str, Optional
|
|
2288
|
+
:param _headers: set to override the headers for a single
|
|
2289
|
+
request; this effectively ignores the headers
|
|
2290
|
+
in the spec for a single request.
|
|
2291
|
+
:type _headers: dict, optional
|
|
2292
|
+
:param _host_index: set to override the host_index for a single
|
|
2293
|
+
request; this effectively ignores the host_index
|
|
2294
|
+
in the spec for a single request.
|
|
2295
|
+
:type _host_index: int, optional
|
|
2296
|
+
:return: Returns the result object.
|
|
2297
|
+
""" # noqa: E501
|
|
2298
|
+
|
|
2299
|
+
_param = self._evaluators_partial_update_serialize(
|
|
2300
|
+
id=id,
|
|
2301
|
+
patched_evaluator_request=patched_evaluator_request,
|
|
2302
|
+
_request_auth=_request_auth,
|
|
2303
|
+
_content_type=_content_type,
|
|
2304
|
+
_headers=_headers,
|
|
2305
|
+
_host_index=_host_index,
|
|
2306
|
+
)
|
|
2307
|
+
|
|
2308
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2309
|
+
"200": "Evaluator",
|
|
2310
|
+
}
|
|
2311
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2312
|
+
return response_data.response
|
|
2313
|
+
|
|
2314
|
+
def _evaluators_partial_update_serialize(
|
|
2315
|
+
self,
|
|
2316
|
+
id,
|
|
2317
|
+
patched_evaluator_request,
|
|
2318
|
+
_request_auth,
|
|
2319
|
+
_content_type,
|
|
2320
|
+
_headers,
|
|
2321
|
+
_host_index,
|
|
2322
|
+
) -> RequestSerialized:
|
|
2323
|
+
_host = None
|
|
2324
|
+
|
|
2325
|
+
_collection_formats: Dict[str, str] = {}
|
|
2326
|
+
|
|
2327
|
+
_path_params: Dict[str, str] = {}
|
|
2328
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2329
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2330
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2331
|
+
_files: Dict[str, str] = {}
|
|
2332
|
+
_body_params: Optional[bytes] = None
|
|
2333
|
+
|
|
2334
|
+
# process the path parameters
|
|
2335
|
+
if id is not None:
|
|
2336
|
+
_path_params["id"] = id
|
|
2337
|
+
# process the query parameters
|
|
2338
|
+
# process the header parameters
|
|
2339
|
+
# process the form parameters
|
|
2340
|
+
# process the body parameter
|
|
2341
|
+
if patched_evaluator_request is not None:
|
|
2342
|
+
_body_params = patched_evaluator_request
|
|
2343
|
+
|
|
2344
|
+
# set the HTTP header `Accept`
|
|
2345
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2346
|
+
|
|
2347
|
+
# set the HTTP header `Content-Type`
|
|
2348
|
+
if _content_type:
|
|
2349
|
+
_header_params["Content-Type"] = _content_type
|
|
2350
|
+
else:
|
|
2351
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
2352
|
+
["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
|
|
2353
|
+
)
|
|
2354
|
+
if _default_content_type is not None:
|
|
2355
|
+
_header_params["Content-Type"] = _default_content_type
|
|
2356
|
+
|
|
2357
|
+
# authentication setting
|
|
2358
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
2359
|
+
|
|
2360
|
+
return self.api_client.param_serialize(
|
|
2361
|
+
method="PATCH",
|
|
2362
|
+
resource_path="/v1/evaluators/{id}/",
|
|
2363
|
+
path_params=_path_params,
|
|
2364
|
+
query_params=_query_params,
|
|
2365
|
+
header_params=_header_params,
|
|
2366
|
+
body=_body_params,
|
|
2367
|
+
post_params=_form_params,
|
|
2368
|
+
files=_files,
|
|
2369
|
+
auth_settings=_auth_settings,
|
|
2370
|
+
collection_formats=_collection_formats,
|
|
2371
|
+
_host=_host,
|
|
2372
|
+
_request_auth=_request_auth,
|
|
2373
|
+
)
|
|
2374
|
+
|
|
2375
|
+
@validate_call
|
|
2376
|
+
def evaluators_retrieve(
|
|
2377
|
+
self,
|
|
2378
|
+
id: StrictStr,
|
|
2379
|
+
include_last_n_validator_results: Annotated[
|
|
2380
|
+
Optional[StrictInt],
|
|
2381
|
+
Field(description="Include the last N validator results for each validator in the response."),
|
|
2382
|
+
] = None,
|
|
2383
|
+
version_id: Annotated[Optional[StrictStr], Field(description="Get a specific version of the evaluator")] = None,
|
|
2384
|
+
_request_timeout: Union[
|
|
2385
|
+
None,
|
|
2386
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2387
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2388
|
+
] = None,
|
|
2389
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2390
|
+
_content_type: Optional[StrictStr] = None,
|
|
2391
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2392
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2393
|
+
) -> Evaluator:
|
|
2394
|
+
"""evaluators_retrieve
|
|
2395
|
+
|
|
2396
|
+
Get evaluator details. The response includes a 'requirements' field that specifies what parameters are required for execution. The requirements field indicates whether the evaluator requires request, response, contexts, functions, expected_output, or reference variables.
|
|
2397
|
+
|
|
2398
|
+
:param id: (required)
|
|
2399
|
+
:type id: str
|
|
2400
|
+
:param include_last_n_validator_results: Include the last N validator results for each validator in the response.
|
|
2401
|
+
:type include_last_n_validator_results: int
|
|
2402
|
+
:param version_id: Get a specific version of the evaluator
|
|
2403
|
+
:type version_id: str
|
|
2404
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2405
|
+
number provided, it will be total request
|
|
2406
|
+
timeout. It can also be a pair (tuple) of
|
|
2407
|
+
(connection, read) timeouts.
|
|
2408
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2409
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2410
|
+
request; this effectively ignores the
|
|
2411
|
+
authentication in the spec for a single request.
|
|
2412
|
+
:type _request_auth: dict, optional
|
|
2413
|
+
:param _content_type: force content-type for the request.
|
|
2414
|
+
:type _content_type: str, Optional
|
|
2415
|
+
:param _headers: set to override the headers for a single
|
|
2416
|
+
request; this effectively ignores the headers
|
|
2417
|
+
in the spec for a single request.
|
|
2418
|
+
:type _headers: dict, optional
|
|
2419
|
+
:param _host_index: set to override the host_index for a single
|
|
2420
|
+
request; this effectively ignores the host_index
|
|
2421
|
+
in the spec for a single request.
|
|
2422
|
+
:type _host_index: int, optional
|
|
2423
|
+
:return: Returns the result object.
|
|
2424
|
+
""" # noqa: E501
|
|
2425
|
+
|
|
2426
|
+
_param = self._evaluators_retrieve_serialize(
|
|
2427
|
+
id=id,
|
|
2428
|
+
include_last_n_validator_results=include_last_n_validator_results,
|
|
2429
|
+
version_id=version_id,
|
|
2430
|
+
_request_auth=_request_auth,
|
|
2431
|
+
_content_type=_content_type,
|
|
2432
|
+
_headers=_headers,
|
|
2433
|
+
_host_index=_host_index,
|
|
2434
|
+
)
|
|
2435
|
+
|
|
2436
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2437
|
+
"200": "Evaluator",
|
|
2438
|
+
}
|
|
2439
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2440
|
+
response_data.read()
|
|
2441
|
+
return self.api_client.response_deserialize(
|
|
2442
|
+
response_data=response_data,
|
|
2443
|
+
response_types_map=_response_types_map,
|
|
2444
|
+
).data
|
|
2445
|
+
|
|
2446
|
+
@validate_call
|
|
2447
|
+
def evaluators_retrieve_with_http_info(
|
|
2448
|
+
self,
|
|
2449
|
+
id: StrictStr,
|
|
2450
|
+
include_last_n_validator_results: Annotated[
|
|
2451
|
+
Optional[StrictInt],
|
|
2452
|
+
Field(description="Include the last N validator results for each validator in the response."),
|
|
2453
|
+
] = None,
|
|
2454
|
+
version_id: Annotated[Optional[StrictStr], Field(description="Get a specific version of the evaluator")] = None,
|
|
2455
|
+
_request_timeout: Union[
|
|
2456
|
+
None,
|
|
2457
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2458
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2459
|
+
] = None,
|
|
2460
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2461
|
+
_content_type: Optional[StrictStr] = None,
|
|
2462
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2463
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2464
|
+
) -> ApiResponse[Evaluator]:
|
|
2465
|
+
"""evaluators_retrieve
|
|
2466
|
+
|
|
2467
|
+
Get evaluator details. The response includes a 'requirements' field that specifies what parameters are required for execution. The requirements field indicates whether the evaluator requires request, response, contexts, functions, expected_output, or reference variables.
|
|
2468
|
+
|
|
2469
|
+
:param id: (required)
|
|
2470
|
+
:type id: str
|
|
2471
|
+
:param include_last_n_validator_results: Include the last N validator results for each validator in the response.
|
|
2472
|
+
:type include_last_n_validator_results: int
|
|
2473
|
+
:param version_id: Get a specific version of the evaluator
|
|
2474
|
+
:type version_id: str
|
|
2475
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2476
|
+
number provided, it will be total request
|
|
2477
|
+
timeout. It can also be a pair (tuple) of
|
|
2478
|
+
(connection, read) timeouts.
|
|
2479
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2480
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2481
|
+
request; this effectively ignores the
|
|
2482
|
+
authentication in the spec for a single request.
|
|
2483
|
+
:type _request_auth: dict, optional
|
|
2484
|
+
:param _content_type: force content-type for the request.
|
|
2485
|
+
:type _content_type: str, Optional
|
|
2486
|
+
:param _headers: set to override the headers for a single
|
|
2487
|
+
request; this effectively ignores the headers
|
|
2488
|
+
in the spec for a single request.
|
|
2489
|
+
:type _headers: dict, optional
|
|
2490
|
+
:param _host_index: set to override the host_index for a single
|
|
2491
|
+
request; this effectively ignores the host_index
|
|
2492
|
+
in the spec for a single request.
|
|
2493
|
+
:type _host_index: int, optional
|
|
2494
|
+
:return: Returns the result object.
|
|
2495
|
+
""" # noqa: E501
|
|
2496
|
+
|
|
2497
|
+
_param = self._evaluators_retrieve_serialize(
|
|
2498
|
+
id=id,
|
|
2499
|
+
include_last_n_validator_results=include_last_n_validator_results,
|
|
2500
|
+
version_id=version_id,
|
|
2501
|
+
_request_auth=_request_auth,
|
|
2502
|
+
_content_type=_content_type,
|
|
2503
|
+
_headers=_headers,
|
|
2504
|
+
_host_index=_host_index,
|
|
2505
|
+
)
|
|
2506
|
+
|
|
2507
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2508
|
+
"200": "Evaluator",
|
|
2509
|
+
}
|
|
2510
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2511
|
+
response_data.read()
|
|
2512
|
+
return self.api_client.response_deserialize(
|
|
2513
|
+
response_data=response_data,
|
|
2514
|
+
response_types_map=_response_types_map,
|
|
2515
|
+
)
|
|
2516
|
+
|
|
2517
|
+
@validate_call
|
|
2518
|
+
def evaluators_retrieve_without_preload_content(
|
|
2519
|
+
self,
|
|
2520
|
+
id: StrictStr,
|
|
2521
|
+
include_last_n_validator_results: Annotated[
|
|
2522
|
+
Optional[StrictInt],
|
|
2523
|
+
Field(description="Include the last N validator results for each validator in the response."),
|
|
2524
|
+
] = None,
|
|
2525
|
+
version_id: Annotated[Optional[StrictStr], Field(description="Get a specific version of the evaluator")] = None,
|
|
2526
|
+
_request_timeout: Union[
|
|
2527
|
+
None,
|
|
2528
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2529
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2530
|
+
] = None,
|
|
2531
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2532
|
+
_content_type: Optional[StrictStr] = None,
|
|
2533
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2534
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2535
|
+
) -> RESTResponseType:
|
|
2536
|
+
"""evaluators_retrieve
|
|
2537
|
+
|
|
2538
|
+
Get evaluator details. The response includes a 'requirements' field that specifies what parameters are required for execution. The requirements field indicates whether the evaluator requires request, response, contexts, functions, expected_output, or reference variables.
|
|
2539
|
+
|
|
2540
|
+
:param id: (required)
|
|
2541
|
+
:type id: str
|
|
2542
|
+
:param include_last_n_validator_results: Include the last N validator results for each validator in the response.
|
|
2543
|
+
:type include_last_n_validator_results: int
|
|
2544
|
+
:param version_id: Get a specific version of the evaluator
|
|
2545
|
+
:type version_id: str
|
|
2546
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2547
|
+
number provided, it will be total request
|
|
2548
|
+
timeout. It can also be a pair (tuple) of
|
|
2549
|
+
(connection, read) timeouts.
|
|
2550
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2551
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2552
|
+
request; this effectively ignores the
|
|
2553
|
+
authentication in the spec for a single request.
|
|
2554
|
+
:type _request_auth: dict, optional
|
|
2555
|
+
:param _content_type: force content-type for the request.
|
|
2556
|
+
:type _content_type: str, Optional
|
|
2557
|
+
:param _headers: set to override the headers for a single
|
|
2558
|
+
request; this effectively ignores the headers
|
|
2559
|
+
in the spec for a single request.
|
|
2560
|
+
:type _headers: dict, optional
|
|
2561
|
+
:param _host_index: set to override the host_index for a single
|
|
2562
|
+
request; this effectively ignores the host_index
|
|
2563
|
+
in the spec for a single request.
|
|
2564
|
+
:type _host_index: int, optional
|
|
2565
|
+
:return: Returns the result object.
|
|
2566
|
+
""" # noqa: E501
|
|
2567
|
+
|
|
2568
|
+
_param = self._evaluators_retrieve_serialize(
|
|
2569
|
+
id=id,
|
|
2570
|
+
include_last_n_validator_results=include_last_n_validator_results,
|
|
2571
|
+
version_id=version_id,
|
|
2572
|
+
_request_auth=_request_auth,
|
|
2573
|
+
_content_type=_content_type,
|
|
2574
|
+
_headers=_headers,
|
|
2575
|
+
_host_index=_host_index,
|
|
2576
|
+
)
|
|
2577
|
+
|
|
2578
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2579
|
+
"200": "Evaluator",
|
|
2580
|
+
}
|
|
2581
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2582
|
+
return response_data.response
|
|
2583
|
+
|
|
2584
|
+
def _evaluators_retrieve_serialize(
|
|
2585
|
+
self,
|
|
2586
|
+
id,
|
|
2587
|
+
include_last_n_validator_results,
|
|
2588
|
+
version_id,
|
|
2589
|
+
_request_auth,
|
|
2590
|
+
_content_type,
|
|
2591
|
+
_headers,
|
|
2592
|
+
_host_index,
|
|
2593
|
+
) -> RequestSerialized:
|
|
2594
|
+
_host = None
|
|
2595
|
+
|
|
2596
|
+
_collection_formats: Dict[str, str] = {}
|
|
2597
|
+
|
|
2598
|
+
_path_params: Dict[str, str] = {}
|
|
2599
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2600
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2601
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2602
|
+
_files: Dict[str, str] = {}
|
|
2603
|
+
_body_params: Optional[bytes] = None
|
|
2604
|
+
|
|
2605
|
+
# process the path parameters
|
|
2606
|
+
if id is not None:
|
|
2607
|
+
_path_params["id"] = id
|
|
2608
|
+
# process the query parameters
|
|
2609
|
+
if include_last_n_validator_results is not None:
|
|
2610
|
+
_query_params.append(("include_last_n_validator_results", include_last_n_validator_results))
|
|
2611
|
+
|
|
2612
|
+
if version_id is not None:
|
|
2613
|
+
_query_params.append(("version_id", version_id))
|
|
2614
|
+
|
|
2615
|
+
# process the header parameters
|
|
2616
|
+
# process the form parameters
|
|
2617
|
+
# process the body parameter
|
|
2618
|
+
|
|
2619
|
+
# set the HTTP header `Accept`
|
|
2620
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2621
|
+
|
|
2622
|
+
# authentication setting
|
|
2623
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
2624
|
+
|
|
2625
|
+
return self.api_client.param_serialize(
|
|
2626
|
+
method="GET",
|
|
2627
|
+
resource_path="/v1/evaluators/{id}/",
|
|
2628
|
+
path_params=_path_params,
|
|
2629
|
+
query_params=_query_params,
|
|
2630
|
+
header_params=_header_params,
|
|
2631
|
+
body=_body_params,
|
|
2632
|
+
post_params=_form_params,
|
|
2633
|
+
files=_files,
|
|
2634
|
+
auth_settings=_auth_settings,
|
|
2635
|
+
collection_formats=_collection_formats,
|
|
2636
|
+
_host=_host,
|
|
2637
|
+
_request_auth=_request_auth,
|
|
2638
|
+
)
|
|
2639
|
+
|
|
2640
|
+
@validate_call
|
|
2641
|
+
def evaluators_status_create(
|
|
2642
|
+
self,
|
|
2643
|
+
id: StrictStr,
|
|
2644
|
+
status_change_request: StatusChangeRequest,
|
|
2645
|
+
_request_timeout: Union[
|
|
2646
|
+
None,
|
|
2647
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2648
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2649
|
+
] = None,
|
|
2650
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2651
|
+
_content_type: Optional[StrictStr] = None,
|
|
2652
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2653
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2654
|
+
) -> StatusChange:
|
|
2655
|
+
"""evaluators_status_create
|
|
2656
|
+
|
|
2657
|
+
Change the status of an evaluator
|
|
2658
|
+
|
|
2659
|
+
:param id: (required)
|
|
2660
|
+
:type id: str
|
|
2661
|
+
:param status_change_request: (required)
|
|
2662
|
+
:type status_change_request: StatusChangeRequest
|
|
2663
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2664
|
+
number provided, it will be total request
|
|
2665
|
+
timeout. It can also be a pair (tuple) of
|
|
2666
|
+
(connection, read) timeouts.
|
|
2667
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2668
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2669
|
+
request; this effectively ignores the
|
|
2670
|
+
authentication in the spec for a single request.
|
|
2671
|
+
:type _request_auth: dict, optional
|
|
2672
|
+
:param _content_type: force content-type for the request.
|
|
2673
|
+
:type _content_type: str, Optional
|
|
2674
|
+
:param _headers: set to override the headers for a single
|
|
2675
|
+
request; this effectively ignores the headers
|
|
2676
|
+
in the spec for a single request.
|
|
2677
|
+
:type _headers: dict, optional
|
|
2678
|
+
:param _host_index: set to override the host_index for a single
|
|
2679
|
+
request; this effectively ignores the host_index
|
|
2680
|
+
in the spec for a single request.
|
|
2681
|
+
:type _host_index: int, optional
|
|
2682
|
+
:return: Returns the result object.
|
|
2683
|
+
""" # noqa: E501
|
|
2684
|
+
|
|
2685
|
+
_param = self._evaluators_status_create_serialize(
|
|
2686
|
+
id=id,
|
|
2687
|
+
status_change_request=status_change_request,
|
|
2688
|
+
_request_auth=_request_auth,
|
|
2689
|
+
_content_type=_content_type,
|
|
2690
|
+
_headers=_headers,
|
|
2691
|
+
_host_index=_host_index,
|
|
2692
|
+
)
|
|
2693
|
+
|
|
2694
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2695
|
+
"200": "StatusChange",
|
|
2696
|
+
}
|
|
2697
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2698
|
+
response_data.read()
|
|
2699
|
+
return self.api_client.response_deserialize(
|
|
2700
|
+
response_data=response_data,
|
|
2701
|
+
response_types_map=_response_types_map,
|
|
2702
|
+
).data
|
|
2703
|
+
|
|
2704
|
+
@validate_call
|
|
2705
|
+
def evaluators_status_create_with_http_info(
|
|
2706
|
+
self,
|
|
2707
|
+
id: StrictStr,
|
|
2708
|
+
status_change_request: StatusChangeRequest,
|
|
2709
|
+
_request_timeout: Union[
|
|
2710
|
+
None,
|
|
2711
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2712
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2713
|
+
] = None,
|
|
2714
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2715
|
+
_content_type: Optional[StrictStr] = None,
|
|
2716
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2717
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2718
|
+
) -> ApiResponse[StatusChange]:
|
|
2719
|
+
"""evaluators_status_create
|
|
2720
|
+
|
|
2721
|
+
Change the status of an evaluator
|
|
2722
|
+
|
|
2723
|
+
:param id: (required)
|
|
2724
|
+
:type id: str
|
|
2725
|
+
:param status_change_request: (required)
|
|
2726
|
+
:type status_change_request: StatusChangeRequest
|
|
2727
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2728
|
+
number provided, it will be total request
|
|
2729
|
+
timeout. It can also be a pair (tuple) of
|
|
2730
|
+
(connection, read) timeouts.
|
|
2731
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2732
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2733
|
+
request; this effectively ignores the
|
|
2734
|
+
authentication in the spec for a single request.
|
|
2735
|
+
:type _request_auth: dict, optional
|
|
2736
|
+
:param _content_type: force content-type for the request.
|
|
2737
|
+
:type _content_type: str, Optional
|
|
2738
|
+
:param _headers: set to override the headers for a single
|
|
2739
|
+
request; this effectively ignores the headers
|
|
2740
|
+
in the spec for a single request.
|
|
2741
|
+
:type _headers: dict, optional
|
|
2742
|
+
:param _host_index: set to override the host_index for a single
|
|
2743
|
+
request; this effectively ignores the host_index
|
|
2744
|
+
in the spec for a single request.
|
|
2745
|
+
:type _host_index: int, optional
|
|
2746
|
+
:return: Returns the result object.
|
|
2747
|
+
""" # noqa: E501
|
|
2748
|
+
|
|
2749
|
+
_param = self._evaluators_status_create_serialize(
|
|
2750
|
+
id=id,
|
|
2751
|
+
status_change_request=status_change_request,
|
|
2752
|
+
_request_auth=_request_auth,
|
|
2753
|
+
_content_type=_content_type,
|
|
2754
|
+
_headers=_headers,
|
|
2755
|
+
_host_index=_host_index,
|
|
2756
|
+
)
|
|
2757
|
+
|
|
2758
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2759
|
+
"200": "StatusChange",
|
|
2760
|
+
}
|
|
2761
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2762
|
+
response_data.read()
|
|
2763
|
+
return self.api_client.response_deserialize(
|
|
2764
|
+
response_data=response_data,
|
|
2765
|
+
response_types_map=_response_types_map,
|
|
2766
|
+
)
|
|
2767
|
+
|
|
2768
|
+
@validate_call
|
|
2769
|
+
def evaluators_status_create_without_preload_content(
|
|
2770
|
+
self,
|
|
2771
|
+
id: StrictStr,
|
|
2772
|
+
status_change_request: StatusChangeRequest,
|
|
2773
|
+
_request_timeout: Union[
|
|
2774
|
+
None,
|
|
2775
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2776
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2777
|
+
] = None,
|
|
2778
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2779
|
+
_content_type: Optional[StrictStr] = None,
|
|
2780
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2781
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2782
|
+
) -> RESTResponseType:
|
|
2783
|
+
"""evaluators_status_create
|
|
2784
|
+
|
|
2785
|
+
Change the status of an evaluator
|
|
2786
|
+
|
|
2787
|
+
:param id: (required)
|
|
2788
|
+
:type id: str
|
|
2789
|
+
:param status_change_request: (required)
|
|
2790
|
+
:type status_change_request: StatusChangeRequest
|
|
2791
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2792
|
+
number provided, it will be total request
|
|
2793
|
+
timeout. It can also be a pair (tuple) of
|
|
2794
|
+
(connection, read) timeouts.
|
|
2795
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2796
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2797
|
+
request; this effectively ignores the
|
|
2798
|
+
authentication in the spec for a single request.
|
|
2799
|
+
:type _request_auth: dict, optional
|
|
2800
|
+
:param _content_type: force content-type for the request.
|
|
2801
|
+
:type _content_type: str, Optional
|
|
2802
|
+
:param _headers: set to override the headers for a single
|
|
2803
|
+
request; this effectively ignores the headers
|
|
2804
|
+
in the spec for a single request.
|
|
2805
|
+
:type _headers: dict, optional
|
|
2806
|
+
:param _host_index: set to override the host_index for a single
|
|
2807
|
+
request; this effectively ignores the host_index
|
|
2808
|
+
in the spec for a single request.
|
|
2809
|
+
:type _host_index: int, optional
|
|
2810
|
+
:return: Returns the result object.
|
|
2811
|
+
""" # noqa: E501
|
|
2812
|
+
|
|
2813
|
+
_param = self._evaluators_status_create_serialize(
|
|
2814
|
+
id=id,
|
|
2815
|
+
status_change_request=status_change_request,
|
|
2816
|
+
_request_auth=_request_auth,
|
|
2817
|
+
_content_type=_content_type,
|
|
2818
|
+
_headers=_headers,
|
|
2819
|
+
_host_index=_host_index,
|
|
2820
|
+
)
|
|
2821
|
+
|
|
2822
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2823
|
+
"200": "StatusChange",
|
|
2824
|
+
}
|
|
2825
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2826
|
+
return response_data.response
|
|
2827
|
+
|
|
2828
|
+
def _evaluators_status_create_serialize(
|
|
2829
|
+
self,
|
|
2830
|
+
id,
|
|
2831
|
+
status_change_request,
|
|
2832
|
+
_request_auth,
|
|
2833
|
+
_content_type,
|
|
2834
|
+
_headers,
|
|
2835
|
+
_host_index,
|
|
2836
|
+
) -> RequestSerialized:
|
|
2837
|
+
_host = None
|
|
2838
|
+
|
|
2839
|
+
_collection_formats: Dict[str, str] = {}
|
|
2840
|
+
|
|
2841
|
+
_path_params: Dict[str, str] = {}
|
|
2842
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2843
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2844
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2845
|
+
_files: Dict[str, str] = {}
|
|
2846
|
+
_body_params: Optional[bytes] = None
|
|
2847
|
+
|
|
2848
|
+
# process the path parameters
|
|
2849
|
+
if id is not None:
|
|
2850
|
+
_path_params["id"] = id
|
|
2851
|
+
# process the query parameters
|
|
2852
|
+
# process the header parameters
|
|
2853
|
+
# process the form parameters
|
|
2854
|
+
# process the body parameter
|
|
2855
|
+
if status_change_request is not None:
|
|
2856
|
+
_body_params = status_change_request
|
|
2857
|
+
|
|
2858
|
+
# set the HTTP header `Accept`
|
|
2859
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2860
|
+
|
|
2861
|
+
# set the HTTP header `Content-Type`
|
|
2862
|
+
if _content_type:
|
|
2863
|
+
_header_params["Content-Type"] = _content_type
|
|
2864
|
+
else:
|
|
2865
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
2866
|
+
["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
|
|
2867
|
+
)
|
|
2868
|
+
if _default_content_type is not None:
|
|
2869
|
+
_header_params["Content-Type"] = _default_content_type
|
|
2870
|
+
|
|
2871
|
+
# authentication setting
|
|
2872
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
2873
|
+
|
|
2874
|
+
return self.api_client.param_serialize(
|
|
2875
|
+
method="POST",
|
|
2876
|
+
resource_path="/v1/evaluators/status/{id}/",
|
|
2877
|
+
path_params=_path_params,
|
|
2878
|
+
query_params=_query_params,
|
|
2879
|
+
header_params=_header_params,
|
|
2880
|
+
body=_body_params,
|
|
2881
|
+
post_params=_form_params,
|
|
2882
|
+
files=_files,
|
|
2883
|
+
auth_settings=_auth_settings,
|
|
2884
|
+
collection_formats=_collection_formats,
|
|
2885
|
+
_host=_host,
|
|
2886
|
+
_request_auth=_request_auth,
|
|
2887
|
+
)
|
|
2888
|
+
|
|
2889
|
+
@validate_call
|
|
2890
|
+
def evaluators_status_update(
|
|
2891
|
+
self,
|
|
2892
|
+
id: StrictStr,
|
|
2893
|
+
status_change_request: StatusChangeRequest,
|
|
2894
|
+
_request_timeout: Union[
|
|
2895
|
+
None,
|
|
2896
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2897
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2898
|
+
] = None,
|
|
2899
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2900
|
+
_content_type: Optional[StrictStr] = None,
|
|
2901
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2902
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2903
|
+
) -> StatusChange:
|
|
2904
|
+
"""evaluators_status_update
|
|
2905
|
+
|
|
2906
|
+
Change the status of an evaluator
|
|
2907
|
+
|
|
2908
|
+
:param id: (required)
|
|
2909
|
+
:type id: str
|
|
2910
|
+
:param status_change_request: (required)
|
|
2911
|
+
:type status_change_request: StatusChangeRequest
|
|
2912
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2913
|
+
number provided, it will be total request
|
|
2914
|
+
timeout. It can also be a pair (tuple) of
|
|
2915
|
+
(connection, read) timeouts.
|
|
2916
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2917
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2918
|
+
request; this effectively ignores the
|
|
2919
|
+
authentication in the spec for a single request.
|
|
2920
|
+
:type _request_auth: dict, optional
|
|
2921
|
+
:param _content_type: force content-type for the request.
|
|
2922
|
+
:type _content_type: str, Optional
|
|
2923
|
+
:param _headers: set to override the headers for a single
|
|
2924
|
+
request; this effectively ignores the headers
|
|
2925
|
+
in the spec for a single request.
|
|
2926
|
+
:type _headers: dict, optional
|
|
2927
|
+
:param _host_index: set to override the host_index for a single
|
|
2928
|
+
request; this effectively ignores the host_index
|
|
2929
|
+
in the spec for a single request.
|
|
2930
|
+
:type _host_index: int, optional
|
|
2931
|
+
:return: Returns the result object.
|
|
2932
|
+
""" # noqa: E501
|
|
2933
|
+
|
|
2934
|
+
_param = self._evaluators_status_update_serialize(
|
|
2935
|
+
id=id,
|
|
2936
|
+
status_change_request=status_change_request,
|
|
2937
|
+
_request_auth=_request_auth,
|
|
2938
|
+
_content_type=_content_type,
|
|
2939
|
+
_headers=_headers,
|
|
2940
|
+
_host_index=_host_index,
|
|
2941
|
+
)
|
|
2942
|
+
|
|
2943
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2944
|
+
"200": "StatusChange",
|
|
2945
|
+
}
|
|
2946
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2947
|
+
response_data.read()
|
|
2948
|
+
return self.api_client.response_deserialize(
|
|
2949
|
+
response_data=response_data,
|
|
2950
|
+
response_types_map=_response_types_map,
|
|
2951
|
+
).data
|
|
2952
|
+
|
|
2953
|
+
@validate_call
|
|
2954
|
+
def evaluators_status_update_with_http_info(
|
|
2955
|
+
self,
|
|
2956
|
+
id: StrictStr,
|
|
2957
|
+
status_change_request: StatusChangeRequest,
|
|
2958
|
+
_request_timeout: Union[
|
|
2959
|
+
None,
|
|
2960
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2961
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2962
|
+
] = None,
|
|
2963
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2964
|
+
_content_type: Optional[StrictStr] = None,
|
|
2965
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2966
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2967
|
+
) -> ApiResponse[StatusChange]:
|
|
2968
|
+
"""evaluators_status_update
|
|
2969
|
+
|
|
2970
|
+
Change the status of an evaluator
|
|
2971
|
+
|
|
2972
|
+
:param id: (required)
|
|
2973
|
+
:type id: str
|
|
2974
|
+
:param status_change_request: (required)
|
|
2975
|
+
:type status_change_request: StatusChangeRequest
|
|
2976
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2977
|
+
number provided, it will be total request
|
|
2978
|
+
timeout. It can also be a pair (tuple) of
|
|
2979
|
+
(connection, read) timeouts.
|
|
2980
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2981
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2982
|
+
request; this effectively ignores the
|
|
2983
|
+
authentication in the spec for a single request.
|
|
2984
|
+
:type _request_auth: dict, optional
|
|
2985
|
+
:param _content_type: force content-type for the request.
|
|
2986
|
+
:type _content_type: str, Optional
|
|
2987
|
+
:param _headers: set to override the headers for a single
|
|
2988
|
+
request; this effectively ignores the headers
|
|
2989
|
+
in the spec for a single request.
|
|
2990
|
+
:type _headers: dict, optional
|
|
2991
|
+
:param _host_index: set to override the host_index for a single
|
|
2992
|
+
request; this effectively ignores the host_index
|
|
2993
|
+
in the spec for a single request.
|
|
2994
|
+
:type _host_index: int, optional
|
|
2995
|
+
:return: Returns the result object.
|
|
2996
|
+
""" # noqa: E501
|
|
2997
|
+
|
|
2998
|
+
_param = self._evaluators_status_update_serialize(
|
|
2999
|
+
id=id,
|
|
3000
|
+
status_change_request=status_change_request,
|
|
3001
|
+
_request_auth=_request_auth,
|
|
3002
|
+
_content_type=_content_type,
|
|
3003
|
+
_headers=_headers,
|
|
3004
|
+
_host_index=_host_index,
|
|
3005
|
+
)
|
|
3006
|
+
|
|
3007
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3008
|
+
"200": "StatusChange",
|
|
3009
|
+
}
|
|
3010
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3011
|
+
response_data.read()
|
|
3012
|
+
return self.api_client.response_deserialize(
|
|
3013
|
+
response_data=response_data,
|
|
3014
|
+
response_types_map=_response_types_map,
|
|
3015
|
+
)
|
|
3016
|
+
|
|
3017
|
+
@validate_call
|
|
3018
|
+
def evaluators_status_update_without_preload_content(
|
|
3019
|
+
self,
|
|
3020
|
+
id: StrictStr,
|
|
3021
|
+
status_change_request: StatusChangeRequest,
|
|
3022
|
+
_request_timeout: Union[
|
|
3023
|
+
None,
|
|
3024
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3025
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3026
|
+
] = None,
|
|
3027
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3028
|
+
_content_type: Optional[StrictStr] = None,
|
|
3029
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3030
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3031
|
+
) -> RESTResponseType:
|
|
3032
|
+
"""evaluators_status_update
|
|
3033
|
+
|
|
3034
|
+
Change the status of an evaluator
|
|
3035
|
+
|
|
3036
|
+
:param id: (required)
|
|
3037
|
+
:type id: str
|
|
3038
|
+
:param status_change_request: (required)
|
|
3039
|
+
:type status_change_request: StatusChangeRequest
|
|
3040
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3041
|
+
number provided, it will be total request
|
|
3042
|
+
timeout. It can also be a pair (tuple) of
|
|
3043
|
+
(connection, read) timeouts.
|
|
3044
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3045
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3046
|
+
request; this effectively ignores the
|
|
3047
|
+
authentication in the spec for a single request.
|
|
3048
|
+
:type _request_auth: dict, optional
|
|
3049
|
+
:param _content_type: force content-type for the request.
|
|
3050
|
+
:type _content_type: str, Optional
|
|
3051
|
+
:param _headers: set to override the headers for a single
|
|
3052
|
+
request; this effectively ignores the headers
|
|
3053
|
+
in the spec for a single request.
|
|
3054
|
+
:type _headers: dict, optional
|
|
3055
|
+
:param _host_index: set to override the host_index for a single
|
|
3056
|
+
request; this effectively ignores the host_index
|
|
3057
|
+
in the spec for a single request.
|
|
3058
|
+
:type _host_index: int, optional
|
|
3059
|
+
:return: Returns the result object.
|
|
3060
|
+
""" # noqa: E501
|
|
3061
|
+
|
|
3062
|
+
_param = self._evaluators_status_update_serialize(
|
|
3063
|
+
id=id,
|
|
3064
|
+
status_change_request=status_change_request,
|
|
3065
|
+
_request_auth=_request_auth,
|
|
3066
|
+
_content_type=_content_type,
|
|
3067
|
+
_headers=_headers,
|
|
3068
|
+
_host_index=_host_index,
|
|
3069
|
+
)
|
|
3070
|
+
|
|
3071
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3072
|
+
"200": "StatusChange",
|
|
3073
|
+
}
|
|
3074
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3075
|
+
return response_data.response
|
|
3076
|
+
|
|
3077
|
+
def _evaluators_status_update_serialize(
|
|
3078
|
+
self,
|
|
3079
|
+
id,
|
|
3080
|
+
status_change_request,
|
|
3081
|
+
_request_auth,
|
|
3082
|
+
_content_type,
|
|
3083
|
+
_headers,
|
|
3084
|
+
_host_index,
|
|
3085
|
+
) -> RequestSerialized:
|
|
3086
|
+
_host = None
|
|
3087
|
+
|
|
3088
|
+
_collection_formats: Dict[str, str] = {}
|
|
3089
|
+
|
|
3090
|
+
_path_params: Dict[str, str] = {}
|
|
3091
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3092
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3093
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3094
|
+
_files: Dict[str, str] = {}
|
|
3095
|
+
_body_params: Optional[bytes] = None
|
|
3096
|
+
|
|
3097
|
+
# process the path parameters
|
|
3098
|
+
if id is not None:
|
|
3099
|
+
_path_params["id"] = id
|
|
3100
|
+
# process the query parameters
|
|
3101
|
+
# process the header parameters
|
|
3102
|
+
# process the form parameters
|
|
3103
|
+
# process the body parameter
|
|
3104
|
+
if status_change_request is not None:
|
|
3105
|
+
_body_params = status_change_request
|
|
3106
|
+
|
|
3107
|
+
# set the HTTP header `Accept`
|
|
3108
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
3109
|
+
|
|
3110
|
+
# set the HTTP header `Content-Type`
|
|
3111
|
+
if _content_type:
|
|
3112
|
+
_header_params["Content-Type"] = _content_type
|
|
3113
|
+
else:
|
|
3114
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
3115
|
+
["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
|
|
3116
|
+
)
|
|
3117
|
+
if _default_content_type is not None:
|
|
3118
|
+
_header_params["Content-Type"] = _default_content_type
|
|
3119
|
+
|
|
3120
|
+
# authentication setting
|
|
3121
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
3122
|
+
|
|
3123
|
+
return self.api_client.param_serialize(
|
|
3124
|
+
method="PUT",
|
|
3125
|
+
resource_path="/v1/evaluators/status/{id}/",
|
|
3126
|
+
path_params=_path_params,
|
|
3127
|
+
query_params=_query_params,
|
|
3128
|
+
header_params=_header_params,
|
|
3129
|
+
body=_body_params,
|
|
3130
|
+
post_params=_form_params,
|
|
3131
|
+
files=_files,
|
|
3132
|
+
auth_settings=_auth_settings,
|
|
3133
|
+
collection_formats=_collection_formats,
|
|
3134
|
+
_host=_host,
|
|
3135
|
+
_request_auth=_request_auth,
|
|
3136
|
+
)
|
|
3137
|
+
|
|
3138
|
+
@validate_call
|
|
3139
|
+
def evaluators_update(
|
|
3140
|
+
self,
|
|
3141
|
+
id: StrictStr,
|
|
3142
|
+
evaluator_request: EvaluatorRequest,
|
|
3143
|
+
_request_timeout: Union[
|
|
3144
|
+
None,
|
|
3145
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3146
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3147
|
+
] = None,
|
|
3148
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3149
|
+
_content_type: Optional[StrictStr] = None,
|
|
3150
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3151
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3152
|
+
) -> Evaluator:
|
|
3153
|
+
"""evaluators_update
|
|
3154
|
+
|
|
3155
|
+
Update an evaluator.
|
|
3156
|
+
|
|
3157
|
+
:param id: (required)
|
|
3158
|
+
:type id: str
|
|
3159
|
+
:param evaluator_request: (required)
|
|
3160
|
+
:type evaluator_request: EvaluatorRequest
|
|
3161
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3162
|
+
number provided, it will be total request
|
|
3163
|
+
timeout. It can also be a pair (tuple) of
|
|
3164
|
+
(connection, read) timeouts.
|
|
3165
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3166
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3167
|
+
request; this effectively ignores the
|
|
3168
|
+
authentication in the spec for a single request.
|
|
3169
|
+
:type _request_auth: dict, optional
|
|
3170
|
+
:param _content_type: force content-type for the request.
|
|
3171
|
+
:type _content_type: str, Optional
|
|
3172
|
+
:param _headers: set to override the headers for a single
|
|
3173
|
+
request; this effectively ignores the headers
|
|
3174
|
+
in the spec for a single request.
|
|
3175
|
+
:type _headers: dict, optional
|
|
3176
|
+
:param _host_index: set to override the host_index for a single
|
|
3177
|
+
request; this effectively ignores the host_index
|
|
3178
|
+
in the spec for a single request.
|
|
3179
|
+
:type _host_index: int, optional
|
|
3180
|
+
:return: Returns the result object.
|
|
3181
|
+
""" # noqa: E501
|
|
3182
|
+
|
|
3183
|
+
_param = self._evaluators_update_serialize(
|
|
3184
|
+
id=id,
|
|
3185
|
+
evaluator_request=evaluator_request,
|
|
3186
|
+
_request_auth=_request_auth,
|
|
3187
|
+
_content_type=_content_type,
|
|
3188
|
+
_headers=_headers,
|
|
3189
|
+
_host_index=_host_index,
|
|
3190
|
+
)
|
|
3191
|
+
|
|
3192
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3193
|
+
"200": "Evaluator",
|
|
3194
|
+
}
|
|
3195
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3196
|
+
response_data.read()
|
|
3197
|
+
return self.api_client.response_deserialize(
|
|
3198
|
+
response_data=response_data,
|
|
3199
|
+
response_types_map=_response_types_map,
|
|
3200
|
+
).data
|
|
3201
|
+
|
|
3202
|
+
@validate_call
|
|
3203
|
+
def evaluators_update_with_http_info(
|
|
3204
|
+
self,
|
|
3205
|
+
id: StrictStr,
|
|
3206
|
+
evaluator_request: EvaluatorRequest,
|
|
3207
|
+
_request_timeout: Union[
|
|
3208
|
+
None,
|
|
3209
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3210
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3211
|
+
] = None,
|
|
3212
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3213
|
+
_content_type: Optional[StrictStr] = None,
|
|
3214
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3215
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3216
|
+
) -> ApiResponse[Evaluator]:
|
|
3217
|
+
"""evaluators_update
|
|
3218
|
+
|
|
3219
|
+
Update an evaluator.
|
|
3220
|
+
|
|
3221
|
+
:param id: (required)
|
|
3222
|
+
:type id: str
|
|
3223
|
+
:param evaluator_request: (required)
|
|
3224
|
+
:type evaluator_request: EvaluatorRequest
|
|
3225
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3226
|
+
number provided, it will be total request
|
|
3227
|
+
timeout. It can also be a pair (tuple) of
|
|
3228
|
+
(connection, read) timeouts.
|
|
3229
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3230
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3231
|
+
request; this effectively ignores the
|
|
3232
|
+
authentication in the spec for a single request.
|
|
3233
|
+
:type _request_auth: dict, optional
|
|
3234
|
+
:param _content_type: force content-type for the request.
|
|
3235
|
+
:type _content_type: str, Optional
|
|
3236
|
+
:param _headers: set to override the headers for a single
|
|
3237
|
+
request; this effectively ignores the headers
|
|
3238
|
+
in the spec for a single request.
|
|
3239
|
+
:type _headers: dict, optional
|
|
3240
|
+
:param _host_index: set to override the host_index for a single
|
|
3241
|
+
request; this effectively ignores the host_index
|
|
3242
|
+
in the spec for a single request.
|
|
3243
|
+
:type _host_index: int, optional
|
|
3244
|
+
:return: Returns the result object.
|
|
3245
|
+
""" # noqa: E501
|
|
3246
|
+
|
|
3247
|
+
_param = self._evaluators_update_serialize(
|
|
3248
|
+
id=id,
|
|
3249
|
+
evaluator_request=evaluator_request,
|
|
3250
|
+
_request_auth=_request_auth,
|
|
3251
|
+
_content_type=_content_type,
|
|
3252
|
+
_headers=_headers,
|
|
3253
|
+
_host_index=_host_index,
|
|
3254
|
+
)
|
|
3255
|
+
|
|
3256
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3257
|
+
"200": "Evaluator",
|
|
3258
|
+
}
|
|
3259
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3260
|
+
response_data.read()
|
|
3261
|
+
return self.api_client.response_deserialize(
|
|
3262
|
+
response_data=response_data,
|
|
3263
|
+
response_types_map=_response_types_map,
|
|
3264
|
+
)
|
|
3265
|
+
|
|
3266
|
+
@validate_call
|
|
3267
|
+
def evaluators_update_without_preload_content(
|
|
3268
|
+
self,
|
|
3269
|
+
id: StrictStr,
|
|
3270
|
+
evaluator_request: EvaluatorRequest,
|
|
3271
|
+
_request_timeout: Union[
|
|
3272
|
+
None,
|
|
3273
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3274
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3275
|
+
] = None,
|
|
3276
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3277
|
+
_content_type: Optional[StrictStr] = None,
|
|
3278
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3279
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3280
|
+
) -> RESTResponseType:
|
|
3281
|
+
"""evaluators_update
|
|
3282
|
+
|
|
3283
|
+
Update an evaluator.
|
|
3284
|
+
|
|
3285
|
+
:param id: (required)
|
|
3286
|
+
:type id: str
|
|
3287
|
+
:param evaluator_request: (required)
|
|
3288
|
+
:type evaluator_request: EvaluatorRequest
|
|
3289
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3290
|
+
number provided, it will be total request
|
|
3291
|
+
timeout. It can also be a pair (tuple) of
|
|
3292
|
+
(connection, read) timeouts.
|
|
3293
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3294
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3295
|
+
request; this effectively ignores the
|
|
3296
|
+
authentication in the spec for a single request.
|
|
3297
|
+
:type _request_auth: dict, optional
|
|
3298
|
+
:param _content_type: force content-type for the request.
|
|
3299
|
+
:type _content_type: str, Optional
|
|
3300
|
+
:param _headers: set to override the headers for a single
|
|
3301
|
+
request; this effectively ignores the headers
|
|
3302
|
+
in the spec for a single request.
|
|
3303
|
+
:type _headers: dict, optional
|
|
3304
|
+
:param _host_index: set to override the host_index for a single
|
|
3305
|
+
request; this effectively ignores the host_index
|
|
3306
|
+
in the spec for a single request.
|
|
3307
|
+
:type _host_index: int, optional
|
|
3308
|
+
:return: Returns the result object.
|
|
3309
|
+
""" # noqa: E501
|
|
3310
|
+
|
|
3311
|
+
_param = self._evaluators_update_serialize(
|
|
3312
|
+
id=id,
|
|
3313
|
+
evaluator_request=evaluator_request,
|
|
3314
|
+
_request_auth=_request_auth,
|
|
3315
|
+
_content_type=_content_type,
|
|
3316
|
+
_headers=_headers,
|
|
3317
|
+
_host_index=_host_index,
|
|
3318
|
+
)
|
|
3319
|
+
|
|
3320
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3321
|
+
"200": "Evaluator",
|
|
3322
|
+
}
|
|
3323
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3324
|
+
return response_data.response
|
|
3325
|
+
|
|
3326
|
+
def _evaluators_update_serialize(
|
|
3327
|
+
self,
|
|
3328
|
+
id,
|
|
3329
|
+
evaluator_request,
|
|
3330
|
+
_request_auth,
|
|
3331
|
+
_content_type,
|
|
3332
|
+
_headers,
|
|
3333
|
+
_host_index,
|
|
3334
|
+
) -> RequestSerialized:
|
|
3335
|
+
_host = None
|
|
3336
|
+
|
|
3337
|
+
_collection_formats: Dict[str, str] = {}
|
|
3338
|
+
|
|
3339
|
+
_path_params: Dict[str, str] = {}
|
|
3340
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3341
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3342
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3343
|
+
_files: Dict[str, str] = {}
|
|
3344
|
+
_body_params: Optional[bytes] = None
|
|
3345
|
+
|
|
3346
|
+
# process the path parameters
|
|
3347
|
+
if id is not None:
|
|
3348
|
+
_path_params["id"] = id
|
|
3349
|
+
# process the query parameters
|
|
3350
|
+
# process the header parameters
|
|
3351
|
+
# process the form parameters
|
|
3352
|
+
# process the body parameter
|
|
3353
|
+
if evaluator_request is not None:
|
|
3354
|
+
_body_params = evaluator_request
|
|
3355
|
+
|
|
3356
|
+
# set the HTTP header `Accept`
|
|
3357
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
3358
|
+
|
|
3359
|
+
# set the HTTP header `Content-Type`
|
|
3360
|
+
if _content_type:
|
|
3361
|
+
_header_params["Content-Type"] = _content_type
|
|
3362
|
+
else:
|
|
3363
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
3364
|
+
["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
|
|
3365
|
+
)
|
|
3366
|
+
if _default_content_type is not None:
|
|
3367
|
+
_header_params["Content-Type"] = _default_content_type
|
|
3368
|
+
|
|
3369
|
+
# authentication setting
|
|
3370
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
3371
|
+
|
|
3372
|
+
return self.api_client.param_serialize(
|
|
3373
|
+
method="PUT",
|
|
3374
|
+
resource_path="/v1/evaluators/{id}/",
|
|
3375
|
+
path_params=_path_params,
|
|
3376
|
+
query_params=_query_params,
|
|
3377
|
+
header_params=_header_params,
|
|
3378
|
+
body=_body_params,
|
|
3379
|
+
post_params=_form_params,
|
|
3380
|
+
files=_files,
|
|
3381
|
+
auth_settings=_auth_settings,
|
|
3382
|
+
collection_formats=_collection_formats,
|
|
3383
|
+
_host=_host,
|
|
3384
|
+
_request_auth=_request_auth,
|
|
3385
|
+
)
|
|
3386
|
+
|
|
3387
|
+
@validate_call
|
|
3388
|
+
def evaluators_versions_list(
|
|
3389
|
+
self,
|
|
3390
|
+
id: StrictStr,
|
|
3391
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
|
|
3392
|
+
page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
|
|
3393
|
+
_request_timeout: Union[
|
|
3394
|
+
None,
|
|
3395
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3396
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3397
|
+
] = None,
|
|
3398
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3399
|
+
_content_type: Optional[StrictStr] = None,
|
|
3400
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3401
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3402
|
+
) -> PaginatedEvaluatorList:
|
|
3403
|
+
"""evaluators_versions_list
|
|
3404
|
+
|
|
3405
|
+
Get a list of all versions of an evaluator
|
|
3406
|
+
|
|
3407
|
+
:param id: (required)
|
|
3408
|
+
:type id: str
|
|
3409
|
+
:param cursor: The pagination cursor value.
|
|
3410
|
+
:type cursor: str
|
|
3411
|
+
:param page_size: Number of results to return per page.
|
|
3412
|
+
:type page_size: int
|
|
3413
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3414
|
+
number provided, it will be total request
|
|
3415
|
+
timeout. It can also be a pair (tuple) of
|
|
3416
|
+
(connection, read) timeouts.
|
|
3417
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3418
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3419
|
+
request; this effectively ignores the
|
|
3420
|
+
authentication in the spec for a single request.
|
|
3421
|
+
:type _request_auth: dict, optional
|
|
3422
|
+
:param _content_type: force content-type for the request.
|
|
3423
|
+
:type _content_type: str, Optional
|
|
3424
|
+
:param _headers: set to override the headers for a single
|
|
3425
|
+
request; this effectively ignores the headers
|
|
3426
|
+
in the spec for a single request.
|
|
3427
|
+
:type _headers: dict, optional
|
|
3428
|
+
:param _host_index: set to override the host_index for a single
|
|
3429
|
+
request; this effectively ignores the host_index
|
|
3430
|
+
in the spec for a single request.
|
|
3431
|
+
:type _host_index: int, optional
|
|
3432
|
+
:return: Returns the result object.
|
|
3433
|
+
""" # noqa: E501
|
|
3434
|
+
|
|
3435
|
+
_param = self._evaluators_versions_list_serialize(
|
|
3436
|
+
id=id,
|
|
3437
|
+
cursor=cursor,
|
|
3438
|
+
page_size=page_size,
|
|
3439
|
+
_request_auth=_request_auth,
|
|
3440
|
+
_content_type=_content_type,
|
|
3441
|
+
_headers=_headers,
|
|
3442
|
+
_host_index=_host_index,
|
|
3443
|
+
)
|
|
3444
|
+
|
|
3445
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3446
|
+
"200": "PaginatedEvaluatorList",
|
|
3447
|
+
}
|
|
3448
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3449
|
+
response_data.read()
|
|
3450
|
+
return self.api_client.response_deserialize(
|
|
3451
|
+
response_data=response_data,
|
|
3452
|
+
response_types_map=_response_types_map,
|
|
3453
|
+
).data
|
|
3454
|
+
|
|
3455
|
+
@validate_call
|
|
3456
|
+
def evaluators_versions_list_with_http_info(
|
|
3457
|
+
self,
|
|
3458
|
+
id: StrictStr,
|
|
3459
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
|
|
3460
|
+
page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
|
|
3461
|
+
_request_timeout: Union[
|
|
3462
|
+
None,
|
|
3463
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3464
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3465
|
+
] = None,
|
|
3466
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3467
|
+
_content_type: Optional[StrictStr] = None,
|
|
3468
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3469
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3470
|
+
) -> ApiResponse[PaginatedEvaluatorList]:
|
|
3471
|
+
"""evaluators_versions_list
|
|
3472
|
+
|
|
3473
|
+
Get a list of all versions of an evaluator
|
|
3474
|
+
|
|
3475
|
+
:param id: (required)
|
|
3476
|
+
:type id: str
|
|
3477
|
+
:param cursor: The pagination cursor value.
|
|
3478
|
+
:type cursor: str
|
|
3479
|
+
:param page_size: Number of results to return per page.
|
|
3480
|
+
:type page_size: int
|
|
3481
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3482
|
+
number provided, it will be total request
|
|
3483
|
+
timeout. It can also be a pair (tuple) of
|
|
3484
|
+
(connection, read) timeouts.
|
|
3485
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3486
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3487
|
+
request; this effectively ignores the
|
|
3488
|
+
authentication in the spec for a single request.
|
|
3489
|
+
:type _request_auth: dict, optional
|
|
3490
|
+
:param _content_type: force content-type for the request.
|
|
3491
|
+
:type _content_type: str, Optional
|
|
3492
|
+
:param _headers: set to override the headers for a single
|
|
3493
|
+
request; this effectively ignores the headers
|
|
3494
|
+
in the spec for a single request.
|
|
3495
|
+
:type _headers: dict, optional
|
|
3496
|
+
:param _host_index: set to override the host_index for a single
|
|
3497
|
+
request; this effectively ignores the host_index
|
|
3498
|
+
in the spec for a single request.
|
|
3499
|
+
:type _host_index: int, optional
|
|
3500
|
+
:return: Returns the result object.
|
|
3501
|
+
""" # noqa: E501
|
|
3502
|
+
|
|
3503
|
+
_param = self._evaluators_versions_list_serialize(
|
|
3504
|
+
id=id,
|
|
3505
|
+
cursor=cursor,
|
|
3506
|
+
page_size=page_size,
|
|
3507
|
+
_request_auth=_request_auth,
|
|
3508
|
+
_content_type=_content_type,
|
|
3509
|
+
_headers=_headers,
|
|
3510
|
+
_host_index=_host_index,
|
|
3511
|
+
)
|
|
3512
|
+
|
|
3513
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3514
|
+
"200": "PaginatedEvaluatorList",
|
|
3515
|
+
}
|
|
3516
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3517
|
+
response_data.read()
|
|
3518
|
+
return self.api_client.response_deserialize(
|
|
3519
|
+
response_data=response_data,
|
|
3520
|
+
response_types_map=_response_types_map,
|
|
3521
|
+
)
|
|
3522
|
+
|
|
3523
|
+
@validate_call
|
|
3524
|
+
def evaluators_versions_list_without_preload_content(
|
|
3525
|
+
self,
|
|
3526
|
+
id: StrictStr,
|
|
3527
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
|
|
3528
|
+
page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
|
|
3529
|
+
_request_timeout: Union[
|
|
3530
|
+
None,
|
|
3531
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3532
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3533
|
+
] = None,
|
|
3534
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3535
|
+
_content_type: Optional[StrictStr] = None,
|
|
3536
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3537
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3538
|
+
) -> RESTResponseType:
|
|
3539
|
+
"""evaluators_versions_list
|
|
3540
|
+
|
|
3541
|
+
Get a list of all versions of an evaluator
|
|
3542
|
+
|
|
3543
|
+
:param id: (required)
|
|
3544
|
+
:type id: str
|
|
3545
|
+
:param cursor: The pagination cursor value.
|
|
3546
|
+
:type cursor: str
|
|
3547
|
+
:param page_size: Number of results to return per page.
|
|
3548
|
+
:type page_size: int
|
|
3549
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3550
|
+
number provided, it will be total request
|
|
3551
|
+
timeout. It can also be a pair (tuple) of
|
|
3552
|
+
(connection, read) timeouts.
|
|
3553
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3554
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3555
|
+
request; this effectively ignores the
|
|
3556
|
+
authentication in the spec for a single request.
|
|
3557
|
+
:type _request_auth: dict, optional
|
|
3558
|
+
:param _content_type: force content-type for the request.
|
|
3559
|
+
:type _content_type: str, Optional
|
|
3560
|
+
:param _headers: set to override the headers for a single
|
|
3561
|
+
request; this effectively ignores the headers
|
|
3562
|
+
in the spec for a single request.
|
|
3563
|
+
:type _headers: dict, optional
|
|
3564
|
+
:param _host_index: set to override the host_index for a single
|
|
3565
|
+
request; this effectively ignores the host_index
|
|
3566
|
+
in the spec for a single request.
|
|
3567
|
+
:type _host_index: int, optional
|
|
3568
|
+
:return: Returns the result object.
|
|
3569
|
+
""" # noqa: E501
|
|
3570
|
+
|
|
3571
|
+
_param = self._evaluators_versions_list_serialize(
|
|
3572
|
+
id=id,
|
|
3573
|
+
cursor=cursor,
|
|
3574
|
+
page_size=page_size,
|
|
3575
|
+
_request_auth=_request_auth,
|
|
3576
|
+
_content_type=_content_type,
|
|
3577
|
+
_headers=_headers,
|
|
3578
|
+
_host_index=_host_index,
|
|
3579
|
+
)
|
|
3580
|
+
|
|
3581
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3582
|
+
"200": "PaginatedEvaluatorList",
|
|
3583
|
+
}
|
|
3584
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3585
|
+
return response_data.response
|
|
3586
|
+
|
|
3587
|
+
def _evaluators_versions_list_serialize(
|
|
3588
|
+
self,
|
|
3589
|
+
id,
|
|
3590
|
+
cursor,
|
|
3591
|
+
page_size,
|
|
3592
|
+
_request_auth,
|
|
3593
|
+
_content_type,
|
|
3594
|
+
_headers,
|
|
3595
|
+
_host_index,
|
|
3596
|
+
) -> RequestSerialized:
|
|
3597
|
+
_host = None
|
|
3598
|
+
|
|
3599
|
+
_collection_formats: Dict[str, str] = {}
|
|
3600
|
+
|
|
3601
|
+
_path_params: Dict[str, str] = {}
|
|
3602
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3603
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3604
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3605
|
+
_files: Dict[str, str] = {}
|
|
3606
|
+
_body_params: Optional[bytes] = None
|
|
3607
|
+
|
|
3608
|
+
# process the path parameters
|
|
3609
|
+
if id is not None:
|
|
3610
|
+
_path_params["id"] = id
|
|
3611
|
+
# process the query parameters
|
|
3612
|
+
if cursor is not None:
|
|
3613
|
+
_query_params.append(("cursor", cursor))
|
|
3614
|
+
|
|
3615
|
+
if page_size is not None:
|
|
3616
|
+
_query_params.append(("page_size", page_size))
|
|
3617
|
+
|
|
3618
|
+
# process the header parameters
|
|
3619
|
+
# process the form parameters
|
|
3620
|
+
# process the body parameter
|
|
3621
|
+
|
|
3622
|
+
# set the HTTP header `Accept`
|
|
3623
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
3624
|
+
|
|
3625
|
+
# authentication setting
|
|
3626
|
+
_auth_settings: List[str] = ["publicApiKey"]
|
|
3627
|
+
|
|
3628
|
+
return self.api_client.param_serialize(
|
|
3629
|
+
method="GET",
|
|
3630
|
+
resource_path="/v1/evaluators/versions/{id}/",
|
|
3631
|
+
path_params=_path_params,
|
|
3632
|
+
query_params=_query_params,
|
|
3633
|
+
header_params=_header_params,
|
|
3634
|
+
body=_body_params,
|
|
3635
|
+
post_params=_form_params,
|
|
3636
|
+
files=_files,
|
|
3637
|
+
auth_settings=_auth_settings,
|
|
3638
|
+
collection_formats=_collection_formats,
|
|
3639
|
+
_host=_host,
|
|
3640
|
+
_request_auth=_request_auth,
|
|
3641
|
+
)
|