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