adaptive-sdk 0.12.0__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.12.0.dist-info → adaptive_sdk-0.12.1.dist-info}/METADATA +1 -1
- {adaptive_sdk-0.12.0.dist-info → adaptive_sdk-0.12.1.dist-info}/RECORD +25 -25
- {adaptive_sdk-0.12.0.dist-info → adaptive_sdk-0.12.1.dist-info}/WHEEL +0 -0
|
@@ -1,85 +1,144 @@
|
|
|
1
1
|
from typing import Any, List, Optional
|
|
2
2
|
from pydantic import Field
|
|
3
3
|
from .base_model import BaseModel
|
|
4
|
-
from .enums import
|
|
4
|
+
from .enums import (
|
|
5
|
+
AbcampaignStatus,
|
|
6
|
+
CompletionGroupBy,
|
|
7
|
+
CompletionSource,
|
|
8
|
+
DatasetKind,
|
|
9
|
+
DatasetSource,
|
|
10
|
+
DateBucketUnit,
|
|
11
|
+
DeliveryPolicyInput,
|
|
12
|
+
DeliveryScopeInput,
|
|
13
|
+
ExternalModelProviderName,
|
|
14
|
+
FeedbackType,
|
|
15
|
+
GraderTypeEnum,
|
|
16
|
+
JobArtifactKind,
|
|
17
|
+
JobKind,
|
|
18
|
+
JobStatus,
|
|
19
|
+
JobStatusGQL,
|
|
20
|
+
MetricAggregation,
|
|
21
|
+
MetricKind,
|
|
22
|
+
MetricScoringType,
|
|
23
|
+
ModelCapabilityFilter,
|
|
24
|
+
ModelOnline,
|
|
25
|
+
PrebuiltCriteriaKey,
|
|
26
|
+
Protocol,
|
|
27
|
+
SelectionTypeInput,
|
|
28
|
+
SortDirection,
|
|
29
|
+
TimeseriesInterval,
|
|
30
|
+
UnitPosition,
|
|
31
|
+
)
|
|
32
|
+
|
|
5
33
|
|
|
6
34
|
class AbCampaignFilter(BaseModel):
|
|
7
35
|
"""@private"""
|
|
36
|
+
|
|
8
37
|
active: Optional[bool] = None
|
|
9
38
|
status: Optional[AbcampaignStatus] = None
|
|
10
|
-
use_case: Optional[str] = Field(alias=
|
|
39
|
+
use_case: Optional[str] = Field(alias="useCase", default=None)
|
|
40
|
+
|
|
11
41
|
|
|
12
42
|
class AbcampaignCreate(BaseModel):
|
|
13
43
|
"""@private"""
|
|
44
|
+
|
|
14
45
|
key: str
|
|
15
46
|
name: Optional[str] = None
|
|
16
47
|
metric: str
|
|
17
|
-
use_case: str = Field(alias=
|
|
18
|
-
model_services: List[str] = Field(alias=
|
|
19
|
-
auto_deploy: bool = Field(alias=
|
|
20
|
-
traffic_split: float = Field(alias=
|
|
21
|
-
feedback_type: FeedbackType = Field(alias=
|
|
48
|
+
use_case: str = Field(alias="useCase")
|
|
49
|
+
model_services: List[str] = Field(alias="modelServices")
|
|
50
|
+
auto_deploy: bool = Field(alias="autoDeploy")
|
|
51
|
+
traffic_split: float = Field(alias="trafficSplit")
|
|
52
|
+
feedback_type: FeedbackType = Field(alias="feedbackType", default=FeedbackType.DIRECT)
|
|
53
|
+
|
|
22
54
|
|
|
23
55
|
class AddExternalModelInput(BaseModel):
|
|
24
56
|
"""@private"""
|
|
57
|
+
|
|
25
58
|
name: str
|
|
26
59
|
provider: ExternalModelProviderName
|
|
27
|
-
provider_data: Optional[
|
|
60
|
+
provider_data: Optional["ModelProviderDataInput"] = Field(alias="providerData", default=None)
|
|
28
61
|
description: Optional[str] = None
|
|
29
62
|
|
|
63
|
+
|
|
30
64
|
class AddHFModelInput(BaseModel):
|
|
31
65
|
"""@private"""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
66
|
+
|
|
67
|
+
model_id: str = Field(alias="modelId")
|
|
68
|
+
output_model_name: str = Field(alias="outputModelName")
|
|
69
|
+
output_model_key: Optional[str] = Field(alias="outputModelKey", default=None)
|
|
70
|
+
hf_token: str = Field(alias="hfToken")
|
|
71
|
+
compute_pool: Optional[str] = Field(alias="computePool", default=None)
|
|
72
|
+
num_gpus: int = Field(alias="numGpus", default=0)
|
|
73
|
+
|
|
38
74
|
|
|
39
75
|
class AddModelInput(BaseModel):
|
|
40
76
|
"""@private"""
|
|
77
|
+
|
|
41
78
|
path: str
|
|
42
79
|
name: str
|
|
43
80
|
key: Optional[str] = None
|
|
44
81
|
|
|
82
|
+
|
|
45
83
|
class AddModelToUseCaseInput(BaseModel):
|
|
46
84
|
"""@private"""
|
|
47
|
-
|
|
85
|
+
|
|
86
|
+
use_case: str = Field(alias="useCase")
|
|
48
87
|
model: str
|
|
49
88
|
|
|
89
|
+
|
|
90
|
+
class AdminInput(BaseModel):
|
|
91
|
+
"""@private"""
|
|
92
|
+
|
|
93
|
+
empty: Optional[str] = None
|
|
94
|
+
|
|
95
|
+
|
|
50
96
|
class AnthropicProviderDataInput(BaseModel):
|
|
51
97
|
"""@private"""
|
|
52
|
-
|
|
53
|
-
|
|
98
|
+
|
|
99
|
+
api_key: str = Field(alias="apiKey")
|
|
100
|
+
external_model_id: str = Field(alias="externalModelId")
|
|
54
101
|
endpoint: Optional[str] = None
|
|
55
102
|
|
|
103
|
+
|
|
56
104
|
class ApiKeyCreate(BaseModel):
|
|
57
105
|
"""@private"""
|
|
106
|
+
|
|
58
107
|
user: str
|
|
59
|
-
expiration_for_previous_keys: Optional[int | str] = Field(alias=
|
|
60
|
-
|
|
108
|
+
expiration_for_previous_keys: Optional[int | str] = Field(alias="expirationForPreviousKeys", default=None)
|
|
109
|
+
"If not provided, previous keys expire immediately"
|
|
110
|
+
|
|
61
111
|
|
|
62
112
|
class ArtifactFilter(BaseModel):
|
|
63
113
|
"""@private"""
|
|
114
|
+
|
|
64
115
|
kinds: Optional[List[JobArtifactKind]] = None
|
|
65
|
-
job_id: Optional[Any] = Field(alias=
|
|
116
|
+
job_id: Optional[Any] = Field(alias="jobId", default=None)
|
|
117
|
+
|
|
66
118
|
|
|
67
119
|
class CancelAllocationInput(BaseModel):
|
|
68
120
|
"""@private"""
|
|
69
|
-
|
|
70
|
-
|
|
121
|
+
|
|
122
|
+
harmony_group: str = Field(alias="harmonyGroup")
|
|
123
|
+
job_id: str = Field(alias="jobId")
|
|
124
|
+
|
|
71
125
|
|
|
72
126
|
class CapabilityFilter(BaseModel):
|
|
73
127
|
"""@private"""
|
|
128
|
+
|
|
74
129
|
any: Optional[List[ModelCapabilityFilter]] = None
|
|
75
130
|
all: Optional[List[ModelCapabilityFilter]] = None
|
|
76
131
|
|
|
132
|
+
|
|
77
133
|
class CompletionComparisonFilterInput(BaseModel):
|
|
78
134
|
"""@private"""
|
|
135
|
+
|
|
79
136
|
metric: str
|
|
80
137
|
|
|
138
|
+
|
|
81
139
|
class CompletionFeedbackFilterInput(BaseModel):
|
|
82
140
|
"""@private"""
|
|
141
|
+
|
|
83
142
|
metric: str
|
|
84
143
|
gt: Optional[float] = None
|
|
85
144
|
gte: Optional[float] = None
|
|
@@ -90,651 +149,959 @@ class CompletionFeedbackFilterInput(BaseModel):
|
|
|
90
149
|
reasons: Optional[List[str]] = None
|
|
91
150
|
user: Optional[Any] = None
|
|
92
151
|
|
|
152
|
+
|
|
93
153
|
class CompletionFilterExpression(BaseModel):
|
|
94
154
|
"""@private
|
|
95
|
-
Advanced filter expression supporting AND/OR/NOT logic"""
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
155
|
+
Advanced filter expression supporting AND/OR/NOT logic"""
|
|
156
|
+
|
|
157
|
+
and_: Optional[List["CompletionFilterExpression"]] = Field(alias="and", default=None)
|
|
158
|
+
"Combine multiple conditions with AND (all must match)"
|
|
159
|
+
or_: Optional[List["CompletionFilterExpression"]] = Field(alias="or", default=None)
|
|
160
|
+
"Combine multiple conditions with OR (at least one must match)"
|
|
161
|
+
not_: Optional["CompletionFilterExpression"] = Field(alias="not", default=None)
|
|
162
|
+
"Negate a condition"
|
|
163
|
+
timerange: Optional["TimeRange"] = None
|
|
164
|
+
"Filter by time"
|
|
165
|
+
model: Optional["IdOrKeyCondition"] = None
|
|
166
|
+
"Filter by model"
|
|
167
|
+
label: Optional["LabelCondition"] = None
|
|
168
|
+
"Filter by label key-value pairs"
|
|
169
|
+
feedbacks: Optional["FeedbackCondition"] = None
|
|
170
|
+
"Filter by feedback/metric values"
|
|
110
171
|
source: Optional[CompletionSource] = None
|
|
111
|
-
|
|
112
|
-
prompt_hash: Optional[
|
|
113
|
-
|
|
114
|
-
session_id: Optional[Any] = Field(alias=
|
|
115
|
-
|
|
116
|
-
user_id: Optional[Any] = Field(alias=
|
|
117
|
-
|
|
118
|
-
completion_id: Optional[Any] = Field(alias=
|
|
119
|
-
|
|
120
|
-
completion: Optional[
|
|
121
|
-
|
|
122
|
-
prompt: Optional[
|
|
123
|
-
|
|
172
|
+
"Filter by completion source"
|
|
173
|
+
prompt_hash: Optional["StringCondition"] = Field(alias="promptHash", default=None)
|
|
174
|
+
"Filter by prompt hash"
|
|
175
|
+
session_id: Optional[Any] = Field(alias="sessionId", default=None)
|
|
176
|
+
"Filter by session ID"
|
|
177
|
+
user_id: Optional[Any] = Field(alias="userId", default=None)
|
|
178
|
+
"Filter by user ID"
|
|
179
|
+
completion_id: Optional[Any] = Field(alias="completionId", default=None)
|
|
180
|
+
"Filter by completion ID"
|
|
181
|
+
completion: Optional["TextCondition"] = None
|
|
182
|
+
"Filter by completion content"
|
|
183
|
+
prompt: Optional["TextCondition"] = None
|
|
184
|
+
"Filter by prompt content"
|
|
185
|
+
|
|
124
186
|
|
|
125
187
|
class CompletionLabelValue(BaseModel):
|
|
126
188
|
"""@private"""
|
|
189
|
+
|
|
127
190
|
key: str
|
|
128
191
|
value: str
|
|
129
192
|
|
|
193
|
+
|
|
130
194
|
class CompletionsByFilters(BaseModel):
|
|
131
195
|
"""@private"""
|
|
132
|
-
|
|
196
|
+
|
|
197
|
+
filters: "ListCompletionsFilterInput"
|
|
133
198
|
exclude: List[Any]
|
|
134
199
|
|
|
200
|
+
|
|
135
201
|
class CompletionsById(BaseModel):
|
|
136
202
|
"""@private"""
|
|
203
|
+
|
|
137
204
|
include: List[Any]
|
|
138
205
|
|
|
206
|
+
|
|
207
|
+
class ConnectionConfigInput(BaseModel):
|
|
208
|
+
"""@private"""
|
|
209
|
+
|
|
210
|
+
slack: Optional["ConnectionConfigInputSlack"] = None
|
|
211
|
+
smtp: Optional["ConnectionConfigInputSmtp"] = None
|
|
212
|
+
webhook: Optional["ConnectionConfigInputWebhook"] = None
|
|
213
|
+
git_hub: Optional["ConnectionConfigInputGitHub"] = Field(alias="gitHub", default=None)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
class ConnectionConfigInputGitHub(BaseModel):
|
|
217
|
+
"""@private"""
|
|
218
|
+
|
|
219
|
+
api_token: str = Field(alias="apiToken")
|
|
220
|
+
org: Optional[str] = None
|
|
221
|
+
repo: Optional[str] = None
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
class ConnectionConfigInputSlack(BaseModel):
|
|
225
|
+
"""@private"""
|
|
226
|
+
|
|
227
|
+
webhook_url: str = Field(alias="webhookUrl")
|
|
228
|
+
bot_token: Optional[str] = Field(alias="botToken", default=None)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
class ConnectionConfigInputSmtp(BaseModel):
|
|
232
|
+
"""@private"""
|
|
233
|
+
|
|
234
|
+
host: str
|
|
235
|
+
port: int
|
|
236
|
+
username: str
|
|
237
|
+
password: str
|
|
238
|
+
from_email: str = Field(alias="fromEmail")
|
|
239
|
+
to_emails: List[str] = Field(alias="toEmails")
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class ConnectionConfigInputWebhook(BaseModel):
|
|
243
|
+
"""@private"""
|
|
244
|
+
|
|
245
|
+
url: str
|
|
246
|
+
method: str
|
|
247
|
+
headers: Any
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class CreateIntegrationConfigInput(BaseModel):
|
|
251
|
+
"""@private"""
|
|
252
|
+
|
|
253
|
+
connection: "ConnectionConfigInput"
|
|
254
|
+
notification_settings: Optional["NotificationSettingsInput"] = Field(alias="notificationSettings", default=None)
|
|
255
|
+
delivery_policy: Optional[DeliveryPolicyInput] = Field(alias="deliveryPolicy", default=None)
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
class CreateIntegrationInput(BaseModel):
|
|
259
|
+
"""@private"""
|
|
260
|
+
|
|
261
|
+
name: str
|
|
262
|
+
provider: str
|
|
263
|
+
config: "CreateIntegrationConfigInput"
|
|
264
|
+
|
|
265
|
+
|
|
139
266
|
class CreateRecipeInput(BaseModel):
|
|
140
267
|
"""@private"""
|
|
268
|
+
|
|
141
269
|
name: str
|
|
142
270
|
key: Optional[str] = None
|
|
143
271
|
description: Optional[str] = None
|
|
144
|
-
labels: Optional[List[
|
|
272
|
+
labels: Optional[List["LabelInput"]] = None
|
|
273
|
+
|
|
145
274
|
|
|
146
275
|
class CreateToolProviderInput(BaseModel):
|
|
147
276
|
"""@private"""
|
|
277
|
+
|
|
148
278
|
key: str
|
|
149
279
|
name: str
|
|
150
280
|
uri: str
|
|
151
281
|
protocol: Protocol
|
|
152
282
|
|
|
283
|
+
|
|
153
284
|
class CursorPageInput(BaseModel):
|
|
154
285
|
"""@private"""
|
|
286
|
+
|
|
155
287
|
first: Optional[int] = None
|
|
156
288
|
after: Optional[str] = None
|
|
157
289
|
before: Optional[str] = None
|
|
158
290
|
last: Optional[int] = None
|
|
159
291
|
offset: Optional[int] = None
|
|
160
292
|
|
|
293
|
+
|
|
161
294
|
class CustomConfigInput(BaseModel):
|
|
162
295
|
"""@private"""
|
|
296
|
+
|
|
163
297
|
description: Optional[str] = None
|
|
164
298
|
|
|
299
|
+
|
|
165
300
|
class CustomRecipeFilterInput(BaseModel):
|
|
166
301
|
"""@private"""
|
|
167
|
-
|
|
302
|
+
|
|
303
|
+
labels: Optional[List["LabelFilter"]] = None
|
|
304
|
+
|
|
168
305
|
|
|
169
306
|
class DatasetCompletionQuery(BaseModel):
|
|
170
307
|
"""@private"""
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
308
|
+
|
|
309
|
+
from_selection: Optional["CompletionsById"] = Field(alias="fromSelection", default=None)
|
|
310
|
+
from_filters: Optional["CompletionsByFilters"] = Field(alias="fromFilters", default=None)
|
|
311
|
+
from_groups: Optional["FromGroupsQuery"] = Field(alias="fromGroups", default=None)
|
|
312
|
+
|
|
174
313
|
|
|
175
314
|
class DatasetCreate(BaseModel):
|
|
176
315
|
"""@private"""
|
|
177
|
-
|
|
316
|
+
|
|
317
|
+
use_case: str = Field(alias="useCase")
|
|
178
318
|
name: str
|
|
179
319
|
key: Optional[str] = None
|
|
180
320
|
source: Optional[DatasetSource] = None
|
|
181
321
|
|
|
322
|
+
|
|
182
323
|
class DatasetCreateFromFilters(BaseModel):
|
|
183
324
|
"""@private"""
|
|
184
|
-
|
|
325
|
+
|
|
326
|
+
use_case: str = Field(alias="useCase")
|
|
185
327
|
name: str
|
|
186
328
|
key: Optional[str] = None
|
|
187
|
-
completion_query:
|
|
188
|
-
sample_config: Optional[
|
|
189
|
-
feedback_filters: Optional[
|
|
329
|
+
completion_query: "DatasetCompletionQuery" = Field(alias="completionQuery")
|
|
330
|
+
sample_config: Optional["SampleConfig"] = Field(alias="sampleConfig", default=None)
|
|
331
|
+
feedback_filters: Optional["FeedbackFilterInput"] = Field(alias="feedbackFilters", default=None)
|
|
190
332
|
kind: DatasetKind
|
|
191
333
|
metrics: Optional[List[str]] = None
|
|
192
334
|
|
|
335
|
+
|
|
193
336
|
class DatasetCreateFromMultipartUpload(BaseModel):
|
|
194
337
|
"""@private"""
|
|
195
|
-
|
|
338
|
+
|
|
339
|
+
use_case: str = Field(alias="useCase")
|
|
196
340
|
name: str
|
|
197
341
|
key: Optional[str] = None
|
|
198
342
|
source: Optional[DatasetSource] = None
|
|
199
|
-
upload_session_id: str = Field(alias=
|
|
343
|
+
upload_session_id: str = Field(alias="uploadSessionId")
|
|
344
|
+
|
|
200
345
|
|
|
201
346
|
class DatasetUploadProcessingStatusInput(BaseModel):
|
|
202
347
|
"""@private"""
|
|
203
|
-
|
|
204
|
-
|
|
348
|
+
|
|
349
|
+
use_case: str = Field(alias="useCase")
|
|
350
|
+
dataset_id: Any = Field(alias="datasetId")
|
|
351
|
+
|
|
205
352
|
|
|
206
353
|
class DeleteModelInput(BaseModel):
|
|
207
354
|
"""@private"""
|
|
355
|
+
|
|
208
356
|
model: str
|
|
209
357
|
|
|
358
|
+
|
|
210
359
|
class DeployModelInput(BaseModel):
|
|
211
360
|
"""@private"""
|
|
212
|
-
|
|
361
|
+
|
|
362
|
+
use_case: str = Field(alias="useCase")
|
|
213
363
|
model: str
|
|
214
|
-
placement: Optional[
|
|
364
|
+
placement: Optional["ModelPlacementInput"] = None
|
|
215
365
|
wait: bool = False
|
|
216
|
-
|
|
366
|
+
"Wait for the model to be deployed or not"
|
|
367
|
+
|
|
217
368
|
|
|
218
369
|
class EmojiInput(BaseModel):
|
|
219
370
|
"""@private"""
|
|
371
|
+
|
|
220
372
|
native: str
|
|
221
373
|
|
|
374
|
+
|
|
222
375
|
class FeedbackAddInput(BaseModel):
|
|
223
376
|
"""@private"""
|
|
377
|
+
|
|
224
378
|
value: Any
|
|
225
379
|
details: Optional[str] = None
|
|
226
380
|
reason: Optional[str] = None
|
|
227
|
-
user_id: Optional[Any] = Field(alias=
|
|
381
|
+
user_id: Optional[Any] = Field(alias="userId", default=None)
|
|
382
|
+
|
|
228
383
|
|
|
229
384
|
class FeedbackCondition(BaseModel):
|
|
230
385
|
"""@private
|
|
231
|
-
Feedback/metric filter condition with numeric comparisons"""
|
|
386
|
+
Feedback/metric filter condition with numeric comparisons"""
|
|
387
|
+
|
|
232
388
|
metric: str
|
|
233
|
-
|
|
234
|
-
value: Optional[
|
|
235
|
-
|
|
389
|
+
"Metric to filter by"
|
|
390
|
+
value: Optional["FloatNumericCondition"] = None
|
|
391
|
+
"Numeric value condition"
|
|
236
392
|
reasons: Optional[List[str]] = None
|
|
237
|
-
|
|
393
|
+
"Filter by feedback reasons"
|
|
238
394
|
user: Optional[Any] = None
|
|
239
|
-
|
|
395
|
+
"Filter by user who gave the feedback"
|
|
396
|
+
|
|
240
397
|
|
|
241
398
|
class FeedbackFilterInput(BaseModel):
|
|
242
399
|
"""@private"""
|
|
243
|
-
|
|
400
|
+
|
|
401
|
+
labels: Optional[List["LabelFilter"]] = None
|
|
402
|
+
|
|
244
403
|
|
|
245
404
|
class FeedbackUpdateInput(BaseModel):
|
|
246
405
|
"""@private"""
|
|
406
|
+
|
|
247
407
|
value: Optional[Any] = None
|
|
248
408
|
details: Optional[str] = None
|
|
249
409
|
|
|
410
|
+
|
|
250
411
|
class FloatNumericCondition(BaseModel):
|
|
251
412
|
"""@private
|
|
252
|
-
Numeric matching condition for filter expressions, parameterized by the numeric type"""
|
|
413
|
+
Numeric matching condition for filter expressions, parameterized by the numeric type"""
|
|
414
|
+
|
|
253
415
|
eq: Optional[float] = None
|
|
254
|
-
|
|
416
|
+
"Equal to value"
|
|
255
417
|
neq: Optional[float] = None
|
|
256
|
-
|
|
418
|
+
"Not Equal to value"
|
|
257
419
|
gt: Optional[float] = None
|
|
258
|
-
|
|
420
|
+
"Greater than value"
|
|
259
421
|
gte: Optional[float] = None
|
|
260
|
-
|
|
422
|
+
"Greater than or equal to value"
|
|
261
423
|
lt: Optional[float] = None
|
|
262
|
-
|
|
424
|
+
"Less than value"
|
|
263
425
|
lte: Optional[float] = None
|
|
264
|
-
|
|
426
|
+
"Less than or equal to value"
|
|
427
|
+
|
|
265
428
|
|
|
266
429
|
class FromGroupsQuery(BaseModel):
|
|
267
430
|
"""@private"""
|
|
268
|
-
|
|
431
|
+
|
|
432
|
+
filters: "ListCompletionsFilterInput"
|
|
269
433
|
grouping: CompletionGroupBy
|
|
270
|
-
groups: List[
|
|
434
|
+
groups: List["GroupSelectionQuery"]
|
|
435
|
+
|
|
271
436
|
|
|
272
437
|
class GlobalUsageFilterInput(BaseModel):
|
|
273
438
|
"""@private"""
|
|
274
|
-
|
|
439
|
+
|
|
440
|
+
timerange: Optional["TimeRange"] = None
|
|
275
441
|
'use none to get "all time" data'
|
|
276
442
|
interval: DateBucketUnit
|
|
277
443
|
timezone: Optional[str] = None
|
|
278
444
|
|
|
445
|
+
|
|
279
446
|
class GoogleProviderDataInput(BaseModel):
|
|
280
447
|
"""@private"""
|
|
281
|
-
|
|
282
|
-
|
|
448
|
+
|
|
449
|
+
api_key: str = Field(alias="apiKey")
|
|
450
|
+
external_model_id: str = Field(alias="externalModelId")
|
|
283
451
|
endpoint: Optional[str] = None
|
|
284
452
|
|
|
453
|
+
|
|
285
454
|
class GraderConfigInput(BaseModel):
|
|
286
455
|
"""@private"""
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
456
|
+
|
|
457
|
+
judge: Optional["JudgeConfigInput"] = None
|
|
458
|
+
prebuilt: Optional["PrebuiltConfigInput"] = None
|
|
459
|
+
remote: Optional["RemoteConfigInput"] = None
|
|
460
|
+
custom: Optional["CustomConfigInput"] = None
|
|
461
|
+
|
|
291
462
|
|
|
292
463
|
class GraderCreateInput(BaseModel):
|
|
293
464
|
"""@private"""
|
|
465
|
+
|
|
294
466
|
name: str
|
|
295
467
|
key: Optional[str] = None
|
|
296
|
-
grader_type: GraderTypeEnum = Field(alias=
|
|
297
|
-
grader_config:
|
|
298
|
-
metric: Optional[
|
|
468
|
+
grader_type: GraderTypeEnum = Field(alias="graderType")
|
|
469
|
+
grader_config: "GraderConfigInput" = Field(alias="graderConfig")
|
|
470
|
+
metric: Optional["MetricGetOrCreate"] = None
|
|
471
|
+
|
|
299
472
|
|
|
300
473
|
class GraderUpdateInput(BaseModel):
|
|
301
474
|
"""@private"""
|
|
475
|
+
|
|
302
476
|
name: Optional[str] = None
|
|
303
|
-
grader_type: Optional[GraderTypeEnum] = Field(alias=
|
|
304
|
-
grader_config: Optional[
|
|
477
|
+
grader_type: Optional[GraderTypeEnum] = Field(alias="graderType", default=None)
|
|
478
|
+
grader_config: Optional["GraderConfigInput"] = Field(alias="graderConfig", default=None)
|
|
479
|
+
|
|
305
480
|
|
|
306
481
|
class GroupSelection(BaseModel):
|
|
307
482
|
"""@private"""
|
|
483
|
+
|
|
308
484
|
exclude: Optional[List[Any]] = None
|
|
309
|
-
select_only: Optional[List[Any]] = Field(alias=
|
|
485
|
+
select_only: Optional[List[Any]] = Field(alias="selectOnly", default=None)
|
|
486
|
+
|
|
310
487
|
|
|
311
488
|
class GroupSelectionQuery(BaseModel):
|
|
312
489
|
"""@private"""
|
|
313
|
-
|
|
314
|
-
|
|
490
|
+
|
|
491
|
+
group_id: str = Field(alias="groupId")
|
|
492
|
+
selection: "GroupSelection"
|
|
493
|
+
|
|
315
494
|
|
|
316
495
|
class IdOrKeyCondition(BaseModel):
|
|
317
496
|
"""@private
|
|
318
|
-
String matching condition for filter expressions"""
|
|
497
|
+
String matching condition for filter expressions"""
|
|
498
|
+
|
|
319
499
|
eq: Optional[str] = None
|
|
320
|
-
|
|
321
|
-
in_: Optional[List[str]] = Field(alias=
|
|
322
|
-
|
|
500
|
+
"Exact match"
|
|
501
|
+
in_: Optional[List[str]] = Field(alias="in", default=None)
|
|
502
|
+
"Match any of the provided values (OR)"
|
|
323
503
|
neq: Optional[str] = None
|
|
324
|
-
|
|
504
|
+
"Does not equal"
|
|
505
|
+
|
|
325
506
|
|
|
326
507
|
class IntegerNumericCondition(BaseModel):
|
|
327
508
|
"""@private
|
|
328
|
-
Numeric matching condition for filter expressions, parameterized by the numeric type"""
|
|
509
|
+
Numeric matching condition for filter expressions, parameterized by the numeric type"""
|
|
510
|
+
|
|
329
511
|
eq: Optional[int] = None
|
|
330
|
-
|
|
512
|
+
"Equal to value"
|
|
331
513
|
neq: Optional[int] = None
|
|
332
|
-
|
|
514
|
+
"Not Equal to value"
|
|
333
515
|
gt: Optional[int] = None
|
|
334
|
-
|
|
516
|
+
"Greater than value"
|
|
335
517
|
gte: Optional[int] = None
|
|
336
|
-
|
|
518
|
+
"Greater than or equal to value"
|
|
337
519
|
lt: Optional[int] = None
|
|
338
|
-
|
|
520
|
+
"Less than value"
|
|
339
521
|
lte: Optional[int] = None
|
|
340
|
-
|
|
522
|
+
"Less than or equal to value"
|
|
523
|
+
|
|
341
524
|
|
|
342
525
|
class JobArtifactFilter(BaseModel):
|
|
343
526
|
"""@private"""
|
|
527
|
+
|
|
344
528
|
kinds: List[JobArtifactKind]
|
|
345
529
|
|
|
530
|
+
|
|
346
531
|
class JobInput(BaseModel):
|
|
347
532
|
"""@private"""
|
|
533
|
+
|
|
348
534
|
recipe: str
|
|
349
|
-
use_case: str = Field(alias=
|
|
535
|
+
use_case: str = Field(alias="useCase")
|
|
350
536
|
args: Any
|
|
351
537
|
name: Optional[str] = None
|
|
352
|
-
compute_pool: Optional[str] = Field(alias=
|
|
353
|
-
num_gpus: int = Field(alias=
|
|
538
|
+
compute_pool: Optional[str] = Field(alias="computePool", default=None)
|
|
539
|
+
num_gpus: int = Field(alias="numGpus")
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
class JobUpdatePayload(BaseModel):
|
|
543
|
+
"""@private"""
|
|
544
|
+
|
|
545
|
+
job_id: Any = Field(alias="jobId")
|
|
546
|
+
job_name: str = Field(alias="jobName")
|
|
547
|
+
job_status: JobStatusGQL = Field(alias="jobStatus")
|
|
548
|
+
job_progress: float = Field(alias="jobProgress")
|
|
549
|
+
job_started_at: Any = Field(alias="jobStartedAt")
|
|
550
|
+
job_ended_at: Optional[Any] = Field(alias="jobEndedAt", default=None)
|
|
551
|
+
use_case_id: Any = Field(alias="useCaseId")
|
|
552
|
+
job_input: Any = Field(alias="jobInput")
|
|
553
|
+
job_outputs: List[Any] = Field(alias="jobOutputs")
|
|
554
|
+
job_error: Optional[str] = Field(alias="jobError", default=None)
|
|
555
|
+
|
|
354
556
|
|
|
355
557
|
class JudgeConfigInput(BaseModel):
|
|
356
558
|
"""@private"""
|
|
559
|
+
|
|
357
560
|
model: str
|
|
358
561
|
criteria: str
|
|
359
|
-
examples: List[
|
|
360
|
-
system_template: str = Field(alias=
|
|
361
|
-
user_template: str = Field(alias=
|
|
562
|
+
examples: List["JudgeExampleInput"]
|
|
563
|
+
system_template: str = Field(alias="systemTemplate")
|
|
564
|
+
user_template: str = Field(alias="userTemplate")
|
|
565
|
+
|
|
362
566
|
|
|
363
567
|
class JudgeCreate(BaseModel):
|
|
364
568
|
"""@private"""
|
|
569
|
+
|
|
365
570
|
key: Optional[str] = None
|
|
366
571
|
name: str
|
|
367
572
|
criteria: str
|
|
368
|
-
examples: List[
|
|
573
|
+
examples: List["JudgeExampleInput"] = Field(default_factory=lambda: [])
|
|
369
574
|
model: str
|
|
370
575
|
metric: Optional[str] = None
|
|
371
576
|
|
|
577
|
+
|
|
372
578
|
class JudgeExampleInput(BaseModel):
|
|
373
579
|
"""@private"""
|
|
374
|
-
|
|
580
|
+
|
|
581
|
+
input: List["JudgeExampleInputTurnEntry"]
|
|
375
582
|
reasoning: Optional[str] = None
|
|
376
583
|
output: str
|
|
377
|
-
pass_: bool = Field(alias=
|
|
584
|
+
pass_: bool = Field(alias="pass")
|
|
378
585
|
id: Optional[Any] = None
|
|
379
586
|
|
|
587
|
+
|
|
380
588
|
class JudgeExampleInputTurnEntry(BaseModel):
|
|
381
589
|
"""@private"""
|
|
590
|
+
|
|
382
591
|
role: str
|
|
383
592
|
content: str
|
|
384
593
|
|
|
594
|
+
|
|
385
595
|
class JudgeUpdate(BaseModel):
|
|
386
596
|
"""@private"""
|
|
597
|
+
|
|
387
598
|
name: Optional[str] = None
|
|
388
599
|
criteria: Optional[str] = None
|
|
389
|
-
examples: Optional[List[
|
|
600
|
+
examples: Optional[List["JudgeExampleInput"]] = None
|
|
390
601
|
model: Optional[str] = None
|
|
391
602
|
|
|
603
|
+
|
|
392
604
|
class LabelCondition(BaseModel):
|
|
393
605
|
"""@private
|
|
394
|
-
Label-specific filter condition"""
|
|
606
|
+
Label-specific filter condition"""
|
|
607
|
+
|
|
395
608
|
key: str
|
|
396
|
-
|
|
397
|
-
value: Optional[
|
|
398
|
-
|
|
609
|
+
"Label key"
|
|
610
|
+
value: Optional["StringCondition"] = None
|
|
611
|
+
"Label value condition (optional - if not set, just checks for key existence)"
|
|
612
|
+
|
|
399
613
|
|
|
400
614
|
class LabelFilter(BaseModel):
|
|
401
615
|
"""@private"""
|
|
616
|
+
|
|
402
617
|
key: str
|
|
403
618
|
value: Optional[List[str]] = None
|
|
404
619
|
|
|
620
|
+
|
|
405
621
|
class LabelInput(BaseModel):
|
|
406
622
|
"""@private"""
|
|
623
|
+
|
|
407
624
|
key: str
|
|
408
625
|
value: str
|
|
409
626
|
|
|
627
|
+
|
|
410
628
|
class ListCompletionsFilterInput(BaseModel):
|
|
411
629
|
"""@private"""
|
|
412
|
-
|
|
630
|
+
|
|
631
|
+
use_case: str = Field(alias="useCase")
|
|
413
632
|
models: Optional[List[str]] = None
|
|
414
|
-
timerange: Optional[
|
|
415
|
-
session_id: Optional[Any] = Field(alias=
|
|
416
|
-
user_id: Optional[Any] = Field(alias=
|
|
417
|
-
feedbacks: Optional[List[
|
|
418
|
-
comparisons: Optional[List[
|
|
419
|
-
labels: Optional[List[
|
|
420
|
-
prompt_hash: Optional[str] = Field(alias=
|
|
421
|
-
completion_id: Optional[Any] = Field(alias=
|
|
633
|
+
timerange: Optional["TimeRange"] = None
|
|
634
|
+
session_id: Optional[Any] = Field(alias="sessionId", default=None)
|
|
635
|
+
user_id: Optional[Any] = Field(alias="userId", default=None)
|
|
636
|
+
feedbacks: Optional[List["CompletionFeedbackFilterInput"]] = None
|
|
637
|
+
comparisons: Optional[List["CompletionComparisonFilterInput"]] = None
|
|
638
|
+
labels: Optional[List["LabelFilter"]] = None
|
|
639
|
+
prompt_hash: Optional[str] = Field(alias="promptHash", default=None)
|
|
640
|
+
completion_id: Optional[Any] = Field(alias="completionId", default=None)
|
|
422
641
|
source: Optional[List[CompletionSource]] = None
|
|
423
642
|
completion: Optional[str] = None
|
|
424
643
|
prompt: Optional[str] = None
|
|
425
|
-
advanced_filter: Optional[
|
|
426
|
-
|
|
644
|
+
advanced_filter: Optional["CompletionFilterExpression"] = Field(alias="advancedFilter", default=None)
|
|
645
|
+
"Advanced filter supporting AND/OR/NOT logic\nWhen set, this takes precedence over the simple filter fields above\n(except use_case which is always required)"
|
|
646
|
+
|
|
427
647
|
|
|
428
648
|
class ListJobsFilterInput(BaseModel):
|
|
429
649
|
"""@private"""
|
|
430
|
-
|
|
650
|
+
|
|
651
|
+
use_case: Optional[str] = Field(alias="useCase", default=None)
|
|
431
652
|
kind: Optional[List[JobKind]] = None
|
|
432
653
|
status: Optional[List[JobStatus]] = None
|
|
433
|
-
timerange: Optional[
|
|
434
|
-
custom_recipes: Optional[List[str]] = Field(alias=
|
|
435
|
-
artifacts: Optional[
|
|
654
|
+
timerange: Optional["TimeRange"] = None
|
|
655
|
+
custom_recipes: Optional[List[str]] = Field(alias="customRecipes", default=None)
|
|
656
|
+
artifacts: Optional["JobArtifactFilter"] = None
|
|
657
|
+
|
|
436
658
|
|
|
437
659
|
class MetricCreate(BaseModel):
|
|
438
660
|
"""@private"""
|
|
661
|
+
|
|
439
662
|
name: str
|
|
440
663
|
key: Optional[str] = None
|
|
441
664
|
kind: MetricKind
|
|
442
|
-
scoring_type: MetricScoringType = Field(alias=
|
|
665
|
+
scoring_type: MetricScoringType = Field(alias="scoringType", default=MetricScoringType.HIGHER_IS_BETTER)
|
|
443
666
|
description: Optional[str] = None
|
|
444
667
|
unit: Optional[str] = None
|
|
445
668
|
|
|
669
|
+
|
|
446
670
|
class MetricGetOrCreate(BaseModel):
|
|
447
671
|
"""@private"""
|
|
672
|
+
|
|
448
673
|
existing: Optional[str] = None
|
|
449
|
-
new: Optional[
|
|
674
|
+
new: Optional["MetricCreate"] = None
|
|
675
|
+
|
|
450
676
|
|
|
451
677
|
class MetricLink(BaseModel):
|
|
452
678
|
"""@private"""
|
|
453
|
-
|
|
679
|
+
|
|
680
|
+
use_case: str = Field(alias="useCase")
|
|
454
681
|
metric: str
|
|
455
682
|
|
|
683
|
+
|
|
456
684
|
class MetricTrendInput(BaseModel):
|
|
457
685
|
"""@private"""
|
|
458
|
-
|
|
686
|
+
|
|
687
|
+
timerange: Optional["TimeRange"] = None
|
|
459
688
|
aggregation: MetricAggregation = MetricAggregation.AVERAGE
|
|
460
689
|
|
|
690
|
+
|
|
461
691
|
class MetricUnlink(BaseModel):
|
|
462
692
|
"""@private"""
|
|
463
|
-
|
|
693
|
+
|
|
694
|
+
use_case: str = Field(alias="useCase")
|
|
464
695
|
metric: str
|
|
465
696
|
|
|
697
|
+
|
|
466
698
|
class ModelComputeConfigInput(BaseModel):
|
|
467
699
|
"""@private"""
|
|
700
|
+
|
|
468
701
|
tp: Optional[int] = None
|
|
469
|
-
kv_cache_len: Optional[int] = Field(alias=
|
|
470
|
-
max_seq_len: Optional[int] = Field(alias=
|
|
702
|
+
kv_cache_len: Optional[int] = Field(alias="kvCacheLen", default=None)
|
|
703
|
+
max_seq_len: Optional[int] = Field(alias="maxSeqLen", default=None)
|
|
704
|
+
|
|
471
705
|
|
|
472
706
|
class ModelFilter(BaseModel):
|
|
473
707
|
"""@private"""
|
|
474
|
-
|
|
708
|
+
|
|
709
|
+
in_storage: Optional[bool] = Field(alias="inStorage", default=None)
|
|
475
710
|
available: Optional[bool] = None
|
|
476
711
|
trainable: Optional[bool] = None
|
|
477
|
-
capabilities: Optional[
|
|
478
|
-
view_all: Optional[bool] = Field(alias=
|
|
712
|
+
capabilities: Optional["CapabilityFilter"] = None
|
|
713
|
+
view_all: Optional[bool] = Field(alias="viewAll", default=None)
|
|
479
714
|
online: Optional[List[ModelOnline]] = None
|
|
480
715
|
published: Optional[bool] = None
|
|
481
|
-
size: Optional[
|
|
716
|
+
size: Optional["IntegerNumericCondition"] = None
|
|
717
|
+
|
|
482
718
|
|
|
483
719
|
class ModelPlacementInput(BaseModel):
|
|
484
720
|
"""@private"""
|
|
485
|
-
|
|
486
|
-
|
|
721
|
+
|
|
722
|
+
compute_pools: List[str] = Field(alias="computePools")
|
|
723
|
+
max_ttft_ms: Optional[int] = Field(alias="maxTtftMs", default=None)
|
|
724
|
+
|
|
487
725
|
|
|
488
726
|
class ModelProviderDataInput(BaseModel):
|
|
489
727
|
"""@private"""
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
728
|
+
|
|
729
|
+
open_ai: Optional["OpenAIProviderDataInput"] = Field(alias="openAI", default=None)
|
|
730
|
+
legacy_open_ai: Optional["OpenAIProviderDataInput"] = Field(alias="legacyOpenAI", default=None)
|
|
731
|
+
google: Optional["GoogleProviderDataInput"] = None
|
|
732
|
+
anthropic: Optional["AnthropicProviderDataInput"] = None
|
|
733
|
+
|
|
494
734
|
|
|
495
735
|
class ModelServiceFilter(BaseModel):
|
|
496
736
|
"""@private"""
|
|
737
|
+
|
|
497
738
|
model: Optional[str] = None
|
|
498
|
-
capabilities: Optional[
|
|
499
|
-
active_only: bool = Field(alias=
|
|
500
|
-
|
|
739
|
+
capabilities: Optional["CapabilityFilter"] = None
|
|
740
|
+
active_only: bool = Field(alias="activeOnly", default=True)
|
|
741
|
+
"If true (default), only return model services whose model has a binding.\nIf false, return all model services regardless of binding status."
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
class NotificationPayload(BaseModel):
|
|
745
|
+
"""@private"""
|
|
746
|
+
|
|
747
|
+
job_update: Optional["JobUpdatePayload"] = Field(alias="jobUpdate", default=None)
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
class NotificationScopeInput(BaseModel):
|
|
751
|
+
"""@private"""
|
|
752
|
+
|
|
753
|
+
user: Optional[List[Any]] = None
|
|
754
|
+
team: Optional[str] = None
|
|
755
|
+
organization: Optional["OrganizationInput"] = None
|
|
756
|
+
admin: Optional["AdminInput"] = None
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
class NotificationSettingsInput(BaseModel):
|
|
760
|
+
"""@private"""
|
|
761
|
+
|
|
762
|
+
subscriptions: List["SubscriptionInput"]
|
|
763
|
+
|
|
501
764
|
|
|
502
765
|
class OpenAIProviderDataInput(BaseModel):
|
|
503
766
|
"""@private"""
|
|
504
|
-
|
|
505
|
-
|
|
767
|
+
|
|
768
|
+
api_key: str = Field(alias="apiKey")
|
|
769
|
+
external_model_id: str = Field(alias="externalModelId")
|
|
506
770
|
endpoint: Optional[str] = None
|
|
507
771
|
|
|
772
|
+
|
|
508
773
|
class OrderPair(BaseModel):
|
|
509
774
|
"""@private"""
|
|
775
|
+
|
|
510
776
|
field: str
|
|
511
777
|
order: SortDirection
|
|
512
778
|
|
|
779
|
+
|
|
513
780
|
class PrebuiltConfigInput(BaseModel):
|
|
514
781
|
"""@private"""
|
|
782
|
+
|
|
515
783
|
key: PrebuiltCriteriaKey
|
|
516
784
|
model: str
|
|
517
785
|
|
|
786
|
+
|
|
518
787
|
class PrebuiltJudgeCreate(BaseModel):
|
|
519
788
|
"""@private"""
|
|
789
|
+
|
|
520
790
|
key: Optional[str] = None
|
|
521
791
|
name: str
|
|
522
792
|
model: str
|
|
523
|
-
prebuilt_criteria_key: PrebuiltCriteriaKey = Field(alias=
|
|
793
|
+
prebuilt_criteria_key: PrebuiltCriteriaKey = Field(alias="prebuiltCriteriaKey")
|
|
794
|
+
|
|
524
795
|
|
|
525
796
|
class RemoteConfigInput(BaseModel):
|
|
526
797
|
"""@private"""
|
|
798
|
+
|
|
527
799
|
url: str
|
|
528
800
|
|
|
801
|
+
|
|
529
802
|
class RemoteEnvCreate(BaseModel):
|
|
530
803
|
"""@private"""
|
|
804
|
+
|
|
531
805
|
url: str
|
|
532
806
|
key: Optional[str] = None
|
|
533
807
|
name: Optional[str] = None
|
|
534
808
|
description: Optional[str] = None
|
|
535
809
|
|
|
810
|
+
|
|
536
811
|
class RemoveModelFromUseCaseInput(BaseModel):
|
|
537
812
|
"""@private"""
|
|
538
|
-
|
|
813
|
+
|
|
814
|
+
use_case: str = Field(alias="useCase")
|
|
539
815
|
model: str
|
|
540
816
|
|
|
817
|
+
|
|
541
818
|
class ResizePartitionInput(BaseModel):
|
|
542
819
|
"""@private"""
|
|
543
|
-
|
|
820
|
+
|
|
821
|
+
harmony_group: str = Field(alias="harmonyGroup")
|
|
544
822
|
size: int
|
|
545
823
|
|
|
824
|
+
|
|
546
825
|
class RoleCreate(BaseModel):
|
|
547
826
|
"""@private"""
|
|
827
|
+
|
|
548
828
|
key: Optional[str] = None
|
|
549
829
|
name: str
|
|
550
830
|
permissions: List[str]
|
|
551
831
|
|
|
832
|
+
|
|
552
833
|
class SampleConfig(BaseModel):
|
|
553
834
|
"""@private"""
|
|
554
|
-
|
|
555
|
-
|
|
835
|
+
|
|
836
|
+
selection_type: SelectionTypeInput = Field(alias="selectionType")
|
|
837
|
+
sample_size: Optional[int] = Field(alias="sampleSize", default=None)
|
|
838
|
+
|
|
556
839
|
|
|
557
840
|
class SearchInput(BaseModel):
|
|
558
841
|
"""@private"""
|
|
842
|
+
|
|
559
843
|
query: str
|
|
560
844
|
|
|
845
|
+
|
|
561
846
|
class StringCondition(BaseModel):
|
|
562
847
|
"""@private
|
|
563
|
-
String matching condition for filter expressions"""
|
|
848
|
+
String matching condition for filter expressions"""
|
|
849
|
+
|
|
564
850
|
eq: Optional[str] = None
|
|
565
|
-
|
|
566
|
-
in_: Optional[List[str]] = Field(alias=
|
|
567
|
-
|
|
851
|
+
"Exact match"
|
|
852
|
+
in_: Optional[List[str]] = Field(alias="in", default=None)
|
|
853
|
+
"Match any of the provided values (OR)"
|
|
568
854
|
neq: Optional[str] = None
|
|
569
|
-
|
|
855
|
+
"Does not equal"
|
|
856
|
+
|
|
570
857
|
|
|
571
858
|
class SystemPromptTemplateCreate(BaseModel):
|
|
572
859
|
"""@private"""
|
|
860
|
+
|
|
573
861
|
name: str
|
|
574
862
|
template: str
|
|
575
863
|
|
|
864
|
+
|
|
576
865
|
class SystemPromptTemplateUpdate(BaseModel):
|
|
577
866
|
"""@private"""
|
|
578
|
-
|
|
867
|
+
|
|
868
|
+
system_prompt_template: Any = Field(alias="systemPromptTemplate")
|
|
579
869
|
name: Optional[str] = None
|
|
580
870
|
template: str
|
|
581
|
-
update_model_services: bool = Field(alias=
|
|
871
|
+
update_model_services: bool = Field(alias="updateModelServices", default=False)
|
|
872
|
+
|
|
582
873
|
|
|
583
874
|
class TeamCreate(BaseModel):
|
|
584
875
|
"""@private"""
|
|
876
|
+
|
|
585
877
|
key: Optional[str] = None
|
|
586
878
|
name: str
|
|
587
879
|
|
|
880
|
+
|
|
588
881
|
class TeamMemberRemove(BaseModel):
|
|
589
882
|
"""@private"""
|
|
883
|
+
|
|
590
884
|
user: str
|
|
591
885
|
team: str
|
|
592
886
|
|
|
887
|
+
|
|
593
888
|
class TeamMemberSet(BaseModel):
|
|
594
889
|
"""@private"""
|
|
890
|
+
|
|
595
891
|
user: str
|
|
596
892
|
team: str
|
|
597
893
|
role: str
|
|
598
894
|
|
|
895
|
+
|
|
896
|
+
class TestNotificationInput(BaseModel):
|
|
897
|
+
"""@private"""
|
|
898
|
+
|
|
899
|
+
topic: str
|
|
900
|
+
scope: "NotificationScopeInput"
|
|
901
|
+
payload: "NotificationPayload"
|
|
902
|
+
|
|
903
|
+
|
|
599
904
|
class TextCondition(BaseModel):
|
|
600
905
|
"""@private"""
|
|
906
|
+
|
|
601
907
|
eq: Optional[str] = None
|
|
602
|
-
|
|
908
|
+
"Exact match"
|
|
603
909
|
contains: Optional[str] = None
|
|
604
|
-
|
|
910
|
+
"Text contains this substring (case insensitive)"
|
|
911
|
+
|
|
605
912
|
|
|
606
913
|
class TimeRange(BaseModel):
|
|
607
914
|
"""@private"""
|
|
608
|
-
|
|
915
|
+
|
|
916
|
+
from_: int | str = Field(alias="from")
|
|
609
917
|
to: int | str
|
|
610
918
|
|
|
919
|
+
|
|
611
920
|
class TimeseriesInput(BaseModel):
|
|
612
921
|
"""@private"""
|
|
922
|
+
|
|
613
923
|
interval: TimeseriesInterval
|
|
614
|
-
timerange: Optional[
|
|
924
|
+
timerange: Optional["TimeRange"] = None
|
|
615
925
|
timezone: Optional[str] = None
|
|
616
|
-
by_model: bool = Field(alias=
|
|
926
|
+
by_model: bool = Field(alias="byModel", default=False)
|
|
617
927
|
aggregation: MetricAggregation = MetricAggregation.AVERAGE
|
|
618
928
|
|
|
929
|
+
|
|
619
930
|
class UnitConfigInput(BaseModel):
|
|
620
931
|
"""@private"""
|
|
932
|
+
|
|
621
933
|
symbol: str
|
|
622
934
|
position: UnitPosition
|
|
623
935
|
|
|
936
|
+
|
|
624
937
|
class UpdateCompletion(BaseModel):
|
|
625
938
|
"""@private"""
|
|
939
|
+
|
|
626
940
|
id: Any
|
|
627
|
-
remove_labels: Optional[List[
|
|
628
|
-
|
|
629
|
-
add_labels: Optional[List[
|
|
630
|
-
|
|
631
|
-
set_labels: Optional[List[
|
|
941
|
+
remove_labels: Optional[List["CompletionLabelValue"]] = Field(alias="removeLabels", default=None)
|
|
942
|
+
"remove some label value. This operation is atomic"
|
|
943
|
+
add_labels: Optional[List["CompletionLabelValue"]] = Field(alias="addLabels", default=None)
|
|
944
|
+
"add a label value. This operation is atomic"
|
|
945
|
+
set_labels: Optional[List["CompletionLabelValue"]] = Field(alias="setLabels", default=None)
|
|
632
946
|
"set the completion labels to this list. If you want to only add or remove specific labels,\nit's better to use `add_labels` or `remove_labels`"
|
|
633
947
|
metadata: Optional[Any] = None
|
|
634
|
-
|
|
948
|
+
"set metadata associated with this prompt for use with external reward servers"
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
class UpdateIntegrationConfigInput(BaseModel):
|
|
952
|
+
"""@private"""
|
|
953
|
+
|
|
954
|
+
connection: Optional["ConnectionConfigInput"] = None
|
|
955
|
+
notification_settings: Optional["NotificationSettingsInput"] = Field(alias="notificationSettings", default=None)
|
|
956
|
+
delivery_policy: Optional[DeliveryPolicyInput] = Field(alias="deliveryPolicy", default=None)
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
class UpdateIntegrationInput(BaseModel):
|
|
960
|
+
"""@private"""
|
|
961
|
+
|
|
962
|
+
name: Optional[str] = None
|
|
963
|
+
config: Optional["UpdateIntegrationConfigInput"] = None
|
|
964
|
+
enabled: Optional[bool] = None
|
|
965
|
+
|
|
635
966
|
|
|
636
967
|
class UpdateModelInput(BaseModel):
|
|
637
968
|
"""@private"""
|
|
969
|
+
|
|
638
970
|
model: str
|
|
639
971
|
published: Optional[bool] = None
|
|
640
972
|
stable: Optional[bool] = None
|
|
641
973
|
|
|
974
|
+
|
|
642
975
|
class UpdateModelService(BaseModel):
|
|
643
976
|
"""@private"""
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
977
|
+
|
|
978
|
+
use_case: str = Field(alias="useCase")
|
|
979
|
+
model_service: str = Field(alias="modelService")
|
|
980
|
+
is_default: Optional[bool] = Field(alias="isDefault", default=None)
|
|
981
|
+
desired_online: Optional[bool] = Field(alias="desiredOnline", default=None)
|
|
648
982
|
name: Optional[str] = None
|
|
649
|
-
system_prompt_template: Optional[Any] = Field(alias=
|
|
650
|
-
placement: Optional[
|
|
651
|
-
tool_providers: Optional[List[str]] = Field(alias=
|
|
983
|
+
system_prompt_template: Optional[Any] = Field(alias="systemPromptTemplate", default=None)
|
|
984
|
+
placement: Optional["ModelPlacementInput"] = None
|
|
985
|
+
tool_providers: Optional[List[str]] = Field(alias="toolProviders", default=None)
|
|
986
|
+
|
|
652
987
|
|
|
653
988
|
class UpdateRecipeInput(BaseModel):
|
|
654
989
|
"""@private"""
|
|
990
|
+
|
|
655
991
|
name: Optional[str] = None
|
|
656
992
|
description: Optional[str] = None
|
|
657
|
-
labels: Optional[List[
|
|
993
|
+
labels: Optional[List["LabelInput"]] = None
|
|
994
|
+
|
|
658
995
|
|
|
659
996
|
class UpdateToolProviderInput(BaseModel):
|
|
660
997
|
"""@private"""
|
|
998
|
+
|
|
661
999
|
name: Optional[str] = None
|
|
662
1000
|
uri: Optional[str] = None
|
|
663
1001
|
protocol: Optional[Protocol] = None
|
|
664
1002
|
|
|
1003
|
+
|
|
665
1004
|
class UsageFilterInput(BaseModel):
|
|
666
1005
|
"""@private"""
|
|
667
|
-
|
|
668
|
-
|
|
1006
|
+
|
|
1007
|
+
model_id: Any = Field(alias="modelId")
|
|
1008
|
+
timerange: Optional["TimeRange"] = None
|
|
669
1009
|
unit: DateBucketUnit
|
|
670
1010
|
timezone: Optional[str] = None
|
|
671
1011
|
|
|
1012
|
+
|
|
672
1013
|
class UsagePerUseCaseFilterInput(BaseModel):
|
|
673
1014
|
"""@private"""
|
|
674
|
-
|
|
675
|
-
|
|
1015
|
+
|
|
1016
|
+
model_id: Any = Field(alias="modelId")
|
|
1017
|
+
timerange: Optional["TimeRange"] = None
|
|
1018
|
+
|
|
676
1019
|
|
|
677
1020
|
class UseCaseCreate(BaseModel):
|
|
678
1021
|
"""@private"""
|
|
1022
|
+
|
|
679
1023
|
name: str
|
|
680
1024
|
team: Optional[str] = None
|
|
681
1025
|
key: Optional[str] = None
|
|
682
1026
|
description: Optional[str] = None
|
|
683
|
-
gradient_color: Optional[str] = Field(alias=
|
|
684
|
-
metadata: Optional[
|
|
685
|
-
settings: Optional[
|
|
1027
|
+
gradient_color: Optional[str] = Field(alias="gradientColor", default=None)
|
|
1028
|
+
metadata: Optional["UseCaseMetadataInput"] = None
|
|
1029
|
+
settings: Optional["UseCaseSettingsInput"] = None
|
|
1030
|
+
|
|
686
1031
|
|
|
687
1032
|
class UseCaseFilter(BaseModel):
|
|
688
1033
|
"""@private"""
|
|
689
|
-
|
|
1034
|
+
|
|
1035
|
+
is_archived: Optional[bool] = Field(alias="isArchived", default=None)
|
|
1036
|
+
|
|
690
1037
|
|
|
691
1038
|
class UseCaseMetadataInput(BaseModel):
|
|
692
1039
|
"""@private"""
|
|
693
|
-
|
|
1040
|
+
|
|
1041
|
+
emoji: Optional["EmojiInput"] = None
|
|
1042
|
+
|
|
694
1043
|
|
|
695
1044
|
class UseCaseSettingsInput(BaseModel):
|
|
696
1045
|
"""@private"""
|
|
697
|
-
|
|
1046
|
+
|
|
1047
|
+
default_metric: Optional[str] = Field(alias="defaultMetric", default=None)
|
|
1048
|
+
|
|
698
1049
|
|
|
699
1050
|
class UseCaseShareInput(BaseModel):
|
|
700
1051
|
"""@private"""
|
|
1052
|
+
|
|
701
1053
|
team: str
|
|
702
1054
|
role: str
|
|
703
|
-
is_owner: bool = Field(alias=
|
|
1055
|
+
is_owner: bool = Field(alias="isOwner")
|
|
1056
|
+
|
|
704
1057
|
|
|
705
1058
|
class UseCaseShares(BaseModel):
|
|
706
1059
|
"""@private"""
|
|
707
|
-
|
|
1060
|
+
|
|
1061
|
+
shares: List["UseCaseShareInput"]
|
|
1062
|
+
|
|
708
1063
|
|
|
709
1064
|
class UseCaseUpdate(BaseModel):
|
|
710
1065
|
"""@private"""
|
|
1066
|
+
|
|
711
1067
|
name: Optional[str] = None
|
|
712
1068
|
description: Optional[str] = None
|
|
713
|
-
widgets: Optional[List[
|
|
714
|
-
metadata: Optional[
|
|
715
|
-
settings: Optional[
|
|
716
|
-
is_archived: Optional[bool] = Field(alias=
|
|
1069
|
+
widgets: Optional[List["WidgetInput"]] = None
|
|
1070
|
+
metadata: Optional["UseCaseMetadataInput"] = None
|
|
1071
|
+
settings: Optional["UseCaseSettingsInput"] = None
|
|
1072
|
+
is_archived: Optional[bool] = Field(alias="isArchived", default=None)
|
|
1073
|
+
|
|
717
1074
|
|
|
718
1075
|
class UserCreate(BaseModel):
|
|
719
1076
|
"""@private"""
|
|
1077
|
+
|
|
720
1078
|
email: str
|
|
721
1079
|
name: str
|
|
722
|
-
teams: List[
|
|
1080
|
+
teams: List["UserCreateTeamWithRole"]
|
|
1081
|
+
|
|
723
1082
|
|
|
724
1083
|
class UserCreateTeamWithRole(BaseModel):
|
|
725
1084
|
"""@private"""
|
|
1085
|
+
|
|
726
1086
|
team: str
|
|
727
1087
|
role: str
|
|
728
1088
|
|
|
1089
|
+
|
|
729
1090
|
class WidgetInput(BaseModel):
|
|
730
1091
|
"""@private"""
|
|
1092
|
+
|
|
731
1093
|
title: str
|
|
732
1094
|
metric: str
|
|
733
1095
|
aggregation: MetricAggregation
|
|
734
|
-
unit:
|
|
1096
|
+
unit: "UnitConfigInput"
|
|
1097
|
+
|
|
1098
|
+
|
|
735
1099
|
AddExternalModelInput.model_rebuild()
|
|
736
1100
|
CompletionFilterExpression.model_rebuild()
|
|
737
1101
|
CompletionsByFilters.model_rebuild()
|
|
1102
|
+
ConnectionConfigInput.model_rebuild()
|
|
1103
|
+
CreateIntegrationConfigInput.model_rebuild()
|
|
1104
|
+
CreateIntegrationInput.model_rebuild()
|
|
738
1105
|
CreateRecipeInput.model_rebuild()
|
|
739
1106
|
CustomRecipeFilterInput.model_rebuild()
|
|
740
1107
|
DatasetCompletionQuery.model_rebuild()
|
|
@@ -760,8 +1127,14 @@ MetricTrendInput.model_rebuild()
|
|
|
760
1127
|
ModelFilter.model_rebuild()
|
|
761
1128
|
ModelProviderDataInput.model_rebuild()
|
|
762
1129
|
ModelServiceFilter.model_rebuild()
|
|
1130
|
+
NotificationPayload.model_rebuild()
|
|
1131
|
+
NotificationScopeInput.model_rebuild()
|
|
1132
|
+
NotificationSettingsInput.model_rebuild()
|
|
1133
|
+
TestNotificationInput.model_rebuild()
|
|
763
1134
|
TimeseriesInput.model_rebuild()
|
|
764
1135
|
UpdateCompletion.model_rebuild()
|
|
1136
|
+
UpdateIntegrationConfigInput.model_rebuild()
|
|
1137
|
+
UpdateIntegrationInput.model_rebuild()
|
|
765
1138
|
UpdateModelService.model_rebuild()
|
|
766
1139
|
UpdateRecipeInput.model_rebuild()
|
|
767
1140
|
UsageFilterInput.model_rebuild()
|
|
@@ -771,4 +1144,4 @@ UseCaseMetadataInput.model_rebuild()
|
|
|
771
1144
|
UseCaseShares.model_rebuild()
|
|
772
1145
|
UseCaseUpdate.model_rebuild()
|
|
773
1146
|
UserCreate.model_rebuild()
|
|
774
|
-
WidgetInput.model_rebuild()
|
|
1147
|
+
WidgetInput.model_rebuild()
|