adaptive-sdk 0.1.14__py3-none-any.whl → 0.12.1__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.
- adaptive_sdk/graphql_client/__init__.py +704 -12
- adaptive_sdk/graphql_client/custom_fields.py +1640 -960
- adaptive_sdk/graphql_client/custom_mutations.py +332 -177
- adaptive_sdk/graphql_client/custom_queries.py +278 -133
- adaptive_sdk/graphql_client/custom_typing_fields.py +74 -0
- adaptive_sdk/graphql_client/enums.py +38 -0
- adaptive_sdk/graphql_client/input_types.py +586 -213
- adaptive_sdk/resources/abtests.py +2 -0
- adaptive_sdk/resources/base_resource.py +22 -0
- adaptive_sdk/resources/chat.py +16 -7
- adaptive_sdk/resources/compute_pools.py +16 -4
- adaptive_sdk/resources/embeddings.py +11 -7
- adaptive_sdk/resources/feedback.py +22 -33
- adaptive_sdk/resources/interactions.py +6 -3
- adaptive_sdk/resources/jobs.py +90 -6
- adaptive_sdk/resources/models.py +20 -3
- adaptive_sdk/resources/permissions.py +12 -1
- adaptive_sdk/resources/recipes.py +177 -31
- adaptive_sdk/resources/roles.py +15 -8
- adaptive_sdk/resources/teams.py +30 -1
- adaptive_sdk/resources/use_cases.py +9 -6
- adaptive_sdk/resources/users.py +37 -22
- {adaptive_sdk-0.1.14.dist-info → adaptive_sdk-0.12.1.dist-info}/METADATA +1 -1
- {adaptive_sdk-0.1.14.dist-info → adaptive_sdk-0.12.1.dist-info}/RECORD +25 -25
- {adaptive_sdk-0.1.14.dist-info → adaptive_sdk-0.12.1.dist-info}/WHEEL +0 -0
|
@@ -1,280 +1,425 @@
|
|
|
1
1
|
from typing import Any, Dict, List, Optional
|
|
2
2
|
from . import CompletionGroupBy
|
|
3
|
-
from .custom_fields import
|
|
3
|
+
from .custom_fields import (
|
|
4
|
+
AbcampaignFields,
|
|
5
|
+
CompletionConnectionFields,
|
|
6
|
+
CompletionFields,
|
|
7
|
+
CompletionGroupDataConnectionFields,
|
|
8
|
+
ComputePoolFields,
|
|
9
|
+
ContractFields,
|
|
10
|
+
CustomRecipeFields,
|
|
11
|
+
DatasetFields,
|
|
12
|
+
DatasetUploadProcessingStatusFields,
|
|
13
|
+
GlobalUsageFields,
|
|
14
|
+
GraderFields,
|
|
15
|
+
HarmonyGroupFields,
|
|
16
|
+
JobArtifactFields,
|
|
17
|
+
JobConnectionFields,
|
|
18
|
+
JobFields,
|
|
19
|
+
JudgeFields,
|
|
20
|
+
MetaObjectFields,
|
|
21
|
+
MetricFields,
|
|
22
|
+
ModelFields,
|
|
23
|
+
PrebuiltConfigDefinitionFields,
|
|
24
|
+
PrebuiltCriteriaFields,
|
|
25
|
+
RemoteConfigOutputFields,
|
|
26
|
+
RemoteEnvFields,
|
|
27
|
+
RoleFields,
|
|
28
|
+
SearchResultFields,
|
|
29
|
+
SystemPromptTemplateFields,
|
|
30
|
+
TeamFields,
|
|
31
|
+
ToolProviderFields,
|
|
32
|
+
UsageAggregateItemFields,
|
|
33
|
+
UsageAggregatePerUseCaseItemFields,
|
|
34
|
+
UseCaseFields,
|
|
35
|
+
UserFields,
|
|
36
|
+
)
|
|
4
37
|
from .custom_typing_fields import GraphQLField
|
|
5
|
-
from .input_types import
|
|
38
|
+
from .input_types import (
|
|
39
|
+
AbCampaignFilter,
|
|
40
|
+
ArtifactFilter,
|
|
41
|
+
CursorPageInput,
|
|
42
|
+
CustomRecipeFilterInput,
|
|
43
|
+
DatasetCreateFromFilters,
|
|
44
|
+
DatasetUploadProcessingStatusInput,
|
|
45
|
+
FeedbackFilterInput,
|
|
46
|
+
GlobalUsageFilterInput,
|
|
47
|
+
ListCompletionsFilterInput,
|
|
48
|
+
ListJobsFilterInput,
|
|
49
|
+
ModelFilter,
|
|
50
|
+
OrderPair,
|
|
51
|
+
SearchInput,
|
|
52
|
+
UsageFilterInput,
|
|
53
|
+
UsagePerUseCaseFilterInput,
|
|
54
|
+
UseCaseFilter,
|
|
55
|
+
)
|
|
56
|
+
|
|
6
57
|
|
|
7
58
|
class Query:
|
|
8
59
|
"""@private"""
|
|
9
60
|
|
|
10
61
|
@classmethod
|
|
11
62
|
def ab_campaigns(cls, filter: AbCampaignFilter) -> AbcampaignFields:
|
|
12
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
13
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
14
|
-
return AbcampaignFields(field_name=
|
|
63
|
+
arguments: Dict[str, Dict[str, Any]] = {"filter": {"type": "AbCampaignFilter!", "value": filter}}
|
|
64
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
65
|
+
return AbcampaignFields(field_name="abCampaigns", arguments=cleared_arguments)
|
|
15
66
|
|
|
16
67
|
@classmethod
|
|
17
68
|
def ab_campaign(cls, id_or_key: str) -> AbcampaignFields:
|
|
18
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
19
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
20
|
-
return AbcampaignFields(field_name=
|
|
69
|
+
arguments: Dict[str, Dict[str, Any]] = {"idOrKey": {"type": "IdOrKey!", "value": id_or_key}}
|
|
70
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
71
|
+
return AbcampaignFields(field_name="abCampaign", arguments=cleared_arguments)
|
|
21
72
|
|
|
22
73
|
@classmethod
|
|
23
74
|
def contract(cls) -> ContractFields:
|
|
24
|
-
return ContractFields(field_name=
|
|
75
|
+
return ContractFields(field_name="contract")
|
|
25
76
|
|
|
26
77
|
@classmethod
|
|
27
78
|
def custom_recipes(cls, use_case: str, filter: CustomRecipeFilterInput) -> CustomRecipeFields:
|
|
28
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
29
|
-
|
|
30
|
-
|
|
79
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
80
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
81
|
+
"filter": {"type": "CustomRecipeFilterInput!", "value": filter},
|
|
82
|
+
}
|
|
83
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
84
|
+
return CustomRecipeFields(field_name="customRecipes", arguments=cleared_arguments)
|
|
31
85
|
|
|
32
86
|
@classmethod
|
|
33
87
|
def custom_recipe(cls, id_or_key: str, use_case: str) -> CustomRecipeFields:
|
|
34
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
35
|
-
|
|
36
|
-
|
|
88
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
89
|
+
"idOrKey": {"type": "IdOrKey!", "value": id_or_key},
|
|
90
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
91
|
+
}
|
|
92
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
93
|
+
return CustomRecipeFields(field_name="customRecipe", arguments=cleared_arguments)
|
|
37
94
|
|
|
38
95
|
@classmethod
|
|
39
96
|
def parse_recipe_schema(cls, recipe_content: str) -> GraphQLField:
|
|
40
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
41
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
42
|
-
return GraphQLField(field_name=
|
|
97
|
+
arguments: Dict[str, Dict[str, Any]] = {"recipeContent": {"type": "String!", "value": recipe_content}}
|
|
98
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
99
|
+
return GraphQLField(field_name="parseRecipeSchema", arguments=cleared_arguments)
|
|
43
100
|
|
|
44
101
|
@classmethod
|
|
45
102
|
def datasets(cls, use_case: str) -> DatasetFields:
|
|
46
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
47
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
48
|
-
return DatasetFields(field_name=
|
|
103
|
+
arguments: Dict[str, Dict[str, Any]] = {"useCase": {"type": "IdOrKey!", "value": use_case}}
|
|
104
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
105
|
+
return DatasetFields(field_name="datasets", arguments=cleared_arguments)
|
|
49
106
|
|
|
50
107
|
@classmethod
|
|
51
108
|
def dataset(cls, id_or_key: str, use_case: str) -> DatasetFields:
|
|
52
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
53
|
-
|
|
54
|
-
|
|
109
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
110
|
+
"idOrKey": {"type": "IdOrKey!", "value": id_or_key},
|
|
111
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
112
|
+
}
|
|
113
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
114
|
+
return DatasetFields(field_name="dataset", arguments=cleared_arguments)
|
|
55
115
|
|
|
56
116
|
@classmethod
|
|
57
117
|
def preview_dataset_from_filters(cls, input: DatasetCreateFromFilters) -> GraphQLField:
|
|
58
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
59
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
60
|
-
return GraphQLField(field_name=
|
|
61
|
-
|
|
62
|
-
@classmethod
|
|
63
|
-
def dataset_upload_processing_status(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
@classmethod
|
|
75
|
-
def
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
118
|
+
arguments: Dict[str, Dict[str, Any]] = {"input": {"type": "DatasetCreateFromFilters!", "value": input}}
|
|
119
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
120
|
+
return GraphQLField(field_name="previewDatasetFromFilters", arguments=cleared_arguments)
|
|
121
|
+
|
|
122
|
+
@classmethod
|
|
123
|
+
def dataset_upload_processing_status(
|
|
124
|
+
cls, input: DatasetUploadProcessingStatusInput
|
|
125
|
+
) -> DatasetUploadProcessingStatusFields:
|
|
126
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
127
|
+
"input": {"type": "DatasetUploadProcessingStatusInput!", "value": input}
|
|
128
|
+
}
|
|
129
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
130
|
+
return DatasetUploadProcessingStatusFields(
|
|
131
|
+
field_name="datasetUploadProcessingStatus", arguments=cleared_arguments
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
@classmethod
|
|
135
|
+
def completions(
|
|
136
|
+
cls, filter: ListCompletionsFilterInput, page: CursorPageInput, order: List[OrderPair]
|
|
137
|
+
) -> CompletionConnectionFields:
|
|
138
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
139
|
+
"filter": {"type": "ListCompletionsFilterInput!", "value": filter},
|
|
140
|
+
"page": {"type": "CursorPageInput!", "value": page},
|
|
141
|
+
"order": {"type": "[OrderPair!]!", "value": order},
|
|
142
|
+
}
|
|
143
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
144
|
+
return CompletionConnectionFields(field_name="completions", arguments=cleared_arguments)
|
|
145
|
+
|
|
146
|
+
@classmethod
|
|
147
|
+
def completions_grouped(
|
|
148
|
+
cls,
|
|
149
|
+
filter: ListCompletionsFilterInput,
|
|
150
|
+
feedback_filter: FeedbackFilterInput,
|
|
151
|
+
group_by: CompletionGroupBy,
|
|
152
|
+
page: CursorPageInput,
|
|
153
|
+
order: List[OrderPair],
|
|
154
|
+
) -> CompletionGroupDataConnectionFields:
|
|
155
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
156
|
+
"filter": {"type": "ListCompletionsFilterInput!", "value": filter},
|
|
157
|
+
"feedbackFilter": {"type": "FeedbackFilterInput!", "value": feedback_filter},
|
|
158
|
+
"groupBy": {"type": "CompletionGroupBy!", "value": group_by},
|
|
159
|
+
"page": {"type": "CursorPageInput!", "value": page},
|
|
160
|
+
"order": {"type": "[OrderPair!]!", "value": order},
|
|
161
|
+
}
|
|
162
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
163
|
+
return CompletionGroupDataConnectionFields(field_name="completionsGrouped", arguments=cleared_arguments)
|
|
79
164
|
|
|
80
165
|
@classmethod
|
|
81
166
|
def completion(cls, use_case: str, id: Any) -> CompletionFields:
|
|
82
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
83
|
-
|
|
84
|
-
|
|
167
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
168
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
169
|
+
"id": {"type": "UUID!", "value": id},
|
|
170
|
+
}
|
|
171
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
172
|
+
return CompletionFields(field_name="completion", arguments=cleared_arguments)
|
|
85
173
|
|
|
86
174
|
@classmethod
|
|
87
175
|
def completion_download_url(cls, filter: ListCompletionsFilterInput) -> GraphQLField:
|
|
88
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
89
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
90
|
-
return GraphQLField(field_name=
|
|
176
|
+
arguments: Dict[str, Dict[str, Any]] = {"filter": {"type": "ListCompletionsFilterInput!", "value": filter}}
|
|
177
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
178
|
+
return GraphQLField(field_name="completionDownloadUrl", arguments=cleared_arguments)
|
|
91
179
|
|
|
92
180
|
@classmethod
|
|
93
181
|
def completion_as_dataset_download_url(cls, filter: ListCompletionsFilterInput) -> GraphQLField:
|
|
94
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
95
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
96
|
-
return GraphQLField(field_name=
|
|
182
|
+
arguments: Dict[str, Dict[str, Any]] = {"filter": {"type": "ListCompletionsFilterInput!", "value": filter}}
|
|
183
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
184
|
+
return GraphQLField(field_name="completionAsDatasetDownloadUrl", arguments=cleared_arguments)
|
|
97
185
|
|
|
98
186
|
@classmethod
|
|
99
187
|
def model_usage(cls, filter: UsageFilterInput) -> UsageAggregateItemFields:
|
|
100
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
101
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
102
|
-
return UsageAggregateItemFields(field_name=
|
|
188
|
+
arguments: Dict[str, Dict[str, Any]] = {"filter": {"type": "UsageFilterInput!", "value": filter}}
|
|
189
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
190
|
+
return UsageAggregateItemFields(field_name="modelUsage", arguments=cleared_arguments)
|
|
103
191
|
|
|
104
192
|
@classmethod
|
|
105
193
|
def model_usage_by_use_case(cls, filter: UsagePerUseCaseFilterInput) -> UsageAggregatePerUseCaseItemFields:
|
|
106
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
107
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
108
|
-
return UsageAggregatePerUseCaseItemFields(field_name=
|
|
194
|
+
arguments: Dict[str, Dict[str, Any]] = {"filter": {"type": "UsagePerUseCaseFilterInput!", "value": filter}}
|
|
195
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
196
|
+
return UsageAggregatePerUseCaseItemFields(field_name="modelUsageByUseCase", arguments=cleared_arguments)
|
|
109
197
|
|
|
110
198
|
@classmethod
|
|
111
199
|
def global_usage(cls, filter: GlobalUsageFilterInput) -> GlobalUsageFields:
|
|
112
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
113
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
114
|
-
return GlobalUsageFields(field_name=
|
|
200
|
+
arguments: Dict[str, Dict[str, Any]] = {"filter": {"type": "GlobalUsageFilterInput!", "value": filter}}
|
|
201
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
202
|
+
return GlobalUsageFields(field_name="globalUsage", arguments=cleared_arguments)
|
|
115
203
|
|
|
116
204
|
@classmethod
|
|
117
205
|
def system_prompt_templates(cls) -> SystemPromptTemplateFields:
|
|
118
|
-
return SystemPromptTemplateFields(field_name=
|
|
206
|
+
return SystemPromptTemplateFields(field_name="systemPromptTemplates")
|
|
119
207
|
|
|
120
208
|
@classmethod
|
|
121
209
|
def jobs(cls, page: CursorPageInput, filter: ListJobsFilterInput, order: List[OrderPair]) -> JobConnectionFields:
|
|
122
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
123
|
-
|
|
124
|
-
|
|
210
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
211
|
+
"page": {"type": "CursorPageInput!", "value": page},
|
|
212
|
+
"filter": {"type": "ListJobsFilterInput!", "value": filter},
|
|
213
|
+
"order": {"type": "[OrderPair!]!", "value": order},
|
|
214
|
+
}
|
|
215
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
216
|
+
return JobConnectionFields(field_name="jobs", arguments=cleared_arguments)
|
|
125
217
|
|
|
126
218
|
@classmethod
|
|
127
219
|
def job(cls, id: Any) -> JobFields:
|
|
128
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
129
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
130
|
-
return JobFields(field_name=
|
|
220
|
+
arguments: Dict[str, Dict[str, Any]] = {"id": {"type": "UUID!", "value": id}}
|
|
221
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
222
|
+
return JobFields(field_name="job", arguments=cleared_arguments)
|
|
131
223
|
|
|
132
224
|
@classmethod
|
|
133
225
|
def metrics(cls) -> MetricFields:
|
|
134
|
-
return MetricFields(field_name=
|
|
226
|
+
return MetricFields(field_name="metrics")
|
|
135
227
|
|
|
136
228
|
@classmethod
|
|
137
229
|
def metric(cls, id_or_key: str) -> MetricFields:
|
|
138
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
139
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
140
|
-
return MetricFields(field_name=
|
|
230
|
+
arguments: Dict[str, Dict[str, Any]] = {"idOrKey": {"type": "IdOrKey!", "value": id_or_key}}
|
|
231
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
232
|
+
return MetricFields(field_name="metric", arguments=cleared_arguments)
|
|
141
233
|
|
|
142
234
|
@classmethod
|
|
143
235
|
def models(cls, filter: ModelFilter) -> ModelFields:
|
|
144
236
|
"""List all models that were created in the app"""
|
|
145
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
146
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
147
|
-
return ModelFields(field_name=
|
|
237
|
+
arguments: Dict[str, Dict[str, Any]] = {"filter": {"type": "ModelFilter!", "value": filter}}
|
|
238
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
239
|
+
return ModelFields(field_name="models", arguments=cleared_arguments)
|
|
148
240
|
|
|
149
241
|
@classmethod
|
|
150
242
|
def model(cls, id_or_key: str) -> ModelFields:
|
|
151
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
152
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
153
|
-
return ModelFields(field_name=
|
|
243
|
+
arguments: Dict[str, Dict[str, Any]] = {"idOrKey": {"type": "IdOrKey!", "value": id_or_key}}
|
|
244
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
245
|
+
return ModelFields(field_name="model", arguments=cleared_arguments)
|
|
154
246
|
|
|
155
247
|
@classmethod
|
|
156
248
|
def all_harmony_groups(cls) -> HarmonyGroupFields:
|
|
157
|
-
return HarmonyGroupFields(field_name=
|
|
249
|
+
return HarmonyGroupFields(field_name="allHarmonyGroups")
|
|
158
250
|
|
|
159
251
|
@classmethod
|
|
160
252
|
def harmony_groups(cls) -> HarmonyGroupFields:
|
|
161
|
-
return HarmonyGroupFields(field_name=
|
|
253
|
+
return HarmonyGroupFields(field_name="harmonyGroups")
|
|
162
254
|
|
|
163
255
|
@classmethod
|
|
164
256
|
def compute_pools(cls) -> ComputePoolFields:
|
|
165
|
-
return ComputePoolFields(field_name=
|
|
257
|
+
return ComputePoolFields(field_name="computePools")
|
|
258
|
+
|
|
259
|
+
@classmethod
|
|
260
|
+
def providers(cls) -> ProviderFields:
|
|
261
|
+
return ProviderFields(field_name="providers")
|
|
262
|
+
|
|
263
|
+
@classmethod
|
|
264
|
+
def provider(cls, name: str) -> ProviderFields:
|
|
265
|
+
arguments: Dict[str, Dict[str, Any]] = {"name": {"type": "String!", "value": name}}
|
|
266
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
267
|
+
return ProviderFields(field_name="provider", arguments=cleared_arguments)
|
|
268
|
+
|
|
269
|
+
@classmethod
|
|
270
|
+
def integrations(cls, team: str) -> IntegrationFields:
|
|
271
|
+
arguments: Dict[str, Dict[str, Any]] = {"team": {"type": "IdOrKey!", "value": team}}
|
|
272
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
273
|
+
return IntegrationFields(field_name="integrations", arguments=cleared_arguments)
|
|
274
|
+
|
|
275
|
+
@classmethod
|
|
276
|
+
def integration(cls, id: Any) -> IntegrationFields:
|
|
277
|
+
arguments: Dict[str, Dict[str, Any]] = {"id": {"type": "UUID!", "value": id}}
|
|
278
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
279
|
+
return IntegrationFields(field_name="integration", arguments=cleared_arguments)
|
|
280
|
+
|
|
281
|
+
@classmethod
|
|
282
|
+
def notification_system_status(cls) -> GraphQLField:
|
|
283
|
+
"""Placeholder query"""
|
|
284
|
+
return GraphQLField(field_name="notificationSystemStatus")
|
|
166
285
|
|
|
167
286
|
@classmethod
|
|
168
287
|
def remote_envs(cls) -> RemoteEnvFields:
|
|
169
|
-
return RemoteEnvFields(field_name=
|
|
288
|
+
return RemoteEnvFields(field_name="remoteEnvs")
|
|
170
289
|
|
|
171
290
|
@classmethod
|
|
172
291
|
def use_cases(cls, filter: UseCaseFilter) -> UseCaseFields:
|
|
173
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
174
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
175
|
-
return UseCaseFields(field_name=
|
|
292
|
+
arguments: Dict[str, Dict[str, Any]] = {"filter": {"type": "UseCaseFilter!", "value": filter}}
|
|
293
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
294
|
+
return UseCaseFields(field_name="useCases", arguments=cleared_arguments)
|
|
176
295
|
|
|
177
296
|
@classmethod
|
|
178
297
|
def use_case(cls, id_or_key: str) -> UseCaseFields:
|
|
179
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
180
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
181
|
-
return UseCaseFields(field_name=
|
|
298
|
+
arguments: Dict[str, Dict[str, Any]] = {"idOrKey": {"type": "IdOrKey!", "value": id_or_key}}
|
|
299
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
300
|
+
return UseCaseFields(field_name="useCase", arguments=cleared_arguments)
|
|
182
301
|
|
|
183
302
|
@classmethod
|
|
184
303
|
def me(cls) -> UserFields:
|
|
185
304
|
"""Currently logged in user"""
|
|
186
|
-
return UserFields(field_name=
|
|
305
|
+
return UserFields(field_name="me")
|
|
187
306
|
|
|
188
307
|
@classmethod
|
|
189
308
|
def users(cls) -> UserFields:
|
|
190
|
-
return UserFields(field_name=
|
|
309
|
+
return UserFields(field_name="users")
|
|
191
310
|
|
|
192
311
|
@classmethod
|
|
193
312
|
def roles(cls) -> RoleFields:
|
|
194
|
-
return RoleFields(field_name=
|
|
313
|
+
return RoleFields(field_name="roles")
|
|
195
314
|
|
|
196
315
|
@classmethod
|
|
197
316
|
def permissions(cls) -> GraphQLField:
|
|
198
|
-
return GraphQLField(field_name=
|
|
317
|
+
return GraphQLField(field_name="permissions")
|
|
199
318
|
|
|
200
319
|
@classmethod
|
|
201
320
|
def teams(cls) -> TeamFields:
|
|
202
|
-
return TeamFields(field_name=
|
|
321
|
+
return TeamFields(field_name="teams")
|
|
203
322
|
|
|
204
323
|
@classmethod
|
|
205
|
-
def judge(cls, id: str, use_case: str, *, version: Optional[int]=None) -> JudgeFields:
|
|
206
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
207
|
-
|
|
208
|
-
|
|
324
|
+
def judge(cls, id: str, use_case: str, *, version: Optional[int] = None) -> JudgeFields:
|
|
325
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
326
|
+
"id": {"type": "IdOrKey!", "value": id},
|
|
327
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
328
|
+
"version": {"type": "Int", "value": version},
|
|
329
|
+
}
|
|
330
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
331
|
+
return JudgeFields(field_name="judge", arguments=cleared_arguments)
|
|
209
332
|
|
|
210
333
|
@classmethod
|
|
211
334
|
def judges(cls, use_case: str) -> JudgeFields:
|
|
212
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
213
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
214
|
-
return JudgeFields(field_name=
|
|
335
|
+
arguments: Dict[str, Dict[str, Any]] = {"useCase": {"type": "IdOrKey!", "value": use_case}}
|
|
336
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
337
|
+
return JudgeFields(field_name="judges", arguments=cleared_arguments)
|
|
215
338
|
|
|
216
339
|
@classmethod
|
|
217
340
|
def judge_versions(cls, use_case: str, key: str) -> JudgeFields:
|
|
218
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
219
|
-
|
|
220
|
-
|
|
341
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
342
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
343
|
+
"key": {"type": "String!", "value": key},
|
|
344
|
+
}
|
|
345
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
346
|
+
return JudgeFields(field_name="judgeVersions", arguments=cleared_arguments)
|
|
221
347
|
|
|
222
348
|
@classmethod
|
|
223
349
|
def prebuilt_criteria(cls) -> PrebuiltCriteriaFields:
|
|
224
|
-
return PrebuiltCriteriaFields(field_name=
|
|
350
|
+
return PrebuiltCriteriaFields(field_name="prebuiltCriteria")
|
|
225
351
|
|
|
226
352
|
@classmethod
|
|
227
353
|
def grader(cls, id: str, use_case: str) -> GraderFields:
|
|
228
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
229
|
-
|
|
230
|
-
|
|
354
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
355
|
+
"id": {"type": "IdOrKey!", "value": id},
|
|
356
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
357
|
+
}
|
|
358
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
359
|
+
return GraderFields(field_name="grader", arguments=cleared_arguments)
|
|
231
360
|
|
|
232
361
|
@classmethod
|
|
233
362
|
def graders(cls, use_case: str) -> GraderFields:
|
|
234
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
235
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
236
|
-
return GraderFields(field_name=
|
|
363
|
+
arguments: Dict[str, Dict[str, Any]] = {"useCase": {"type": "IdOrKey!", "value": use_case}}
|
|
364
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
365
|
+
return GraderFields(field_name="graders", arguments=cleared_arguments)
|
|
237
366
|
|
|
238
367
|
@classmethod
|
|
239
368
|
def prebuilt_configs(cls) -> PrebuiltConfigDefinitionFields:
|
|
240
|
-
return PrebuiltConfigDefinitionFields(field_name=
|
|
369
|
+
return PrebuiltConfigDefinitionFields(field_name="prebuiltConfigs")
|
|
241
370
|
|
|
242
371
|
@classmethod
|
|
243
372
|
def test_remote_env_2(cls, url: str) -> RemoteConfigOutputFields:
|
|
244
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
245
|
-
cleared_arguments = {key: value for key, value in arguments.items() if value[
|
|
246
|
-
return RemoteConfigOutputFields(field_name=
|
|
373
|
+
arguments: Dict[str, Dict[str, Any]] = {"url": {"type": "String!", "value": url}}
|
|
374
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
375
|
+
return RemoteConfigOutputFields(field_name="testRemoteEnv2", arguments=cleared_arguments)
|
|
247
376
|
|
|
248
377
|
@classmethod
|
|
249
378
|
def validate_data_schema_for_grader(cls, grader: str, dataset: str, usecase: str) -> GraphQLField:
|
|
250
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
251
|
-
|
|
252
|
-
|
|
379
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
380
|
+
"grader": {"type": "IdOrKey!", "value": grader},
|
|
381
|
+
"dataset": {"type": "IdOrKey!", "value": dataset},
|
|
382
|
+
"usecase": {"type": "IdOrKey!", "value": usecase},
|
|
383
|
+
}
|
|
384
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
385
|
+
return GraphQLField(field_name="validateDataSchemaForGrader", arguments=cleared_arguments)
|
|
253
386
|
|
|
254
387
|
@classmethod
|
|
255
388
|
def tool_provider(cls, id_or_key: str, use_case: str) -> ToolProviderFields:
|
|
256
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
257
|
-
|
|
258
|
-
|
|
389
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
390
|
+
"idOrKey": {"type": "IdOrKey!", "value": id_or_key},
|
|
391
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
392
|
+
}
|
|
393
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
394
|
+
return ToolProviderFields(field_name="toolProvider", arguments=cleared_arguments)
|
|
259
395
|
|
|
260
396
|
@classmethod
|
|
261
|
-
def artifacts(cls, use_case: str, *, filter: Optional[ArtifactFilter]=None) -> JobArtifactFields:
|
|
262
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
263
|
-
|
|
264
|
-
|
|
397
|
+
def artifacts(cls, use_case: str, *, filter: Optional[ArtifactFilter] = None) -> JobArtifactFields:
|
|
398
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
399
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
400
|
+
"filter": {"type": "ArtifactFilter", "value": filter},
|
|
401
|
+
}
|
|
402
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
403
|
+
return JobArtifactFields(field_name="artifacts", arguments=cleared_arguments)
|
|
265
404
|
|
|
266
405
|
@classmethod
|
|
267
406
|
def artifact(cls, use_case: str, id: Any) -> JobArtifactFields:
|
|
268
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
269
|
-
|
|
270
|
-
|
|
407
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
408
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
409
|
+
"id": {"type": "UUID!", "value": id},
|
|
410
|
+
}
|
|
411
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
412
|
+
return JobArtifactFields(field_name="artifact", arguments=cleared_arguments)
|
|
271
413
|
|
|
272
414
|
@classmethod
|
|
273
415
|
def search_use_case(cls, input: SearchInput, use_case: str) -> SearchResultFields:
|
|
274
|
-
arguments: Dict[str, Dict[str, Any]] = {
|
|
275
|
-
|
|
276
|
-
|
|
416
|
+
arguments: Dict[str, Dict[str, Any]] = {
|
|
417
|
+
"input": {"type": "SearchInput!", "value": input},
|
|
418
|
+
"useCase": {"type": "IdOrKey!", "value": use_case},
|
|
419
|
+
}
|
|
420
|
+
cleared_arguments = {key: value for key, value in arguments.items() if value["value"] is not None}
|
|
421
|
+
return SearchResultFields(field_name="searchUseCase", arguments=cleared_arguments)
|
|
277
422
|
|
|
278
423
|
@classmethod
|
|
279
424
|
def meta(cls) -> MetaObjectFields:
|
|
280
|
-
return MetaObjectFields(field_name=
|
|
425
|
+
return MetaObjectFields(field_name="meta")
|