orca-sdk 0.1.9__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.
- orca_sdk/__init__.py +30 -0
- orca_sdk/_shared/__init__.py +10 -0
- orca_sdk/_shared/metrics.py +634 -0
- orca_sdk/_shared/metrics_test.py +570 -0
- orca_sdk/_utils/__init__.py +0 -0
- orca_sdk/_utils/analysis_ui.py +196 -0
- orca_sdk/_utils/analysis_ui_style.css +51 -0
- orca_sdk/_utils/auth.py +65 -0
- orca_sdk/_utils/auth_test.py +31 -0
- orca_sdk/_utils/common.py +37 -0
- orca_sdk/_utils/data_parsing.py +129 -0
- orca_sdk/_utils/data_parsing_test.py +244 -0
- orca_sdk/_utils/pagination.py +126 -0
- orca_sdk/_utils/pagination_test.py +132 -0
- orca_sdk/_utils/prediction_result_ui.css +18 -0
- orca_sdk/_utils/prediction_result_ui.py +110 -0
- orca_sdk/_utils/tqdm_file_reader.py +12 -0
- orca_sdk/_utils/value_parser.py +45 -0
- orca_sdk/_utils/value_parser_test.py +39 -0
- orca_sdk/async_client.py +4104 -0
- orca_sdk/classification_model.py +1165 -0
- orca_sdk/classification_model_test.py +887 -0
- orca_sdk/client.py +4096 -0
- orca_sdk/conftest.py +382 -0
- orca_sdk/credentials.py +217 -0
- orca_sdk/credentials_test.py +121 -0
- orca_sdk/datasource.py +576 -0
- orca_sdk/datasource_test.py +463 -0
- orca_sdk/embedding_model.py +712 -0
- orca_sdk/embedding_model_test.py +206 -0
- orca_sdk/job.py +343 -0
- orca_sdk/job_test.py +108 -0
- orca_sdk/memoryset.py +3811 -0
- orca_sdk/memoryset_test.py +1150 -0
- orca_sdk/regression_model.py +841 -0
- orca_sdk/regression_model_test.py +595 -0
- orca_sdk/telemetry.py +742 -0
- orca_sdk/telemetry_test.py +119 -0
- orca_sdk-0.1.9.dist-info/METADATA +98 -0
- orca_sdk-0.1.9.dist-info/RECORD +41 -0
- orca_sdk-0.1.9.dist-info/WHEEL +4 -0
orca_sdk/client.py
ADDED
|
@@ -0,0 +1,4096 @@
|
|
|
1
|
+
# Do not edit this file manually! It is generated by scripts/codegen.py
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import logging
|
|
7
|
+
import os
|
|
8
|
+
import uuid
|
|
9
|
+
from contextlib import contextmanager
|
|
10
|
+
from contextvars import ContextVar
|
|
11
|
+
from string import Formatter
|
|
12
|
+
from typing import (
|
|
13
|
+
Any,
|
|
14
|
+
Callable,
|
|
15
|
+
Generator,
|
|
16
|
+
Literal,
|
|
17
|
+
Mapping,
|
|
18
|
+
NotRequired,
|
|
19
|
+
Self,
|
|
20
|
+
TypeAlias,
|
|
21
|
+
TypedDict,
|
|
22
|
+
cast,
|
|
23
|
+
overload,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
from httpx import (
|
|
27
|
+
URL,
|
|
28
|
+
USE_CLIENT_DEFAULT,
|
|
29
|
+
BaseTransport,
|
|
30
|
+
Client,
|
|
31
|
+
Headers,
|
|
32
|
+
HTTPTransport,
|
|
33
|
+
Limits,
|
|
34
|
+
Proxy,
|
|
35
|
+
Request,
|
|
36
|
+
Response,
|
|
37
|
+
Timeout,
|
|
38
|
+
)
|
|
39
|
+
from httpx._client import UseClientDefault # type: ignore
|
|
40
|
+
from httpx._types import AuthTypes # type: ignore
|
|
41
|
+
from httpx._types import CookieTypes # type: ignore
|
|
42
|
+
from httpx._types import FileTypes # type: ignore
|
|
43
|
+
from httpx._types import HeaderTypes # type: ignore
|
|
44
|
+
from httpx._types import RequestContent # type: ignore
|
|
45
|
+
from httpx._types import RequestExtensions # type: ignore
|
|
46
|
+
from httpx._types import TimeoutTypes # type: ignore
|
|
47
|
+
from httpx_retries import Retry, RetryTransport
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class ActionRecommendation(TypedDict):
|
|
51
|
+
action: Literal["remove_duplicates", "detect_mislabels", "add_memories", "finetuning"]
|
|
52
|
+
"""
|
|
53
|
+
The recommended action to take
|
|
54
|
+
"""
|
|
55
|
+
rationale: str
|
|
56
|
+
"""
|
|
57
|
+
Explanation for why this action was recommended
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class AddMemorySuggestion(TypedDict):
|
|
62
|
+
value: str
|
|
63
|
+
label_name: str
|
|
64
|
+
similarity: NotRequired[float | None]
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class AliveResponse(TypedDict):
|
|
68
|
+
ok: bool
|
|
69
|
+
checks: dict[str, bool]
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class ApiKeyMetadata(TypedDict):
|
|
73
|
+
id: str
|
|
74
|
+
org_id: str
|
|
75
|
+
name: str
|
|
76
|
+
created_by: str | None
|
|
77
|
+
created_at: str
|
|
78
|
+
updated_at: str
|
|
79
|
+
scope: list[Literal["ADMINISTER", "PREDICT"]]
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class BaseLabelPredictionResult(TypedDict):
|
|
83
|
+
prediction_id: str | None
|
|
84
|
+
confidence: float
|
|
85
|
+
anomaly_score: float | None
|
|
86
|
+
label: int | None
|
|
87
|
+
label_name: str | None
|
|
88
|
+
logits: list[float]
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class BaseModel(TypedDict):
|
|
92
|
+
pass
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class BaseScorePredictionResult(TypedDict):
|
|
96
|
+
prediction_id: str | None
|
|
97
|
+
confidence: float
|
|
98
|
+
anomaly_score: float | None
|
|
99
|
+
score: float | None
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class CascadeEditSuggestionsRequest(TypedDict):
|
|
103
|
+
old_label: int | None
|
|
104
|
+
new_label: int
|
|
105
|
+
max_neighbors: NotRequired[int]
|
|
106
|
+
max_validation_neighbors: NotRequired[int]
|
|
107
|
+
similarity_threshold: NotRequired[float | None]
|
|
108
|
+
only_if_has_old_label: NotRequired[bool]
|
|
109
|
+
exclude_if_new_label: NotRequired[bool]
|
|
110
|
+
suggestion_cooldown_time: NotRequired[float]
|
|
111
|
+
label_confirmation_cooldown_time: NotRequired[float]
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
class ClassPattern(TypedDict):
|
|
115
|
+
label: int
|
|
116
|
+
name: str
|
|
117
|
+
description: str
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class ClassPatternsDescription(TypedDict):
|
|
121
|
+
overview: str
|
|
122
|
+
classes: list[ClassPattern]
|
|
123
|
+
summary: str
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class ClassRepresentatives(TypedDict):
|
|
127
|
+
label: int
|
|
128
|
+
label_name: str | None
|
|
129
|
+
representative_memory_ids: list[str]
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class ClassificationEvaluationRequest(TypedDict):
|
|
133
|
+
datasource_name_or_id: str
|
|
134
|
+
memoryset_override_name_or_id: NotRequired[str | None]
|
|
135
|
+
datasource_label_column: str
|
|
136
|
+
datasource_value_column: str
|
|
137
|
+
record_telemetry: NotRequired[bool]
|
|
138
|
+
telemetry_tags: NotRequired[list[str] | None]
|
|
139
|
+
subsample: NotRequired[int | float | None]
|
|
140
|
+
ignore_unlabeled: NotRequired[bool]
|
|
141
|
+
datasource_partition_column: NotRequired[str | None]
|
|
142
|
+
partition_filter_mode: NotRequired[Literal["ignore_partitions", "include_global", "exclude_global", "only_global"]]
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class CleanupResponse(TypedDict):
|
|
146
|
+
deleted_milvus_collections: list[str]
|
|
147
|
+
deleted_milvus_collections_count: int
|
|
148
|
+
deleted_blob_paths: list[str]
|
|
149
|
+
deleted_blob_paths_count: int
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class ClusterMetrics(TypedDict):
|
|
153
|
+
cluster: int
|
|
154
|
+
memory_count: int
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
ColumnType: TypeAlias = Literal["STRING", "FLOAT", "INT", "BOOL", "ENUM", "IMAGE", "OTHER"]
|
|
158
|
+
"""
|
|
159
|
+
The type of a column in a datasource
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class ConstraintViolationErrorResponse(TypedDict):
|
|
164
|
+
status_code: Literal[409]
|
|
165
|
+
constraint: str
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class CountPredictionsRequest(TypedDict):
|
|
169
|
+
model_id: NotRequired[str | None]
|
|
170
|
+
tag: NotRequired[str | None]
|
|
171
|
+
prediction_ids: NotRequired[list[str] | None]
|
|
172
|
+
start_timestamp: NotRequired[str | None]
|
|
173
|
+
end_timestamp: NotRequired[str | None]
|
|
174
|
+
memory_id: NotRequired[str | None]
|
|
175
|
+
expected_label_match: NotRequired[bool | None]
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
class CreateApiKeyRequest(TypedDict):
|
|
179
|
+
id: NotRequired[str]
|
|
180
|
+
name: NotRequired[str]
|
|
181
|
+
created_by: NotRequired[str | None]
|
|
182
|
+
scope: list[Literal["ADMINISTER", "PREDICT"]]
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class CreateApiKeyResponse(TypedDict):
|
|
186
|
+
id: str
|
|
187
|
+
org_id: str
|
|
188
|
+
name: str
|
|
189
|
+
created_by: str | None
|
|
190
|
+
created_at: str
|
|
191
|
+
updated_at: str
|
|
192
|
+
scope: list[Literal["ADMINISTER", "PREDICT"]]
|
|
193
|
+
api_key: str
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class CreateDatasourceFromContentRequest(TypedDict):
|
|
197
|
+
name: str
|
|
198
|
+
description: NotRequired[str | None]
|
|
199
|
+
content: Any
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class CreateOrgPlanRequest(TypedDict):
|
|
203
|
+
tier: Literal["FREE", "PRO", "ENTERPRISE", "CANCELLED"]
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
class DatasetFilterItem(TypedDict):
|
|
207
|
+
field: str
|
|
208
|
+
op: Literal["==", "!=", ">", ">=", "<", "<=", "in", "not in", "like"]
|
|
209
|
+
value: Any
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class DeleteMemoriesRequest(TypedDict):
|
|
213
|
+
memory_ids: list[str]
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
class DeleteMemorysetsRequest(TypedDict):
|
|
217
|
+
memoryset_ids: list[str]
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
class EmbedRequest(TypedDict):
|
|
221
|
+
values: list[str] | list[bytes] | list[str | bytes]
|
|
222
|
+
max_seq_length: NotRequired[int | None]
|
|
223
|
+
prompt: NotRequired[str | None]
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
class EmbeddingEvaluationRequest(TypedDict):
|
|
227
|
+
datasource_name_or_id: str
|
|
228
|
+
eval_datasource_name_or_id: NotRequired[str | None]
|
|
229
|
+
subsample: NotRequired[int | float | None]
|
|
230
|
+
datasource_value_column: NotRequired[str]
|
|
231
|
+
datasource_label_column: NotRequired[str | None]
|
|
232
|
+
datasource_score_column: NotRequired[str | None]
|
|
233
|
+
neighbor_count: NotRequired[int]
|
|
234
|
+
batch_size: NotRequired[int]
|
|
235
|
+
weigh_memories: NotRequired[bool]
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
EmbeddingFinetuningMethod: TypeAlias = Literal["classification", "regression", "batch_triplet_loss"]
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
class FeedbackMetrics(TypedDict):
|
|
242
|
+
avg: float | None
|
|
243
|
+
count: int
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
FeedbackType: TypeAlias = Literal["CONTINUOUS", "BINARY"]
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
class FilterItem(TypedDict):
|
|
250
|
+
field: (
|
|
251
|
+
tuple[
|
|
252
|
+
Literal[
|
|
253
|
+
"memory_id",
|
|
254
|
+
"value",
|
|
255
|
+
"label",
|
|
256
|
+
"metadata",
|
|
257
|
+
"source_id",
|
|
258
|
+
"partition_id",
|
|
259
|
+
"created_at",
|
|
260
|
+
"updated_at",
|
|
261
|
+
"edited_at",
|
|
262
|
+
"metrics",
|
|
263
|
+
"score",
|
|
264
|
+
"labels",
|
|
265
|
+
]
|
|
266
|
+
]
|
|
267
|
+
| tuple[Literal["metadata"], str]
|
|
268
|
+
| tuple[
|
|
269
|
+
Literal["metrics"],
|
|
270
|
+
Literal[
|
|
271
|
+
"cluster",
|
|
272
|
+
"embedding_2d",
|
|
273
|
+
"is_duplicate",
|
|
274
|
+
"duplicate_memory_ids",
|
|
275
|
+
"has_potential_duplicates",
|
|
276
|
+
"potential_duplicate_memory_ids",
|
|
277
|
+
"anomaly_score",
|
|
278
|
+
"neighbor_label_logits",
|
|
279
|
+
"neighbor_predicted_label",
|
|
280
|
+
"neighbor_predicted_label_ambiguity",
|
|
281
|
+
"neighbor_predicted_label_confidence",
|
|
282
|
+
"current_label_neighbor_confidence",
|
|
283
|
+
"normalized_neighbor_label_entropy",
|
|
284
|
+
"neighbor_predicted_label_matches_current_label",
|
|
285
|
+
"spread",
|
|
286
|
+
"uniformity",
|
|
287
|
+
"concept_id",
|
|
288
|
+
"subconcept_id",
|
|
289
|
+
],
|
|
290
|
+
]
|
|
291
|
+
)
|
|
292
|
+
op: Literal["==", "!=", ">", ">=", "<", "<=", "in", "not in", "like", "contains all", "contains any"]
|
|
293
|
+
value: str | int | float | bool | list[str | None] | list[int] | list[float] | list[bool] | None
|
|
294
|
+
transform: NotRequired[Literal["length"]]
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
class GetDatasourceRowCountRequest(TypedDict):
|
|
298
|
+
filters: NotRequired[list[DatasetFilterItem]]
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
class GetDatasourceRowsRequest(TypedDict):
|
|
302
|
+
filters: NotRequired[list[DatasetFilterItem]]
|
|
303
|
+
limit: NotRequired[int]
|
|
304
|
+
offset: NotRequired[int]
|
|
305
|
+
shuffle: NotRequired[bool]
|
|
306
|
+
shuffle_seed: NotRequired[int | None]
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
class GetMemoriesRequest(TypedDict):
|
|
310
|
+
memory_ids: list[str]
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
class HealthyResponse(TypedDict):
|
|
314
|
+
ok: bool
|
|
315
|
+
checks: dict[str, bool]
|
|
316
|
+
durations: dict[str, int]
|
|
317
|
+
draining: bool
|
|
318
|
+
config: dict[str, str | float | int | bool | None]
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
class InternalServerErrorResponse(TypedDict):
|
|
322
|
+
status_code: Literal[500]
|
|
323
|
+
message: str
|
|
324
|
+
request_id: str
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
JobStatus: TypeAlias = Literal[
|
|
328
|
+
"INITIALIZED", "DISPATCHED", "WAITING", "PROCESSING", "COMPLETED", "FAILED", "ABORTING", "ABORTED"
|
|
329
|
+
]
|
|
330
|
+
"""
|
|
331
|
+
Status of job in the job queue
|
|
332
|
+
"""
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
class JobStatusInfo(TypedDict):
|
|
336
|
+
status: JobStatus
|
|
337
|
+
steps_total: int | None
|
|
338
|
+
steps_completed: int | None
|
|
339
|
+
exception: str | None
|
|
340
|
+
updated_at: str
|
|
341
|
+
created_at: str
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
class LabelClassMetrics(TypedDict):
|
|
345
|
+
label: int | None
|
|
346
|
+
label_name: NotRequired[str | None]
|
|
347
|
+
average_lookup_score: float | None
|
|
348
|
+
memory_count: int
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
class LabelPercentage(TypedDict):
|
|
352
|
+
label: int | None
|
|
353
|
+
percentage: float
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
class LabeledExample(TypedDict):
|
|
357
|
+
text: str
|
|
358
|
+
label_name: str
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
class LabeledMemoryInsert(TypedDict):
|
|
362
|
+
memory_id: NotRequired[str | None]
|
|
363
|
+
value: str | bytes
|
|
364
|
+
metadata: NotRequired[dict[str, str | int | float | bool | None]]
|
|
365
|
+
source_id: NotRequired[str | None]
|
|
366
|
+
partition_id: NotRequired[str | None]
|
|
367
|
+
label: int | None
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
class ListMemoriesRequest(TypedDict):
|
|
371
|
+
offset: NotRequired[int]
|
|
372
|
+
limit: NotRequired[int]
|
|
373
|
+
filters: NotRequired[list[FilterItem]]
|
|
374
|
+
partition_id: NotRequired[str | None]
|
|
375
|
+
partition_filter_mode: NotRequired[Literal["ignore_partitions", "include_global", "exclude_global", "only_global"]]
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
class LookupRequest(TypedDict):
|
|
379
|
+
query: list[str]
|
|
380
|
+
count: NotRequired[int]
|
|
381
|
+
prompt: NotRequired[str | None]
|
|
382
|
+
partition_id: NotRequired[str | list[str | None] | None]
|
|
383
|
+
partition_filter_mode: NotRequired[Literal["ignore_partitions", "include_global", "exclude_global", "only_global"]]
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
class LookupScoreMetrics(TypedDict):
|
|
387
|
+
median: float
|
|
388
|
+
std: float
|
|
389
|
+
quantiles: list[float]
|
|
390
|
+
quantile_values: list[float]
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
class MemoryMetrics(TypedDict):
|
|
394
|
+
is_duplicate: NotRequired[bool]
|
|
395
|
+
duplicate_memory_ids: NotRequired[list[str]]
|
|
396
|
+
has_potential_duplicates: NotRequired[bool]
|
|
397
|
+
potential_duplicate_memory_ids: NotRequired[list[str] | None]
|
|
398
|
+
cluster: NotRequired[int]
|
|
399
|
+
embedding_2d: NotRequired[tuple[float, float]]
|
|
400
|
+
anomaly_score: NotRequired[float]
|
|
401
|
+
neighbor_label_logits: NotRequired[list[float] | None]
|
|
402
|
+
neighbor_predicted_label: NotRequired[int | None]
|
|
403
|
+
neighbor_predicted_label_ambiguity: NotRequired[float]
|
|
404
|
+
neighbor_predicted_label_confidence: NotRequired[float]
|
|
405
|
+
current_label_neighbor_confidence: NotRequired[float]
|
|
406
|
+
normalized_neighbor_label_entropy: NotRequired[float]
|
|
407
|
+
neighbor_predicted_label_matches_current_label: NotRequired[bool | None]
|
|
408
|
+
spread: NotRequired[float]
|
|
409
|
+
uniformity: NotRequired[float]
|
|
410
|
+
concept_id: NotRequired[int | None]
|
|
411
|
+
subconcept_id: NotRequired[int | None]
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
MemoryType: TypeAlias = Literal["LABELED", "SCORED"]
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
class MemorysetClassPatternsAnalysisConfig(TypedDict):
|
|
418
|
+
representatives_per_class: NotRequired[int]
|
|
419
|
+
enable_patterns_description: NotRequired[bool]
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
class MemorysetClassPatternsMetrics(TypedDict):
|
|
423
|
+
class_representatives: list[ClassRepresentatives]
|
|
424
|
+
patterns_description: NotRequired[ClassPatternsDescription | None]
|
|
425
|
+
mean_spread: float
|
|
426
|
+
variance_spread: float
|
|
427
|
+
mean_uniformity: float
|
|
428
|
+
variance_uniformity: float
|
|
429
|
+
updated_at: str
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
class MemorysetClusterAnalysisConfig(TypedDict):
|
|
433
|
+
min_cluster_size: NotRequired[int | None]
|
|
434
|
+
max_cluster_size: NotRequired[int | None]
|
|
435
|
+
partitioning_method: NotRequired[Literal["ng", "rb", "cpm"]]
|
|
436
|
+
resolution: NotRequired[float | None]
|
|
437
|
+
num_iterations: NotRequired[int]
|
|
438
|
+
random_state: NotRequired[int | None]
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
class MemorysetClusterMetrics(TypedDict):
|
|
442
|
+
cluster_metrics: list[ClusterMetrics]
|
|
443
|
+
num_outliers: int
|
|
444
|
+
num_clusters: int
|
|
445
|
+
updated_at: str
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
class MemorysetConceptAnalysisConfig(TypedDict):
|
|
449
|
+
high_level_description: NotRequired[str | None]
|
|
450
|
+
max_sample_rows: NotRequired[int]
|
|
451
|
+
min_lookup_count: NotRequired[int]
|
|
452
|
+
max_lookup_count: NotRequired[int]
|
|
453
|
+
overlap_decay_tau: NotRequired[float]
|
|
454
|
+
target_lcc_fraction: NotRequired[float]
|
|
455
|
+
min_cluster_count: NotRequired[int]
|
|
456
|
+
max_cluster_count: NotRequired[int]
|
|
457
|
+
max_trial_count: NotRequired[int]
|
|
458
|
+
resolution: NotRequired[float]
|
|
459
|
+
iterations: NotRequired[int]
|
|
460
|
+
use_generative_naming: NotRequired[bool]
|
|
461
|
+
naming_examples_count: NotRequired[int]
|
|
462
|
+
naming_counterexample_count: NotRequired[int]
|
|
463
|
+
primary_label_pct_threshold: NotRequired[float]
|
|
464
|
+
seed: NotRequired[int]
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
class MemorysetDistributionAnalysisConfig(TypedDict):
|
|
468
|
+
neighbor_counts: NotRequired[list[int]]
|
|
469
|
+
quantiles: NotRequired[list[float]]
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
class MemorysetDistributionMetrics(TypedDict):
|
|
473
|
+
lookup_score_metrics: dict[str, LookupScoreMetrics]
|
|
474
|
+
updated_at: str
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
class MemorysetDuplicateAnalysisConfig(TypedDict):
|
|
478
|
+
potential_duplicate_threshold: NotRequired[float]
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
class MemorysetDuplicateMetrics(TypedDict):
|
|
482
|
+
num_duplicates: int
|
|
483
|
+
num_potential_duplicates: int
|
|
484
|
+
updated_at: str
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
class MemorysetLabelAnalysisConfig(TypedDict):
|
|
488
|
+
normalize_logits: NotRequired[bool]
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
class MemorysetLabelMetrics(TypedDict):
|
|
492
|
+
label_metrics: list[LabelClassMetrics]
|
|
493
|
+
neighbor_prediction_accuracy: float
|
|
494
|
+
mean_neighbor_label_confidence: float
|
|
495
|
+
mean_neighbor_label_entropy: float
|
|
496
|
+
mean_neighbor_predicted_label_ambiguity: float
|
|
497
|
+
num_no_labeled_neighbors: int
|
|
498
|
+
num_potential_mislabels: int
|
|
499
|
+
updated_at: str
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
class MemorysetProjectionAnalysisConfig(TypedDict):
|
|
503
|
+
min_dist: NotRequired[float]
|
|
504
|
+
spread: NotRequired[float]
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
class MemorysetProjectionMetrics(TypedDict):
|
|
508
|
+
updated_at: str
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class MemorysetUpdate(TypedDict):
|
|
512
|
+
label_names: NotRequired[list[str]]
|
|
513
|
+
description: NotRequired[str | None]
|
|
514
|
+
name: NotRequired[str]
|
|
515
|
+
notes: NotRequired[str | None]
|
|
516
|
+
hidden: NotRequired[bool]
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
class NotFoundErrorResponse(TypedDict):
|
|
520
|
+
status_code: Literal[404]
|
|
521
|
+
resource: (
|
|
522
|
+
Literal[
|
|
523
|
+
"org",
|
|
524
|
+
"api_key",
|
|
525
|
+
"datasource",
|
|
526
|
+
"memoryset",
|
|
527
|
+
"classification_model",
|
|
528
|
+
"regression_model",
|
|
529
|
+
"prediction",
|
|
530
|
+
"memory",
|
|
531
|
+
"evaluation",
|
|
532
|
+
"analysis",
|
|
533
|
+
"job",
|
|
534
|
+
"pretrained_embedding_model",
|
|
535
|
+
"finetuned_embedding_model",
|
|
536
|
+
"feedback_category",
|
|
537
|
+
"org_plan",
|
|
538
|
+
"worker",
|
|
539
|
+
]
|
|
540
|
+
| None
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
class OrgPlan(TypedDict):
|
|
545
|
+
org_id: str
|
|
546
|
+
created_at: str
|
|
547
|
+
updated_at: str
|
|
548
|
+
tier: Literal["FREE", "PRO", "ENTERPRISE", "CANCELLED"]
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
class PRCurve(TypedDict):
|
|
552
|
+
thresholds: list[float]
|
|
553
|
+
precisions: list[float]
|
|
554
|
+
recalls: list[float]
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
class PredictionFeedback(TypedDict):
|
|
558
|
+
prediction_id: str
|
|
559
|
+
category_name: str
|
|
560
|
+
value: float | bool
|
|
561
|
+
comment: str | None
|
|
562
|
+
id: str
|
|
563
|
+
org_id: str
|
|
564
|
+
category_id: str
|
|
565
|
+
category_type: FeedbackType
|
|
566
|
+
created_at: str
|
|
567
|
+
updated_at: str
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
class PredictionFeedbackCategory(TypedDict):
|
|
571
|
+
id: str
|
|
572
|
+
org_id: str
|
|
573
|
+
name: str
|
|
574
|
+
type: FeedbackType
|
|
575
|
+
created_at: str
|
|
576
|
+
updated_at: str
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
class PredictionFeedbackRequest(TypedDict):
|
|
580
|
+
prediction_id: str
|
|
581
|
+
category_name: str
|
|
582
|
+
value: NotRequired[float | bool | None]
|
|
583
|
+
"""
|
|
584
|
+
The feedback value. For updates, UNSET means keep existing value. None means delete the feedback.
|
|
585
|
+
"""
|
|
586
|
+
comment: NotRequired[str | None]
|
|
587
|
+
"""
|
|
588
|
+
Optional comment. For updates, UNSET means keep existing comment. None means remove the comment.
|
|
589
|
+
"""
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
class PredictionFeedbackResult(TypedDict):
|
|
593
|
+
prediction_ids: list[str]
|
|
594
|
+
deleted_feedback_ids: list[str]
|
|
595
|
+
updated_feedback_ids: list[str]
|
|
596
|
+
inserted_feedback_ids: list[str]
|
|
597
|
+
new_category_ids: list[str]
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
PredictionSort: TypeAlias = list[tuple[Literal["timestamp", "confidence", "anomaly_score"], Literal["asc", "desc"]]]
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
class PredictiveModelUpdate(TypedDict):
|
|
604
|
+
description: NotRequired[str | None]
|
|
605
|
+
notes: NotRequired[str | None]
|
|
606
|
+
locked: NotRequired[bool]
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
PretrainedEmbeddingModelName: TypeAlias = Literal[
|
|
610
|
+
"CLIP_BASE", "GTE_BASE", "CDE_SMALL", "DISTILBERT", "GTE_SMALL", "MXBAI_LARGE", "E5_LARGE", "BGE_BASE", "GIST_LARGE"
|
|
611
|
+
]
|
|
612
|
+
"""
|
|
613
|
+
Names of pretrained embedding models that are supported by OrcaCloud
|
|
614
|
+
"""
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
RACHeadType: TypeAlias = Literal["KNN", "MMOE", "FF", "BMMOE"]
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
RARHeadType: TypeAlias = Literal["MMOE", "KNN"]
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
class ROCCurve(TypedDict):
|
|
624
|
+
thresholds: list[float]
|
|
625
|
+
false_positive_rates: list[float]
|
|
626
|
+
true_positive_rates: list[float]
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
class ReadyResponse(TypedDict):
|
|
630
|
+
ok: bool
|
|
631
|
+
draining: bool
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
class RegressionEvaluationRequest(TypedDict):
|
|
635
|
+
datasource_name_or_id: str
|
|
636
|
+
memoryset_override_name_or_id: NotRequired[str | None]
|
|
637
|
+
datasource_score_column: str
|
|
638
|
+
datasource_value_column: str
|
|
639
|
+
record_telemetry: NotRequired[bool]
|
|
640
|
+
telemetry_tags: NotRequired[list[str] | None]
|
|
641
|
+
subsample: NotRequired[int | float | None]
|
|
642
|
+
ignore_unlabeled: NotRequired[bool]
|
|
643
|
+
datasource_partition_column: NotRequired[str | None]
|
|
644
|
+
partition_filter_mode: NotRequired[Literal["ignore_partitions", "include_global", "exclude_global", "only_global"]]
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
class RegressionMetrics(TypedDict):
|
|
648
|
+
coverage: float
|
|
649
|
+
mse: float
|
|
650
|
+
rmse: float
|
|
651
|
+
mae: float
|
|
652
|
+
r2: float
|
|
653
|
+
explained_variance: float
|
|
654
|
+
loss: float
|
|
655
|
+
anomaly_score_mean: NotRequired[float | None]
|
|
656
|
+
anomaly_score_median: NotRequired[float | None]
|
|
657
|
+
anomaly_score_variance: NotRequired[float | None]
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
class RegressionModelMetadata(TypedDict):
|
|
661
|
+
id: str
|
|
662
|
+
org_id: str
|
|
663
|
+
name: str
|
|
664
|
+
description: str | None
|
|
665
|
+
notes: str | None
|
|
666
|
+
version: int
|
|
667
|
+
memoryset_id: str
|
|
668
|
+
memory_lookup_count: int
|
|
669
|
+
storage_path: str
|
|
670
|
+
memoryset_collection_name: str
|
|
671
|
+
created_at: str
|
|
672
|
+
updated_at: str
|
|
673
|
+
locked: bool
|
|
674
|
+
head_type: RARHeadType
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
class RegressionPredictionRequest(TypedDict):
|
|
678
|
+
input_values: list[str] | list[bytes] | list[str | bytes]
|
|
679
|
+
expected_scores: NotRequired[list[float] | None]
|
|
680
|
+
tags: NotRequired[list[str]]
|
|
681
|
+
memoryset_override_name_or_id: NotRequired[str | None]
|
|
682
|
+
save_telemetry: NotRequired[bool]
|
|
683
|
+
save_telemetry_synchronously: NotRequired[bool]
|
|
684
|
+
prompt: NotRequired[str | None]
|
|
685
|
+
use_lookup_cache: NotRequired[bool]
|
|
686
|
+
consistency_level: NotRequired[Literal["Bounded", "Session", "Strong", "Eventual"] | None]
|
|
687
|
+
ignore_unlabeled: NotRequired[bool]
|
|
688
|
+
partition_ids: NotRequired[str | list[str | None] | None]
|
|
689
|
+
partition_filter_mode: NotRequired[Literal["ignore_partitions", "include_global", "exclude_global", "only_global"]]
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
class ScorePredictionMemoryLookup(TypedDict):
|
|
693
|
+
value: str | bytes
|
|
694
|
+
embedding: list[float]
|
|
695
|
+
source_id: str | None
|
|
696
|
+
partition_id: str | None
|
|
697
|
+
metadata: dict[str, str | int | float | bool | None]
|
|
698
|
+
memory_id: str
|
|
699
|
+
memory_version: int
|
|
700
|
+
created_at: str
|
|
701
|
+
updated_at: str
|
|
702
|
+
edited_at: str
|
|
703
|
+
metrics: MemoryMetrics
|
|
704
|
+
lookup_score: float
|
|
705
|
+
score: float | None
|
|
706
|
+
prediction_id: str
|
|
707
|
+
attention_weight: float
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
class ScorePredictionWithMemoriesAndFeedback(TypedDict):
|
|
711
|
+
prediction_id: str
|
|
712
|
+
confidence: float
|
|
713
|
+
anomaly_score: float | None
|
|
714
|
+
score: float | None
|
|
715
|
+
timestamp: str
|
|
716
|
+
input_value: str | bytes
|
|
717
|
+
input_embedding: list[float]
|
|
718
|
+
expected_score: float | None
|
|
719
|
+
memories: list[ScorePredictionMemoryLookup]
|
|
720
|
+
org_id: str
|
|
721
|
+
memoryset_id: str
|
|
722
|
+
model_id: str
|
|
723
|
+
updated_at: str
|
|
724
|
+
tags: list[str]
|
|
725
|
+
explanation: str | None
|
|
726
|
+
memory_id: str | None
|
|
727
|
+
is_in_dense_neighborhood: NotRequired[bool | None]
|
|
728
|
+
feedbacks: list[PredictionFeedback]
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
class ScoredMemory(TypedDict):
|
|
732
|
+
value: str | bytes
|
|
733
|
+
embedding: list[float]
|
|
734
|
+
source_id: str | None
|
|
735
|
+
partition_id: str | None
|
|
736
|
+
metadata: dict[str, str | int | float | bool | None]
|
|
737
|
+
memory_id: str
|
|
738
|
+
memory_version: int
|
|
739
|
+
created_at: str
|
|
740
|
+
updated_at: str
|
|
741
|
+
edited_at: str
|
|
742
|
+
metrics: MemoryMetrics
|
|
743
|
+
score: float | None
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
class ScoredMemoryInsert(TypedDict):
|
|
747
|
+
memory_id: NotRequired[str | None]
|
|
748
|
+
value: str | bytes
|
|
749
|
+
metadata: NotRequired[dict[str, str | int | float | bool | None]]
|
|
750
|
+
source_id: NotRequired[str | None]
|
|
751
|
+
partition_id: NotRequired[str | None]
|
|
752
|
+
score: float | None
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
class ScoredMemoryLookup(TypedDict):
|
|
756
|
+
value: str | bytes
|
|
757
|
+
embedding: list[float]
|
|
758
|
+
source_id: str | None
|
|
759
|
+
partition_id: str | None
|
|
760
|
+
metadata: dict[str, str | int | float | bool | None]
|
|
761
|
+
memory_id: str
|
|
762
|
+
memory_version: int
|
|
763
|
+
created_at: str
|
|
764
|
+
updated_at: str
|
|
765
|
+
edited_at: str
|
|
766
|
+
metrics: MemoryMetrics
|
|
767
|
+
lookup_score: float
|
|
768
|
+
score: float | None
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
class ScoredMemoryUpdate(TypedDict):
|
|
772
|
+
memory_id: str
|
|
773
|
+
value: NotRequired[str | bytes]
|
|
774
|
+
metadata: NotRequired[dict[str, str | int | float | bool | None] | None]
|
|
775
|
+
source_id: NotRequired[str | None]
|
|
776
|
+
partition_id: NotRequired[str | None]
|
|
777
|
+
metrics: NotRequired[MemoryMetrics | None]
|
|
778
|
+
score: NotRequired[float | None]
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
class ScoredMemoryWithFeedbackMetrics(TypedDict):
|
|
782
|
+
value: str | bytes
|
|
783
|
+
embedding: list[float]
|
|
784
|
+
source_id: str | None
|
|
785
|
+
partition_id: str | None
|
|
786
|
+
metadata: dict[str, str | int | float | bool | None]
|
|
787
|
+
memory_id: str
|
|
788
|
+
memory_version: int
|
|
789
|
+
created_at: str
|
|
790
|
+
updated_at: str
|
|
791
|
+
edited_at: str
|
|
792
|
+
metrics: MemoryMetrics
|
|
793
|
+
score: float | None
|
|
794
|
+
feedback_metrics: dict[str, FeedbackMetrics]
|
|
795
|
+
lookup_count: int
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
class ServiceUnavailableErrorResponse(TypedDict):
|
|
799
|
+
status_code: Literal[503]
|
|
800
|
+
service: str
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
class SubConceptMetrics(TypedDict):
|
|
804
|
+
id: int
|
|
805
|
+
name: str
|
|
806
|
+
description: str | None
|
|
807
|
+
primary_label: int | None
|
|
808
|
+
memory_count: int
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
TelemetryField: TypeAlias = (
|
|
812
|
+
tuple[Literal["feedback_metrics"], str, Literal["avg", "count"]] | tuple[Literal["lookup"], Literal["count"]]
|
|
813
|
+
)
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
class TelemetryFilterItem(TypedDict):
|
|
817
|
+
field: TelemetryField
|
|
818
|
+
op: Literal["==", "!=", ">", ">=", "<", "<=", "in", "not in"]
|
|
819
|
+
value: float | list[float] | int | list[int]
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
class TelemetrySortOptions(TypedDict):
|
|
823
|
+
field: TelemetryField
|
|
824
|
+
direction: Literal["asc", "desc"]
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
class UnauthenticatedErrorResponse(TypedDict):
|
|
828
|
+
status_code: Literal[401]
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
class UnauthorizedErrorResponse(TypedDict):
|
|
832
|
+
status_code: Literal[403]
|
|
833
|
+
reason: str
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
class UpdateOrgPlanRequest(TypedDict):
|
|
837
|
+
tier: Literal["FREE", "PRO", "ENTERPRISE", "CANCELLED"]
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
class UpdatePredictionRequest(TypedDict):
|
|
841
|
+
expected_label: NotRequired[int | None]
|
|
842
|
+
expected_score: NotRequired[float | None]
|
|
843
|
+
tags: NotRequired[list[str]]
|
|
844
|
+
memory_id: NotRequired[str | None]
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
class ValidationError(TypedDict):
|
|
848
|
+
loc: list[str | int]
|
|
849
|
+
msg: str
|
|
850
|
+
type: str
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
WorkerStatus: TypeAlias = Literal["IDLE", "BUSY", "DRAINING", "SHUTDOWN", "CRASHED"]
|
|
854
|
+
"""
|
|
855
|
+
Status of worker in the worker pool
|
|
856
|
+
"""
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
class GetTestErrorByStatusCodeParams(TypedDict):
|
|
860
|
+
status_code: int | Literal["error", "warning"]
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
class DeleteAuthApiKeyByNameOrIdParams(TypedDict):
|
|
864
|
+
name_or_id: str
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
class GetMemorysetParams(TypedDict):
|
|
868
|
+
type: NotRequired[MemoryType | None]
|
|
869
|
+
show_hidden: NotRequired[bool | None]
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
class PostMemorysetByNameOrIdCloneParams(TypedDict):
|
|
873
|
+
name_or_id: str
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
class PatchMemorysetByNameOrIdParams(TypedDict):
|
|
877
|
+
name_or_id: str
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
class GetMemorysetByNameOrIdParams(TypedDict):
|
|
881
|
+
name_or_id: str
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
class DeleteMemorysetByNameOrIdParams(TypedDict):
|
|
885
|
+
name_or_id: str
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
class PostGpuMemorysetByNameOrIdLookupParams(TypedDict):
|
|
889
|
+
name_or_id: str
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
class GetMemorysetByNameOrIdMemoryByMemoryIdParams(TypedDict):
|
|
893
|
+
name_or_id: str
|
|
894
|
+
memory_id: str
|
|
895
|
+
"""
|
|
896
|
+
ID of the memory
|
|
897
|
+
"""
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
class DeleteMemorysetByNameOrIdMemoryByMemoryIdParams(TypedDict):
|
|
901
|
+
name_or_id: str
|
|
902
|
+
memory_id: str
|
|
903
|
+
"""
|
|
904
|
+
ID of the memory
|
|
905
|
+
"""
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
class GetMemorysetByNameOrIdPotentialDuplicateGroupsParams(TypedDict):
|
|
909
|
+
name_or_id: str
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
class PostMemorysetByNameOrIdMemoriesGetParams(TypedDict):
|
|
913
|
+
name_or_id: str
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
class PostMemorysetByNameOrIdMemoriesParams(TypedDict):
|
|
917
|
+
name_or_id: str
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
class PostMemorysetByNameOrIdMemoriesDeleteParams(TypedDict):
|
|
921
|
+
name_or_id: str
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
class PatchGpuMemorysetByNameOrIdMemoryParams(TypedDict):
|
|
925
|
+
name_or_id: str
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
class PostGpuMemorysetByNameOrIdMemoryParams(TypedDict):
|
|
929
|
+
name_or_id: str
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
PostGpuMemorysetByNameOrIdMemoryRequest: TypeAlias = list[LabeledMemoryInsert] | list[ScoredMemoryInsert]
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
class PatchGpuMemorysetByNameOrIdMemoriesParams(TypedDict):
|
|
936
|
+
name_or_id: str
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
class PostMemorysetByNameOrIdAnalysisParams(TypedDict):
|
|
940
|
+
name_or_id: str
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
class GetMemorysetByNameOrIdAnalysisParams(TypedDict):
|
|
944
|
+
name_or_id: str
|
|
945
|
+
status: NotRequired[JobStatus | None]
|
|
946
|
+
limit: NotRequired[int | None]
|
|
947
|
+
offset: NotRequired[int | None]
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
class GetMemorysetByNameOrIdAnalysisByAnalysisJobIdParams(TypedDict):
|
|
951
|
+
name_or_id: str
|
|
952
|
+
analysis_job_id: str
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
class PostMemorysetByNameOrIdMemoryByMemoryIdCascadingEditsParams(TypedDict):
|
|
956
|
+
name_or_id: str
|
|
957
|
+
memory_id: str
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
class GetFinetunedEmbeddingModelByNameOrIdParams(TypedDict):
|
|
961
|
+
name_or_id: str
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
class DeleteFinetunedEmbeddingModelByNameOrIdParams(TypedDict):
|
|
965
|
+
name_or_id: str
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
class PostGpuFinetunedEmbeddingModelByNameOrIdEmbeddingParams(TypedDict):
|
|
969
|
+
name_or_id: str
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
class GetPretrainedEmbeddingModelByModelNameParams(TypedDict):
|
|
973
|
+
model_name: PretrainedEmbeddingModelName
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
class PostGpuPretrainedEmbeddingModelByModelNameEmbeddingParams(TypedDict):
|
|
977
|
+
model_name: PretrainedEmbeddingModelName
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
class PostFinetunedEmbeddingModelByNameOrIdEvaluationParams(TypedDict):
|
|
981
|
+
name_or_id: str
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
class PostPretrainedEmbeddingModelByModelNameEvaluationParams(TypedDict):
|
|
985
|
+
model_name: PretrainedEmbeddingModelName
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
class GetFinetunedEmbeddingModelByNameOrIdEvaluationByJobIdParams(TypedDict):
|
|
989
|
+
name_or_id: str
|
|
990
|
+
job_id: str
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
class GetPretrainedEmbeddingModelByModelNameEvaluationByJobIdParams(TypedDict):
|
|
994
|
+
model_name: PretrainedEmbeddingModelName
|
|
995
|
+
job_id: str
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
class GetFinetunedEmbeddingModelByNameOrIdEvaluationsParams(TypedDict):
|
|
999
|
+
name_or_id: str
|
|
1000
|
+
datasource: NotRequired[str | None]
|
|
1001
|
+
value_column: NotRequired[str | None]
|
|
1002
|
+
label_column: NotRequired[str | None]
|
|
1003
|
+
score_column: NotRequired[str | None]
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
class GetPretrainedEmbeddingModelByModelNameEvaluationsParams(TypedDict):
|
|
1007
|
+
model_name: PretrainedEmbeddingModelName
|
|
1008
|
+
datasource: NotRequired[str | None]
|
|
1009
|
+
value_column: NotRequired[str | None]
|
|
1010
|
+
label_column: NotRequired[str | None]
|
|
1011
|
+
score_column: NotRequired[str | None]
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
class PostDatasourceUploadRequest(TypedDict):
|
|
1015
|
+
name: str
|
|
1016
|
+
"""
|
|
1017
|
+
Name for the datasource
|
|
1018
|
+
"""
|
|
1019
|
+
description: NotRequired[str | None]
|
|
1020
|
+
"""
|
|
1021
|
+
Optional description for the datasource
|
|
1022
|
+
"""
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
class GetDatasourceByNameOrIdParams(TypedDict):
|
|
1026
|
+
name_or_id: str
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
class DeleteDatasourceByNameOrIdParams(TypedDict):
|
|
1030
|
+
name_or_id: str
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
class PostDatasourceByNameOrIdRowsParams(TypedDict):
|
|
1034
|
+
name_or_id: str
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
class PostDatasourceByNameOrIdRowsCountParams(TypedDict):
|
|
1038
|
+
name_or_id: str
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
class GetDatasourceByNameOrIdEmbeddingModelEvaluationsParams(TypedDict):
|
|
1042
|
+
name_or_id: str
|
|
1043
|
+
value_column: NotRequired[str | None]
|
|
1044
|
+
label_column: NotRequired[str | None]
|
|
1045
|
+
score_column: NotRequired[str | None]
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
class GetDatasourceByNameOrIdDownloadParams(TypedDict):
|
|
1049
|
+
name_or_id: str
|
|
1050
|
+
file_type: NotRequired[Literal["hf_dataset", "json", "csv"]]
|
|
1051
|
+
"""
|
|
1052
|
+
File type to download:
|
|
1053
|
+
* `hf_dataset`: Zipped HuggingFace dataset (default)
|
|
1054
|
+
* `json`: Row-oriented JSON array
|
|
1055
|
+
* `csv`: CSV file
|
|
1056
|
+
"""
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
class PatchClassificationModelByNameOrIdParams(TypedDict):
|
|
1060
|
+
name_or_id: str
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
class GetClassificationModelByNameOrIdParams(TypedDict):
|
|
1064
|
+
name_or_id: str
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
class DeleteClassificationModelByNameOrIdParams(TypedDict):
|
|
1068
|
+
name_or_id: str
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
class PatchRegressionModelByNameOrIdParams(TypedDict):
|
|
1072
|
+
name_or_id: str
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
class GetRegressionModelByNameOrIdParams(TypedDict):
|
|
1076
|
+
name_or_id: str
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
class DeleteRegressionModelByNameOrIdParams(TypedDict):
|
|
1080
|
+
name_or_id: str
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
class PostGpuClassificationModelByNameOrIdPredictionParams(TypedDict):
|
|
1084
|
+
name_or_id: str
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
class PostClassificationModelByNameOrIdPredictionParams(TypedDict):
|
|
1088
|
+
name_or_id: str
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
class PostGpuRegressionModelByNameOrIdPredictionParams(TypedDict):
|
|
1092
|
+
name_or_id: str
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
class PostRegressionModelByNameOrIdPredictionParams(TypedDict):
|
|
1096
|
+
name_or_id: str
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
class PostClassificationModelByModelNameOrIdEvaluationParams(TypedDict):
|
|
1100
|
+
model_name_or_id: str
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
class GetClassificationModelByModelNameOrIdEvaluationParams(TypedDict):
|
|
1104
|
+
model_name_or_id: str
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
class PostRegressionModelByModelNameOrIdEvaluationParams(TypedDict):
|
|
1108
|
+
model_name_or_id: str
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
class GetRegressionModelByModelNameOrIdEvaluationParams(TypedDict):
|
|
1112
|
+
model_name_or_id: str
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
class GetClassificationModelByModelNameOrIdEvaluationByJobIdParams(TypedDict):
|
|
1116
|
+
model_name_or_id: str
|
|
1117
|
+
job_id: str
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
class DeleteClassificationModelByModelNameOrIdEvaluationByJobIdParams(TypedDict):
|
|
1121
|
+
model_name_or_id: str
|
|
1122
|
+
job_id: str
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
class GetRegressionModelByModelNameOrIdEvaluationByJobIdParams(TypedDict):
|
|
1126
|
+
model_name_or_id: str
|
|
1127
|
+
job_id: str
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
class DeleteRegressionModelByModelNameOrIdEvaluationByJobIdParams(TypedDict):
|
|
1131
|
+
model_name_or_id: str
|
|
1132
|
+
job_id: str
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
class GetJobByJobIdParams(TypedDict):
|
|
1136
|
+
job_id: str
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
class GetJobByJobIdStatusParams(TypedDict):
|
|
1140
|
+
job_id: str
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
class GetJobParams(TypedDict):
|
|
1144
|
+
status: NotRequired[JobStatus | list[JobStatus] | None]
|
|
1145
|
+
type: NotRequired[str | list[str] | None]
|
|
1146
|
+
limit: NotRequired[int | None]
|
|
1147
|
+
offset: NotRequired[int]
|
|
1148
|
+
start_timestamp: NotRequired[str | None]
|
|
1149
|
+
end_timestamp: NotRequired[str | None]
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
class DeleteJobByJobIdAbortParams(TypedDict):
|
|
1153
|
+
job_id: str
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
class GetWorkerParams(TypedDict):
|
|
1157
|
+
status: NotRequired[WorkerStatus | list[WorkerStatus] | None]
|
|
1158
|
+
limit: NotRequired[int | None]
|
|
1159
|
+
offset: NotRequired[int]
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
class GetWorkerByWorkerIdParams(TypedDict):
|
|
1163
|
+
worker_id: str
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
class GetTelemetryPredictionByPredictionIdParams(TypedDict):
|
|
1167
|
+
prediction_id: str
|
|
1168
|
+
calc_neighborhood_density: NotRequired[bool]
|
|
1169
|
+
"""
|
|
1170
|
+
Calculate neighborhood density
|
|
1171
|
+
"""
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
class PatchTelemetryPredictionByPredictionIdParams(TypedDict):
|
|
1175
|
+
prediction_id: str
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
class GetTelemetryPredictionByPredictionIdExplanationParams(TypedDict):
|
|
1179
|
+
prediction_id: str
|
|
1180
|
+
refresh: NotRequired[bool]
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
class GetTelemetryPredictionByPredictionIdActionParams(TypedDict):
|
|
1184
|
+
prediction_id: str
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
class GetTelemetryPredictionByPredictionIdMemorySuggestionsParams(TypedDict):
|
|
1188
|
+
prediction_id: str
|
|
1189
|
+
"""
|
|
1190
|
+
ID of the prediction to generate suggestions for
|
|
1191
|
+
"""
|
|
1192
|
+
num_memories: NotRequired[int]
|
|
1193
|
+
"""
|
|
1194
|
+
Number of memory suggestions to generate
|
|
1195
|
+
"""
|
|
1196
|
+
refresh: NotRequired[bool]
|
|
1197
|
+
"""
|
|
1198
|
+
Force the explanation agent to re-run even if a cached explanation exists
|
|
1199
|
+
"""
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
class GetTelemetryFeedbackCategoryByNameOrIdParams(TypedDict):
|
|
1203
|
+
name_or_id: str
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
class DeleteTelemetryFeedbackCategoryByNameOrIdParams(TypedDict):
|
|
1207
|
+
name_or_id: str
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
PutTelemetryPredictionFeedbackRequest: TypeAlias = list[PredictionFeedbackRequest]
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
class GetAgentsBootstrapClassificationModelByJobIdParams(TypedDict):
|
|
1214
|
+
job_id: str
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
class FieldValidationError(TypedDict):
|
|
1218
|
+
loc: list[str | int]
|
|
1219
|
+
msg: str
|
|
1220
|
+
type: NotRequired[str]
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
class AddMemoryRecommendations(TypedDict):
|
|
1224
|
+
memories: list[AddMemorySuggestion]
|
|
1225
|
+
attempts_used: NotRequired[int]
|
|
1226
|
+
partial: NotRequired[bool]
|
|
1227
|
+
rejection_counts: NotRequired[dict[str, int]]
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
class BootstrapClassificationModelRequest(TypedDict):
|
|
1231
|
+
model_description: str
|
|
1232
|
+
label_names: list[str]
|
|
1233
|
+
initial_examples: NotRequired[list[LabeledExample]]
|
|
1234
|
+
num_examples_per_label: NotRequired[int]
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
class BootstrapLabeledMemoryDataInput(TypedDict):
|
|
1238
|
+
model_description: str
|
|
1239
|
+
label_names: list[str]
|
|
1240
|
+
initial_examples: NotRequired[list[LabeledExample]]
|
|
1241
|
+
num_examples_per_label: NotRequired[int]
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
class BootstrapLabeledMemoryDataResult(TypedDict):
|
|
1245
|
+
model_description: str
|
|
1246
|
+
label_names: list[str]
|
|
1247
|
+
model_name: str
|
|
1248
|
+
generated_examples: NotRequired[list[LabeledExample]]
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
class ClassificationMetrics(TypedDict):
|
|
1252
|
+
coverage: float
|
|
1253
|
+
f1_score: float
|
|
1254
|
+
accuracy: float
|
|
1255
|
+
loss: float | None
|
|
1256
|
+
anomaly_score_mean: NotRequired[float | None]
|
|
1257
|
+
anomaly_score_median: NotRequired[float | None]
|
|
1258
|
+
anomaly_score_variance: NotRequired[float | None]
|
|
1259
|
+
roc_auc: NotRequired[float | None]
|
|
1260
|
+
pr_auc: NotRequired[float | None]
|
|
1261
|
+
pr_curve: NotRequired[PRCurve | None]
|
|
1262
|
+
roc_curve: NotRequired[ROCCurve | None]
|
|
1263
|
+
confusion_matrix: NotRequired[list[list[int]] | None]
|
|
1264
|
+
warnings: NotRequired[list[str]]
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
class ClassificationModelMetadata(TypedDict):
|
|
1268
|
+
id: str
|
|
1269
|
+
org_id: str
|
|
1270
|
+
name: str
|
|
1271
|
+
description: str | None
|
|
1272
|
+
notes: str | None
|
|
1273
|
+
version: int
|
|
1274
|
+
memoryset_id: str
|
|
1275
|
+
memory_lookup_count: int
|
|
1276
|
+
storage_path: str
|
|
1277
|
+
memoryset_collection_name: str
|
|
1278
|
+
created_at: str
|
|
1279
|
+
updated_at: str
|
|
1280
|
+
locked: bool
|
|
1281
|
+
num_classes: int
|
|
1282
|
+
head_type: RACHeadType
|
|
1283
|
+
weigh_memories: bool | None
|
|
1284
|
+
min_memory_weight: float | None
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
class ClassificationPredictionRequest(TypedDict):
|
|
1288
|
+
input_values: list[str] | list[bytes] | list[str | bytes]
|
|
1289
|
+
expected_labels: NotRequired[list[int] | None]
|
|
1290
|
+
filters: NotRequired[list[FilterItem]]
|
|
1291
|
+
tags: NotRequired[list[str]]
|
|
1292
|
+
memoryset_override_name_or_id: NotRequired[str | None]
|
|
1293
|
+
save_telemetry: NotRequired[bool]
|
|
1294
|
+
save_telemetry_synchronously: NotRequired[bool]
|
|
1295
|
+
prompt: NotRequired[str | None]
|
|
1296
|
+
use_lookup_cache: NotRequired[bool]
|
|
1297
|
+
consistency_level: NotRequired[Literal["Bounded", "Session", "Strong", "Eventual"] | None]
|
|
1298
|
+
ignore_unlabeled: NotRequired[bool]
|
|
1299
|
+
partition_ids: NotRequired[str | list[str | None] | None]
|
|
1300
|
+
partition_filter_mode: NotRequired[Literal["ignore_partitions", "include_global", "exclude_global", "only_global"]]
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
class CloneMemorysetRequest(TypedDict):
|
|
1304
|
+
name: str
|
|
1305
|
+
description: NotRequired[str | None]
|
|
1306
|
+
notes: NotRequired[str | None]
|
|
1307
|
+
pretrained_embedding_model_name: NotRequired[PretrainedEmbeddingModelName | None]
|
|
1308
|
+
finetuned_embedding_model_name_or_id: NotRequired[str | None]
|
|
1309
|
+
max_seq_length_override: NotRequired[int | None]
|
|
1310
|
+
prompt: NotRequired[str]
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
class ColumnInfo(TypedDict):
|
|
1314
|
+
name: str
|
|
1315
|
+
type: ColumnType
|
|
1316
|
+
enum_options: NotRequired[list[str] | None]
|
|
1317
|
+
string_values: NotRequired[list[str] | None]
|
|
1318
|
+
int_values: NotRequired[list[int] | None]
|
|
1319
|
+
contains_nones: NotRequired[bool]
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
class ConceptMetrics(TypedDict):
|
|
1323
|
+
id: int
|
|
1324
|
+
name: str
|
|
1325
|
+
description: str | None
|
|
1326
|
+
primary_label: int | None
|
|
1327
|
+
memory_count: int
|
|
1328
|
+
subconcepts: list[SubConceptMetrics]
|
|
1329
|
+
label_percentages: list[LabelPercentage]
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
class CreateClassificationModelRequest(TypedDict):
|
|
1333
|
+
name: str
|
|
1334
|
+
description: NotRequired[str | None]
|
|
1335
|
+
notes: NotRequired[str | None]
|
|
1336
|
+
memoryset_name: NotRequired[str | None]
|
|
1337
|
+
memoryset_name_or_id: str
|
|
1338
|
+
memory_lookup_count: NotRequired[int | None]
|
|
1339
|
+
head_type: NotRequired[RACHeadType]
|
|
1340
|
+
weigh_memories: NotRequired[bool | None]
|
|
1341
|
+
min_memory_weight: NotRequired[float | None]
|
|
1342
|
+
num_classes: NotRequired[int | None]
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
class CreateMemorysetFromDatasourceRequest(TypedDict):
|
|
1346
|
+
name: str
|
|
1347
|
+
description: NotRequired[str | None]
|
|
1348
|
+
notes: NotRequired[str | None]
|
|
1349
|
+
pretrained_embedding_model_name: NotRequired[PretrainedEmbeddingModelName | None]
|
|
1350
|
+
finetuned_embedding_model_name_or_id: NotRequired[str | None]
|
|
1351
|
+
max_seq_length_override: NotRequired[int | None]
|
|
1352
|
+
label_names: NotRequired[list[str] | None]
|
|
1353
|
+
index_type: NotRequired[Literal["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ", "HNSW", "DISKANN"]]
|
|
1354
|
+
index_params: NotRequired[dict[str, int | float | str]]
|
|
1355
|
+
prompt: NotRequired[str]
|
|
1356
|
+
hidden: NotRequired[bool]
|
|
1357
|
+
memory_type: NotRequired[MemoryType | None]
|
|
1358
|
+
datasource_name_or_id: str
|
|
1359
|
+
datasource_label_column: NotRequired[str | None]
|
|
1360
|
+
datasource_score_column: NotRequired[str | None]
|
|
1361
|
+
datasource_value_column: str
|
|
1362
|
+
datasource_source_id_column: NotRequired[str | None]
|
|
1363
|
+
datasource_partition_id_column: NotRequired[str | None]
|
|
1364
|
+
remove_duplicates: NotRequired[bool]
|
|
1365
|
+
batch_size: NotRequired[int]
|
|
1366
|
+
subsample: NotRequired[int | float | None]
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
class CreateMemorysetRequest(TypedDict):
|
|
1370
|
+
name: str
|
|
1371
|
+
description: NotRequired[str | None]
|
|
1372
|
+
notes: NotRequired[str | None]
|
|
1373
|
+
pretrained_embedding_model_name: NotRequired[PretrainedEmbeddingModelName | None]
|
|
1374
|
+
finetuned_embedding_model_name_or_id: NotRequired[str | None]
|
|
1375
|
+
max_seq_length_override: NotRequired[int | None]
|
|
1376
|
+
label_names: NotRequired[list[str] | None]
|
|
1377
|
+
index_type: NotRequired[Literal["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ", "HNSW", "DISKANN"]]
|
|
1378
|
+
index_params: NotRequired[dict[str, int | float | str]]
|
|
1379
|
+
prompt: NotRequired[str]
|
|
1380
|
+
hidden: NotRequired[bool]
|
|
1381
|
+
memory_type: NotRequired[MemoryType | None]
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
class CreateRegressionModelRequest(TypedDict):
|
|
1385
|
+
name: str
|
|
1386
|
+
description: NotRequired[str | None]
|
|
1387
|
+
notes: NotRequired[str | None]
|
|
1388
|
+
memoryset_name_or_id: str
|
|
1389
|
+
memory_lookup_count: NotRequired[int | None]
|
|
1390
|
+
head_type: NotRequired[RARHeadType]
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
class DatasourceMetadata(TypedDict):
|
|
1394
|
+
id: str
|
|
1395
|
+
org_id: str
|
|
1396
|
+
name: str
|
|
1397
|
+
description: str | None
|
|
1398
|
+
storage_path: str
|
|
1399
|
+
length: int
|
|
1400
|
+
columns: list[ColumnInfo]
|
|
1401
|
+
created_at: str
|
|
1402
|
+
updated_at: str
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
class EmbeddingEvaluationResponse(TypedDict):
|
|
1406
|
+
job_id: str
|
|
1407
|
+
org_id: str
|
|
1408
|
+
finetuned_embedding_model_id: str | None
|
|
1409
|
+
pretrained_embedding_model_name: PretrainedEmbeddingModelName | None
|
|
1410
|
+
datasource_id: str
|
|
1411
|
+
subsample: int | float | None
|
|
1412
|
+
datasource_value_column: str
|
|
1413
|
+
datasource_label_column: NotRequired[str | None]
|
|
1414
|
+
datasource_score_column: NotRequired[str | None]
|
|
1415
|
+
neighbor_count: int
|
|
1416
|
+
weigh_memories: bool
|
|
1417
|
+
status: JobStatus
|
|
1418
|
+
result: ClassificationMetrics | RegressionMetrics | None
|
|
1419
|
+
created_at: str
|
|
1420
|
+
updated_at: str
|
|
1421
|
+
task_id: str
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
class EvaluationResponse(TypedDict):
|
|
1425
|
+
job_id: str
|
|
1426
|
+
org_id: str
|
|
1427
|
+
status: JobStatus
|
|
1428
|
+
result: ClassificationMetrics | RegressionMetrics | None
|
|
1429
|
+
created_at: str
|
|
1430
|
+
updated_at: str
|
|
1431
|
+
task_id: str
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
class EvaluationResponseClassificationMetrics(TypedDict):
|
|
1435
|
+
job_id: str
|
|
1436
|
+
org_id: str
|
|
1437
|
+
status: JobStatus
|
|
1438
|
+
result: ClassificationMetrics | None
|
|
1439
|
+
created_at: str
|
|
1440
|
+
updated_at: str
|
|
1441
|
+
task_id: str
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
class EvaluationResponseRegressionMetrics(TypedDict):
|
|
1445
|
+
job_id: str
|
|
1446
|
+
org_id: str
|
|
1447
|
+
status: JobStatus
|
|
1448
|
+
result: RegressionMetrics | None
|
|
1449
|
+
created_at: str
|
|
1450
|
+
updated_at: str
|
|
1451
|
+
task_id: str
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
class FinetuneEmbeddingModelRequest(TypedDict):
|
|
1455
|
+
name: str
|
|
1456
|
+
base_model: PretrainedEmbeddingModelName
|
|
1457
|
+
train_memoryset_name_or_id: NotRequired[str | None]
|
|
1458
|
+
train_datasource_name_or_id: NotRequired[str | None]
|
|
1459
|
+
eval_datasource_name_or_id: NotRequired[str | None]
|
|
1460
|
+
label_column: NotRequired[str | None]
|
|
1461
|
+
score_column: NotRequired[str | None]
|
|
1462
|
+
value_column: NotRequired[str]
|
|
1463
|
+
training_method: NotRequired[EmbeddingFinetuningMethod]
|
|
1464
|
+
training_args: NotRequired[dict[str, str | int | float | bool]]
|
|
1465
|
+
|
|
1466
|
+
|
|
1467
|
+
class FinetunedEmbeddingModelMetadata(TypedDict):
|
|
1468
|
+
embedding_dim: int
|
|
1469
|
+
max_seq_length: int
|
|
1470
|
+
uses_context: bool
|
|
1471
|
+
id: str
|
|
1472
|
+
org_id: str
|
|
1473
|
+
name: str
|
|
1474
|
+
storage_path: str
|
|
1475
|
+
created_at: str
|
|
1476
|
+
updated_at: str
|
|
1477
|
+
base_model: PretrainedEmbeddingModelName
|
|
1478
|
+
finetuning_job_id: str
|
|
1479
|
+
finetuning_status: JobStatus
|
|
1480
|
+
finetuning_task_id: str
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
class HTTPValidationError(TypedDict):
|
|
1484
|
+
detail: NotRequired[list[ValidationError]]
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
class InvalidInputErrorResponse(TypedDict):
|
|
1488
|
+
status_code: Literal[422]
|
|
1489
|
+
validation_issues: list[FieldValidationError]
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
class Job(TypedDict):
|
|
1493
|
+
status: JobStatus
|
|
1494
|
+
steps_total: int | None
|
|
1495
|
+
steps_completed: int | None
|
|
1496
|
+
exception: str | None
|
|
1497
|
+
updated_at: str
|
|
1498
|
+
created_at: str
|
|
1499
|
+
id: str
|
|
1500
|
+
org_id: str
|
|
1501
|
+
worker_id: str | None
|
|
1502
|
+
type: str
|
|
1503
|
+
payload: BaseModel
|
|
1504
|
+
result: BaseModel | None
|
|
1505
|
+
depends_on: NotRequired[list[str]]
|
|
1506
|
+
lease_token: str | None
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
class LabelPredictionMemoryLookup(TypedDict):
|
|
1510
|
+
value: str | bytes
|
|
1511
|
+
embedding: list[float]
|
|
1512
|
+
source_id: str | None
|
|
1513
|
+
partition_id: str | None
|
|
1514
|
+
metadata: dict[str, str | int | float | bool | None]
|
|
1515
|
+
memory_id: str
|
|
1516
|
+
memory_version: int
|
|
1517
|
+
created_at: str
|
|
1518
|
+
updated_at: str
|
|
1519
|
+
edited_at: str
|
|
1520
|
+
metrics: MemoryMetrics
|
|
1521
|
+
label: int | None
|
|
1522
|
+
label_name: str | None
|
|
1523
|
+
lookup_score: float
|
|
1524
|
+
prediction_id: str
|
|
1525
|
+
attention_weight: float
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
class LabelPredictionWithMemoriesAndFeedback(TypedDict):
|
|
1529
|
+
prediction_id: str
|
|
1530
|
+
confidence: float
|
|
1531
|
+
anomaly_score: float | None
|
|
1532
|
+
label: int | None
|
|
1533
|
+
label_name: str | None
|
|
1534
|
+
logits: list[float]
|
|
1535
|
+
timestamp: str
|
|
1536
|
+
input_value: str | bytes
|
|
1537
|
+
input_embedding: list[float]
|
|
1538
|
+
expected_label: int | None
|
|
1539
|
+
expected_label_name: str | None
|
|
1540
|
+
memories: list[LabelPredictionMemoryLookup]
|
|
1541
|
+
org_id: str
|
|
1542
|
+
memoryset_id: str
|
|
1543
|
+
model_id: str
|
|
1544
|
+
updated_at: str
|
|
1545
|
+
tags: list[str]
|
|
1546
|
+
explanation: str | None
|
|
1547
|
+
memory_id: str | None
|
|
1548
|
+
is_in_dense_neighborhood: NotRequired[bool | None]
|
|
1549
|
+
feedbacks: list[PredictionFeedback]
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
class LabeledMemory(TypedDict):
|
|
1553
|
+
value: str | bytes
|
|
1554
|
+
embedding: list[float]
|
|
1555
|
+
source_id: str | None
|
|
1556
|
+
partition_id: str | None
|
|
1557
|
+
metadata: dict[str, str | int | float | bool | None]
|
|
1558
|
+
memory_id: str
|
|
1559
|
+
memory_version: int
|
|
1560
|
+
created_at: str
|
|
1561
|
+
updated_at: str
|
|
1562
|
+
edited_at: str
|
|
1563
|
+
metrics: MemoryMetrics
|
|
1564
|
+
label: int | None
|
|
1565
|
+
label_name: str | None
|
|
1566
|
+
|
|
1567
|
+
|
|
1568
|
+
class LabeledMemoryLookup(TypedDict):
|
|
1569
|
+
value: str | bytes
|
|
1570
|
+
embedding: list[float]
|
|
1571
|
+
source_id: str | None
|
|
1572
|
+
partition_id: str | None
|
|
1573
|
+
metadata: dict[str, str | int | float | bool | None]
|
|
1574
|
+
memory_id: str
|
|
1575
|
+
memory_version: int
|
|
1576
|
+
created_at: str
|
|
1577
|
+
updated_at: str
|
|
1578
|
+
edited_at: str
|
|
1579
|
+
metrics: MemoryMetrics
|
|
1580
|
+
label: int | None
|
|
1581
|
+
label_name: str | None
|
|
1582
|
+
lookup_score: float
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
class LabeledMemoryUpdate(TypedDict):
|
|
1586
|
+
memory_id: str
|
|
1587
|
+
value: NotRequired[str | bytes]
|
|
1588
|
+
metadata: NotRequired[dict[str, str | int | float | bool | None] | None]
|
|
1589
|
+
source_id: NotRequired[str | None]
|
|
1590
|
+
partition_id: NotRequired[str | None]
|
|
1591
|
+
metrics: NotRequired[MemoryMetrics | None]
|
|
1592
|
+
label: NotRequired[int | None]
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
class LabeledMemoryWithFeedbackMetrics(TypedDict):
|
|
1596
|
+
value: str | bytes
|
|
1597
|
+
embedding: list[float]
|
|
1598
|
+
source_id: str | None
|
|
1599
|
+
partition_id: str | None
|
|
1600
|
+
metadata: dict[str, str | int | float | bool | None]
|
|
1601
|
+
memory_id: str
|
|
1602
|
+
memory_version: int
|
|
1603
|
+
created_at: str
|
|
1604
|
+
updated_at: str
|
|
1605
|
+
edited_at: str
|
|
1606
|
+
metrics: MemoryMetrics
|
|
1607
|
+
label: int | None
|
|
1608
|
+
label_name: str | None
|
|
1609
|
+
feedback_metrics: dict[str, FeedbackMetrics]
|
|
1610
|
+
lookup_count: int
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
class ListPredictionsRequest(TypedDict):
|
|
1614
|
+
model_id: NotRequired[str | None]
|
|
1615
|
+
tag: NotRequired[str | None]
|
|
1616
|
+
prediction_ids: NotRequired[list[str] | None]
|
|
1617
|
+
start_timestamp: NotRequired[str | None]
|
|
1618
|
+
end_timestamp: NotRequired[str | None]
|
|
1619
|
+
memory_id: NotRequired[str | None]
|
|
1620
|
+
expected_label_match: NotRequired[bool | None]
|
|
1621
|
+
limit: NotRequired[int]
|
|
1622
|
+
offset: NotRequired[int | None]
|
|
1623
|
+
sort: NotRequired[PredictionSort]
|
|
1624
|
+
|
|
1625
|
+
|
|
1626
|
+
class MemorysetAnalysisConfigs(TypedDict):
|
|
1627
|
+
distribution: NotRequired[MemorysetDistributionAnalysisConfig | None]
|
|
1628
|
+
label: NotRequired[MemorysetLabelAnalysisConfig | None]
|
|
1629
|
+
duplicate: NotRequired[MemorysetDuplicateAnalysisConfig | None]
|
|
1630
|
+
projection: NotRequired[MemorysetProjectionAnalysisConfig | None]
|
|
1631
|
+
cluster: NotRequired[MemorysetClusterAnalysisConfig | None]
|
|
1632
|
+
class_patterns: NotRequired[MemorysetClassPatternsAnalysisConfig | None]
|
|
1633
|
+
concepts: NotRequired[MemorysetConceptAnalysisConfig | None]
|
|
1634
|
+
|
|
1635
|
+
|
|
1636
|
+
class MemorysetAnalysisRequest(TypedDict):
|
|
1637
|
+
lookup_count: NotRequired[int]
|
|
1638
|
+
batch_size: NotRequired[int]
|
|
1639
|
+
clear_metrics: NotRequired[bool]
|
|
1640
|
+
configs: MemorysetAnalysisConfigs
|
|
1641
|
+
partition_filter_mode: NotRequired[Literal["ignore_partitions", "include_global", "exclude_global", "only_global"]]
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
class MemorysetConceptMetrics(TypedDict):
|
|
1645
|
+
concepts: list[ConceptMetrics]
|
|
1646
|
+
num_outliers: int
|
|
1647
|
+
updated_at: str
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
class MemorysetMetrics(TypedDict):
|
|
1651
|
+
distribution: NotRequired[MemorysetDistributionMetrics | None]
|
|
1652
|
+
label: NotRequired[MemorysetLabelMetrics | None]
|
|
1653
|
+
duplicate: NotRequired[MemorysetDuplicateMetrics | None]
|
|
1654
|
+
projection: NotRequired[MemorysetProjectionMetrics | None]
|
|
1655
|
+
cluster: NotRequired[MemorysetClusterMetrics | None]
|
|
1656
|
+
class_patterns: NotRequired[MemorysetClassPatternsMetrics | None]
|
|
1657
|
+
concepts: NotRequired[MemorysetConceptMetrics | None]
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
class PaginatedJob(TypedDict):
|
|
1661
|
+
items: list[Job]
|
|
1662
|
+
total: int
|
|
1663
|
+
offset: int
|
|
1664
|
+
limit: int
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
class PaginatedUnionLabeledMemoryWithFeedbackMetricsScoredMemoryWithFeedbackMetrics(TypedDict):
|
|
1668
|
+
items: list[LabeledMemoryWithFeedbackMetrics | ScoredMemoryWithFeedbackMetrics]
|
|
1669
|
+
total: int
|
|
1670
|
+
offset: int
|
|
1671
|
+
limit: int
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
class PretrainedEmbeddingModelMetadata(TypedDict):
|
|
1675
|
+
embedding_dim: int
|
|
1676
|
+
max_seq_length: int
|
|
1677
|
+
uses_context: bool
|
|
1678
|
+
name: PretrainedEmbeddingModelName
|
|
1679
|
+
experimental: NotRequired[bool]
|
|
1680
|
+
supports_instructions: bool
|
|
1681
|
+
num_params: int
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
class TelemetryMemoriesRequest(TypedDict):
|
|
1685
|
+
memoryset_id: str
|
|
1686
|
+
offset: NotRequired[int]
|
|
1687
|
+
limit: NotRequired[int]
|
|
1688
|
+
filters: NotRequired[list[FilterItem | TelemetryFilterItem]]
|
|
1689
|
+
sort: NotRequired[list[TelemetrySortOptions] | None]
|
|
1690
|
+
|
|
1691
|
+
|
|
1692
|
+
class WorkerInfo(TypedDict):
|
|
1693
|
+
id: str
|
|
1694
|
+
status: WorkerStatus
|
|
1695
|
+
started_at: str
|
|
1696
|
+
updated_at: str
|
|
1697
|
+
version: str | None
|
|
1698
|
+
git_sha: str
|
|
1699
|
+
config: dict[str, str | float | int | bool | dict[str, str] | None]
|
|
1700
|
+
|
|
1701
|
+
|
|
1702
|
+
PatchGpuMemorysetByNameOrIdMemoryRequest: TypeAlias = LabeledMemoryUpdate | ScoredMemoryUpdate
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
PatchGpuMemorysetByNameOrIdMemoriesRequest: TypeAlias = list[LabeledMemoryUpdate] | list[ScoredMemoryUpdate]
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
class CascadingEditSuggestion(TypedDict):
|
|
1709
|
+
neighbor: LabeledMemoryLookup
|
|
1710
|
+
suggested_label: int
|
|
1711
|
+
lookup_score: float
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
class MemorysetAnalysisResponse(TypedDict):
|
|
1715
|
+
job_id: str
|
|
1716
|
+
org_id: str
|
|
1717
|
+
memoryset_id: str
|
|
1718
|
+
status: JobStatus
|
|
1719
|
+
lookup_count: int
|
|
1720
|
+
batch_size: int
|
|
1721
|
+
clear_metrics: bool
|
|
1722
|
+
configs: MemorysetAnalysisConfigs
|
|
1723
|
+
results: MemorysetMetrics | None
|
|
1724
|
+
created_at: str
|
|
1725
|
+
updated_at: str
|
|
1726
|
+
task_id: str
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
class MemorysetMetadata(TypedDict):
|
|
1730
|
+
id: str
|
|
1731
|
+
org_id: str
|
|
1732
|
+
collection_name: str
|
|
1733
|
+
name: str
|
|
1734
|
+
description: str | None
|
|
1735
|
+
notes: str | None
|
|
1736
|
+
length: int
|
|
1737
|
+
pretrained_embedding_model_name: PretrainedEmbeddingModelName | None
|
|
1738
|
+
finetuned_embedding_model_id: str | None
|
|
1739
|
+
created_at: str
|
|
1740
|
+
updated_at: str
|
|
1741
|
+
memories_updated_at: str
|
|
1742
|
+
insertion_job_id: str | None
|
|
1743
|
+
insertion_status: JobStatus | None
|
|
1744
|
+
metrics: MemorysetMetrics
|
|
1745
|
+
memory_type: MemoryType
|
|
1746
|
+
label_names: list[str] | None
|
|
1747
|
+
index_type: Literal["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ", "HNSW", "DISKANN"]
|
|
1748
|
+
index_params: dict[str, Any]
|
|
1749
|
+
database_uri: str | None
|
|
1750
|
+
document_prompt_override: str | None
|
|
1751
|
+
query_prompt_override: str | None
|
|
1752
|
+
hidden: bool
|
|
1753
|
+
insertion_task_id: str | None
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
class PaginatedWorkerInfo(TypedDict):
|
|
1757
|
+
items: list[WorkerInfo]
|
|
1758
|
+
total: int
|
|
1759
|
+
offset: int
|
|
1760
|
+
limit: int
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
class BootstrapClassificationModelMeta(TypedDict):
|
|
1764
|
+
datasource_meta: DatasourceMetadata
|
|
1765
|
+
memoryset_meta: MemorysetMetadata
|
|
1766
|
+
model_meta: ClassificationModelMetadata
|
|
1767
|
+
agent_output: BootstrapLabeledMemoryDataResult
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
class BootstrapClassificationModelResponse(TypedDict):
|
|
1771
|
+
job_id: str
|
|
1772
|
+
org_id: str
|
|
1773
|
+
status: JobStatus
|
|
1774
|
+
result: BootstrapClassificationModelMeta | None
|
|
1775
|
+
input: BootstrapClassificationModelRequest | None
|
|
1776
|
+
task_id: str
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
class OrcaClient(Client):
|
|
1780
|
+
@staticmethod
|
|
1781
|
+
def _parse_params(
|
|
1782
|
+
params: Mapping[str, Any],
|
|
1783
|
+
path: str,
|
|
1784
|
+
) -> tuple[dict[str, Any], dict[str, Any]]:
|
|
1785
|
+
placeholders = {name for _, name, _, _ in Formatter().parse(path) if name}
|
|
1786
|
+
path_params = {k: v for k, v in params.items() if k in placeholders}
|
|
1787
|
+
query_params = {k: v for k, v in params.items() if k not in placeholders and v is not None}
|
|
1788
|
+
if placeholders - path_params.keys():
|
|
1789
|
+
raise ValueError(f"Missing path params: {', '.join(placeholders - path_params.keys())}")
|
|
1790
|
+
return path_params, query_params
|
|
1791
|
+
|
|
1792
|
+
@overload
|
|
1793
|
+
def GET(
|
|
1794
|
+
self,
|
|
1795
|
+
path: Literal["/test_error/{status_code}"],
|
|
1796
|
+
*,
|
|
1797
|
+
params: GetTestErrorByStatusCodeParams,
|
|
1798
|
+
parse_as: Literal["json"] = "json",
|
|
1799
|
+
headers: HeaderTypes | None = None,
|
|
1800
|
+
cookies: CookieTypes | None = None,
|
|
1801
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1802
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1803
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1804
|
+
extensions: RequestExtensions | None = None,
|
|
1805
|
+
) -> Any:
|
|
1806
|
+
pass
|
|
1807
|
+
|
|
1808
|
+
@overload
|
|
1809
|
+
def GET(
|
|
1810
|
+
self,
|
|
1811
|
+
path: Literal["/check/alive"],
|
|
1812
|
+
*,
|
|
1813
|
+
params: None = None,
|
|
1814
|
+
parse_as: Literal["json"] = "json",
|
|
1815
|
+
headers: HeaderTypes | None = None,
|
|
1816
|
+
cookies: CookieTypes | None = None,
|
|
1817
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1818
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1819
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1820
|
+
extensions: RequestExtensions | None = None,
|
|
1821
|
+
) -> AliveResponse:
|
|
1822
|
+
pass
|
|
1823
|
+
|
|
1824
|
+
@overload
|
|
1825
|
+
def GET(
|
|
1826
|
+
self,
|
|
1827
|
+
path: Literal["/gpu/check/alive"],
|
|
1828
|
+
*,
|
|
1829
|
+
params: None = None,
|
|
1830
|
+
parse_as: Literal["json"] = "json",
|
|
1831
|
+
headers: HeaderTypes | None = None,
|
|
1832
|
+
cookies: CookieTypes | None = None,
|
|
1833
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1834
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1835
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1836
|
+
extensions: RequestExtensions | None = None,
|
|
1837
|
+
) -> AliveResponse:
|
|
1838
|
+
pass
|
|
1839
|
+
|
|
1840
|
+
@overload
|
|
1841
|
+
def GET(
|
|
1842
|
+
self,
|
|
1843
|
+
path: Literal["/check/ready"],
|
|
1844
|
+
*,
|
|
1845
|
+
params: None = None,
|
|
1846
|
+
parse_as: Literal["json"] = "json",
|
|
1847
|
+
headers: HeaderTypes | None = None,
|
|
1848
|
+
cookies: CookieTypes | None = None,
|
|
1849
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1850
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1851
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1852
|
+
extensions: RequestExtensions | None = None,
|
|
1853
|
+
) -> ReadyResponse:
|
|
1854
|
+
pass
|
|
1855
|
+
|
|
1856
|
+
@overload
|
|
1857
|
+
def GET(
|
|
1858
|
+
self,
|
|
1859
|
+
path: Literal["/check/healthy"],
|
|
1860
|
+
*,
|
|
1861
|
+
params: None = None,
|
|
1862
|
+
parse_as: Literal["json"] = "json",
|
|
1863
|
+
headers: HeaderTypes | None = None,
|
|
1864
|
+
cookies: CookieTypes | None = None,
|
|
1865
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1866
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1867
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1868
|
+
extensions: RequestExtensions | None = None,
|
|
1869
|
+
) -> HealthyResponse:
|
|
1870
|
+
pass
|
|
1871
|
+
|
|
1872
|
+
@overload
|
|
1873
|
+
def GET(
|
|
1874
|
+
self,
|
|
1875
|
+
path: Literal["/gpu/check/healthy"],
|
|
1876
|
+
*,
|
|
1877
|
+
params: None = None,
|
|
1878
|
+
parse_as: Literal["json"] = "json",
|
|
1879
|
+
headers: HeaderTypes | None = None,
|
|
1880
|
+
cookies: CookieTypes | None = None,
|
|
1881
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1882
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1883
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1884
|
+
extensions: RequestExtensions | None = None,
|
|
1885
|
+
) -> HealthyResponse:
|
|
1886
|
+
pass
|
|
1887
|
+
|
|
1888
|
+
@overload
|
|
1889
|
+
def GET(
|
|
1890
|
+
self,
|
|
1891
|
+
path: Literal["/gpu/config"],
|
|
1892
|
+
*,
|
|
1893
|
+
params: None = None,
|
|
1894
|
+
parse_as: Literal["json"] = "json",
|
|
1895
|
+
headers: HeaderTypes | None = None,
|
|
1896
|
+
cookies: CookieTypes | None = None,
|
|
1897
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1898
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1899
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1900
|
+
extensions: RequestExtensions | None = None,
|
|
1901
|
+
) -> dict[str, str | float | int | bool | None]:
|
|
1902
|
+
pass
|
|
1903
|
+
|
|
1904
|
+
@overload
|
|
1905
|
+
def GET(
|
|
1906
|
+
self,
|
|
1907
|
+
path: Literal["/config"],
|
|
1908
|
+
*,
|
|
1909
|
+
params: None = None,
|
|
1910
|
+
parse_as: Literal["json"] = "json",
|
|
1911
|
+
headers: HeaderTypes | None = None,
|
|
1912
|
+
cookies: CookieTypes | None = None,
|
|
1913
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1914
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1915
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1916
|
+
extensions: RequestExtensions | None = None,
|
|
1917
|
+
) -> dict[str, str | float | int | bool | None]:
|
|
1918
|
+
pass
|
|
1919
|
+
|
|
1920
|
+
@overload
|
|
1921
|
+
def GET(
|
|
1922
|
+
self,
|
|
1923
|
+
path: Literal["/auth/root"],
|
|
1924
|
+
*,
|
|
1925
|
+
params: None = None,
|
|
1926
|
+
parse_as: Literal["json"] = "json",
|
|
1927
|
+
headers: HeaderTypes | None = None,
|
|
1928
|
+
cookies: CookieTypes | None = None,
|
|
1929
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1930
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1931
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1932
|
+
extensions: RequestExtensions | None = None,
|
|
1933
|
+
) -> Literal[True]:
|
|
1934
|
+
"""Return true only when called with a valid root API key; otherwise 401 Unauthenticated."""
|
|
1935
|
+
pass
|
|
1936
|
+
|
|
1937
|
+
@overload
|
|
1938
|
+
def GET(
|
|
1939
|
+
self,
|
|
1940
|
+
path: Literal["/auth/api_key"],
|
|
1941
|
+
*,
|
|
1942
|
+
params: None = None,
|
|
1943
|
+
parse_as: Literal["json"] = "json",
|
|
1944
|
+
headers: HeaderTypes | None = None,
|
|
1945
|
+
cookies: CookieTypes | None = None,
|
|
1946
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1947
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1948
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1949
|
+
extensions: RequestExtensions | None = None,
|
|
1950
|
+
) -> list[ApiKeyMetadata]:
|
|
1951
|
+
"""List all API keys for the organization."""
|
|
1952
|
+
pass
|
|
1953
|
+
|
|
1954
|
+
@overload
|
|
1955
|
+
def GET(
|
|
1956
|
+
self,
|
|
1957
|
+
path: Literal["/auth"],
|
|
1958
|
+
*,
|
|
1959
|
+
params: None = None,
|
|
1960
|
+
parse_as: Literal["json"] = "json",
|
|
1961
|
+
headers: HeaderTypes | None = None,
|
|
1962
|
+
cookies: CookieTypes | None = None,
|
|
1963
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1964
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1965
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1966
|
+
extensions: RequestExtensions | None = None,
|
|
1967
|
+
) -> Literal[True]:
|
|
1968
|
+
"""Returns true if the api key header is valid for the org (will be false for admin api key)"""
|
|
1969
|
+
pass
|
|
1970
|
+
|
|
1971
|
+
@overload
|
|
1972
|
+
def GET(
|
|
1973
|
+
self,
|
|
1974
|
+
path: Literal["/auth/org/plan"],
|
|
1975
|
+
*,
|
|
1976
|
+
params: None = None,
|
|
1977
|
+
parse_as: Literal["json"] = "json",
|
|
1978
|
+
headers: HeaderTypes | None = None,
|
|
1979
|
+
cookies: CookieTypes | None = None,
|
|
1980
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1981
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1982
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1983
|
+
extensions: RequestExtensions | None = None,
|
|
1984
|
+
) -> OrgPlan:
|
|
1985
|
+
"""Get the organization plan."""
|
|
1986
|
+
pass
|
|
1987
|
+
|
|
1988
|
+
@overload
|
|
1989
|
+
def GET(
|
|
1990
|
+
self,
|
|
1991
|
+
path: Literal["/memoryset"],
|
|
1992
|
+
*,
|
|
1993
|
+
params: GetMemorysetParams,
|
|
1994
|
+
parse_as: Literal["json"] = "json",
|
|
1995
|
+
headers: HeaderTypes | None = None,
|
|
1996
|
+
cookies: CookieTypes | None = None,
|
|
1997
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1998
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
1999
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2000
|
+
extensions: RequestExtensions | None = None,
|
|
2001
|
+
) -> list[MemorysetMetadata]:
|
|
2002
|
+
pass
|
|
2003
|
+
|
|
2004
|
+
@overload
|
|
2005
|
+
def GET(
|
|
2006
|
+
self,
|
|
2007
|
+
path: Literal["/memoryset/{name_or_id}"],
|
|
2008
|
+
*,
|
|
2009
|
+
params: GetMemorysetByNameOrIdParams,
|
|
2010
|
+
parse_as: Literal["json"] = "json",
|
|
2011
|
+
headers: HeaderTypes | None = None,
|
|
2012
|
+
cookies: CookieTypes | None = None,
|
|
2013
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2014
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2015
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2016
|
+
extensions: RequestExtensions | None = None,
|
|
2017
|
+
) -> MemorysetMetadata:
|
|
2018
|
+
pass
|
|
2019
|
+
|
|
2020
|
+
@overload
|
|
2021
|
+
def GET(
|
|
2022
|
+
self,
|
|
2023
|
+
path: Literal["/memoryset/{name_or_id}/memory/{memory_id}"],
|
|
2024
|
+
*,
|
|
2025
|
+
params: GetMemorysetByNameOrIdMemoryByMemoryIdParams,
|
|
2026
|
+
parse_as: Literal["json"] = "json",
|
|
2027
|
+
headers: HeaderTypes | None = None,
|
|
2028
|
+
cookies: CookieTypes | None = None,
|
|
2029
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2030
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2031
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2032
|
+
extensions: RequestExtensions | None = None,
|
|
2033
|
+
) -> LabeledMemory | ScoredMemory:
|
|
2034
|
+
pass
|
|
2035
|
+
|
|
2036
|
+
@overload
|
|
2037
|
+
def GET(
|
|
2038
|
+
self,
|
|
2039
|
+
path: Literal["/memoryset/{name_or_id}/potential_duplicate_groups"],
|
|
2040
|
+
*,
|
|
2041
|
+
params: GetMemorysetByNameOrIdPotentialDuplicateGroupsParams,
|
|
2042
|
+
parse_as: Literal["json"] = "json",
|
|
2043
|
+
headers: HeaderTypes | None = None,
|
|
2044
|
+
cookies: CookieTypes | None = None,
|
|
2045
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2046
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2047
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2048
|
+
extensions: RequestExtensions | None = None,
|
|
2049
|
+
) -> list[list[LabeledMemory]] | list[list[ScoredMemory]]:
|
|
2050
|
+
pass
|
|
2051
|
+
|
|
2052
|
+
@overload
|
|
2053
|
+
def GET(
|
|
2054
|
+
self,
|
|
2055
|
+
path: Literal["/memoryset/{name_or_id}/analysis"],
|
|
2056
|
+
*,
|
|
2057
|
+
params: GetMemorysetByNameOrIdAnalysisParams,
|
|
2058
|
+
parse_as: Literal["json"] = "json",
|
|
2059
|
+
headers: HeaderTypes | None = None,
|
|
2060
|
+
cookies: CookieTypes | None = None,
|
|
2061
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2062
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2063
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2064
|
+
extensions: RequestExtensions | None = None,
|
|
2065
|
+
) -> list[MemorysetAnalysisResponse]:
|
|
2066
|
+
pass
|
|
2067
|
+
|
|
2068
|
+
@overload
|
|
2069
|
+
def GET(
|
|
2070
|
+
self,
|
|
2071
|
+
path: Literal["/memoryset/{name_or_id}/analysis/{analysis_job_id}"],
|
|
2072
|
+
*,
|
|
2073
|
+
params: GetMemorysetByNameOrIdAnalysisByAnalysisJobIdParams,
|
|
2074
|
+
parse_as: Literal["json"] = "json",
|
|
2075
|
+
headers: HeaderTypes | None = None,
|
|
2076
|
+
cookies: CookieTypes | None = None,
|
|
2077
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2078
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2079
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2080
|
+
extensions: RequestExtensions | None = None,
|
|
2081
|
+
) -> MemorysetAnalysisResponse:
|
|
2082
|
+
pass
|
|
2083
|
+
|
|
2084
|
+
@overload
|
|
2085
|
+
def GET(
|
|
2086
|
+
self,
|
|
2087
|
+
path: Literal["/finetuned_embedding_model"],
|
|
2088
|
+
*,
|
|
2089
|
+
params: None = None,
|
|
2090
|
+
parse_as: Literal["json"] = "json",
|
|
2091
|
+
headers: HeaderTypes | None = None,
|
|
2092
|
+
cookies: CookieTypes | None = None,
|
|
2093
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2094
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2095
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2096
|
+
extensions: RequestExtensions | None = None,
|
|
2097
|
+
) -> list[FinetunedEmbeddingModelMetadata]:
|
|
2098
|
+
"""List all finetuned embedding models for the organization."""
|
|
2099
|
+
pass
|
|
2100
|
+
|
|
2101
|
+
@overload
|
|
2102
|
+
def GET(
|
|
2103
|
+
self,
|
|
2104
|
+
path: Literal["/finetuned_embedding_model/{name_or_id}"],
|
|
2105
|
+
*,
|
|
2106
|
+
params: GetFinetunedEmbeddingModelByNameOrIdParams,
|
|
2107
|
+
parse_as: Literal["json"] = "json",
|
|
2108
|
+
headers: HeaderTypes | None = None,
|
|
2109
|
+
cookies: CookieTypes | None = None,
|
|
2110
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2111
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2112
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2113
|
+
extensions: RequestExtensions | None = None,
|
|
2114
|
+
) -> FinetunedEmbeddingModelMetadata:
|
|
2115
|
+
"""Get a finetuned embedding model by name or ID."""
|
|
2116
|
+
pass
|
|
2117
|
+
|
|
2118
|
+
@overload
|
|
2119
|
+
def GET(
|
|
2120
|
+
self,
|
|
2121
|
+
path: Literal["/pretrained_embedding_model"],
|
|
2122
|
+
*,
|
|
2123
|
+
params: None = None,
|
|
2124
|
+
parse_as: Literal["json"] = "json",
|
|
2125
|
+
headers: HeaderTypes | None = None,
|
|
2126
|
+
cookies: CookieTypes | None = None,
|
|
2127
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2128
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2129
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2130
|
+
extensions: RequestExtensions | None = None,
|
|
2131
|
+
) -> list[PretrainedEmbeddingModelMetadata]:
|
|
2132
|
+
"""List all available pretrained embedding models."""
|
|
2133
|
+
pass
|
|
2134
|
+
|
|
2135
|
+
@overload
|
|
2136
|
+
def GET(
|
|
2137
|
+
self,
|
|
2138
|
+
path: Literal["/pretrained_embedding_model/{model_name}"],
|
|
2139
|
+
*,
|
|
2140
|
+
params: GetPretrainedEmbeddingModelByModelNameParams,
|
|
2141
|
+
parse_as: Literal["json"] = "json",
|
|
2142
|
+
headers: HeaderTypes | None = None,
|
|
2143
|
+
cookies: CookieTypes | None = None,
|
|
2144
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2145
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2146
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2147
|
+
extensions: RequestExtensions | None = None,
|
|
2148
|
+
) -> PretrainedEmbeddingModelMetadata:
|
|
2149
|
+
"""Get metadata for a specific pretrained embedding model."""
|
|
2150
|
+
pass
|
|
2151
|
+
|
|
2152
|
+
@overload
|
|
2153
|
+
def GET(
|
|
2154
|
+
self,
|
|
2155
|
+
path: Literal["/finetuned_embedding_model/{name_or_id}/evaluation/{job_id}"],
|
|
2156
|
+
*,
|
|
2157
|
+
params: GetFinetunedEmbeddingModelByNameOrIdEvaluationByJobIdParams,
|
|
2158
|
+
parse_as: Literal["json"] = "json",
|
|
2159
|
+
headers: HeaderTypes | None = None,
|
|
2160
|
+
cookies: CookieTypes | None = None,
|
|
2161
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2162
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2163
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2164
|
+
extensions: RequestExtensions | None = None,
|
|
2165
|
+
) -> EmbeddingEvaluationResponse:
|
|
2166
|
+
"""Get evaluation results for a finetuned embedding model by job ID."""
|
|
2167
|
+
pass
|
|
2168
|
+
|
|
2169
|
+
@overload
|
|
2170
|
+
def GET(
|
|
2171
|
+
self,
|
|
2172
|
+
path: Literal["/pretrained_embedding_model/{model_name}/evaluation/{job_id}"],
|
|
2173
|
+
*,
|
|
2174
|
+
params: GetPretrainedEmbeddingModelByModelNameEvaluationByJobIdParams,
|
|
2175
|
+
parse_as: Literal["json"] = "json",
|
|
2176
|
+
headers: HeaderTypes | None = None,
|
|
2177
|
+
cookies: CookieTypes | None = None,
|
|
2178
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2179
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2180
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2181
|
+
extensions: RequestExtensions | None = None,
|
|
2182
|
+
) -> EmbeddingEvaluationResponse:
|
|
2183
|
+
"""Get evaluation results for a pretrained embedding model by job ID."""
|
|
2184
|
+
pass
|
|
2185
|
+
|
|
2186
|
+
@overload
|
|
2187
|
+
def GET(
|
|
2188
|
+
self,
|
|
2189
|
+
path: Literal["/finetuned_embedding_model/{name_or_id}/evaluations"],
|
|
2190
|
+
*,
|
|
2191
|
+
params: GetFinetunedEmbeddingModelByNameOrIdEvaluationsParams,
|
|
2192
|
+
parse_as: Literal["json"] = "json",
|
|
2193
|
+
headers: HeaderTypes | None = None,
|
|
2194
|
+
cookies: CookieTypes | None = None,
|
|
2195
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2196
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2197
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2198
|
+
extensions: RequestExtensions | None = None,
|
|
2199
|
+
) -> list[EmbeddingEvaluationResponse]:
|
|
2200
|
+
"""List all evaluation results for a finetuned embedding model."""
|
|
2201
|
+
pass
|
|
2202
|
+
|
|
2203
|
+
@overload
|
|
2204
|
+
def GET(
|
|
2205
|
+
self,
|
|
2206
|
+
path: Literal["/pretrained_embedding_model/{model_name}/evaluations"],
|
|
2207
|
+
*,
|
|
2208
|
+
params: GetPretrainedEmbeddingModelByModelNameEvaluationsParams,
|
|
2209
|
+
parse_as: Literal["json"] = "json",
|
|
2210
|
+
headers: HeaderTypes | None = None,
|
|
2211
|
+
cookies: CookieTypes | None = None,
|
|
2212
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2213
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2214
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2215
|
+
extensions: RequestExtensions | None = None,
|
|
2216
|
+
) -> list[EmbeddingEvaluationResponse]:
|
|
2217
|
+
"""List all evaluation results for a pretrained embedding model."""
|
|
2218
|
+
pass
|
|
2219
|
+
|
|
2220
|
+
@overload
|
|
2221
|
+
def GET(
|
|
2222
|
+
self,
|
|
2223
|
+
path: Literal["/datasource"],
|
|
2224
|
+
*,
|
|
2225
|
+
params: None = None,
|
|
2226
|
+
parse_as: Literal["json"] = "json",
|
|
2227
|
+
headers: HeaderTypes | None = None,
|
|
2228
|
+
cookies: CookieTypes | None = None,
|
|
2229
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2230
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2231
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2232
|
+
extensions: RequestExtensions | None = None,
|
|
2233
|
+
) -> list[DatasourceMetadata]:
|
|
2234
|
+
"""List all datasources for the organization."""
|
|
2235
|
+
pass
|
|
2236
|
+
|
|
2237
|
+
@overload
|
|
2238
|
+
def GET(
|
|
2239
|
+
self,
|
|
2240
|
+
path: Literal["/datasource/{name_or_id}"],
|
|
2241
|
+
*,
|
|
2242
|
+
params: GetDatasourceByNameOrIdParams,
|
|
2243
|
+
parse_as: Literal["json"] = "json",
|
|
2244
|
+
headers: HeaderTypes | None = None,
|
|
2245
|
+
cookies: CookieTypes | None = None,
|
|
2246
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2247
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2248
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2249
|
+
extensions: RequestExtensions | None = None,
|
|
2250
|
+
) -> DatasourceMetadata:
|
|
2251
|
+
"""Get a datasource by name or ID."""
|
|
2252
|
+
pass
|
|
2253
|
+
|
|
2254
|
+
@overload
|
|
2255
|
+
def GET(
|
|
2256
|
+
self,
|
|
2257
|
+
path: Literal["/datasource/{name_or_id}/embedding_model_evaluations"],
|
|
2258
|
+
*,
|
|
2259
|
+
params: GetDatasourceByNameOrIdEmbeddingModelEvaluationsParams,
|
|
2260
|
+
parse_as: Literal["json"] = "json",
|
|
2261
|
+
headers: HeaderTypes | None = None,
|
|
2262
|
+
cookies: CookieTypes | None = None,
|
|
2263
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2264
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2265
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2266
|
+
extensions: RequestExtensions | None = None,
|
|
2267
|
+
) -> list[EmbeddingEvaluationResponse]:
|
|
2268
|
+
"""List all evaluation results for a datasource."""
|
|
2269
|
+
pass
|
|
2270
|
+
|
|
2271
|
+
@overload
|
|
2272
|
+
def GET(
|
|
2273
|
+
self,
|
|
2274
|
+
path: Literal["/datasource/{name_or_id}/download"],
|
|
2275
|
+
*,
|
|
2276
|
+
params: GetDatasourceByNameOrIdDownloadParams,
|
|
2277
|
+
parse_as: Literal["json"] = "json",
|
|
2278
|
+
headers: HeaderTypes | None = None,
|
|
2279
|
+
cookies: CookieTypes | None = None,
|
|
2280
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2281
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2282
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2283
|
+
extensions: RequestExtensions | None = None,
|
|
2284
|
+
) -> list[dict[str, Any]]:
|
|
2285
|
+
"""Download datasource in the specified format."""
|
|
2286
|
+
pass
|
|
2287
|
+
|
|
2288
|
+
@overload
|
|
2289
|
+
def GET(
|
|
2290
|
+
self,
|
|
2291
|
+
path: Literal["/datasource/{name_or_id}/download"],
|
|
2292
|
+
*,
|
|
2293
|
+
params: GetDatasourceByNameOrIdDownloadParams,
|
|
2294
|
+
parse_as: Literal["text"],
|
|
2295
|
+
headers: HeaderTypes | None = None,
|
|
2296
|
+
cookies: CookieTypes | None = None,
|
|
2297
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2298
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2299
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2300
|
+
extensions: RequestExtensions | None = None,
|
|
2301
|
+
) -> str:
|
|
2302
|
+
"""Download datasource in the specified format."""
|
|
2303
|
+
pass
|
|
2304
|
+
|
|
2305
|
+
@overload
|
|
2306
|
+
def GET(
|
|
2307
|
+
self,
|
|
2308
|
+
path: Literal["/datasource/{name_or_id}/download"],
|
|
2309
|
+
*,
|
|
2310
|
+
params: GetDatasourceByNameOrIdDownloadParams,
|
|
2311
|
+
parse_as: None,
|
|
2312
|
+
headers: HeaderTypes | None = None,
|
|
2313
|
+
cookies: CookieTypes | None = None,
|
|
2314
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2315
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2316
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2317
|
+
extensions: RequestExtensions | None = None,
|
|
2318
|
+
) -> bytes:
|
|
2319
|
+
"""Download datasource in the specified format."""
|
|
2320
|
+
pass
|
|
2321
|
+
|
|
2322
|
+
@overload
|
|
2323
|
+
def GET(
|
|
2324
|
+
self,
|
|
2325
|
+
path: Literal["/classification_model"],
|
|
2326
|
+
*,
|
|
2327
|
+
params: None = None,
|
|
2328
|
+
parse_as: Literal["json"] = "json",
|
|
2329
|
+
headers: HeaderTypes | None = None,
|
|
2330
|
+
cookies: CookieTypes | None = None,
|
|
2331
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2332
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2333
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2334
|
+
extensions: RequestExtensions | None = None,
|
|
2335
|
+
) -> list[ClassificationModelMetadata]:
|
|
2336
|
+
pass
|
|
2337
|
+
|
|
2338
|
+
@overload
|
|
2339
|
+
def GET(
|
|
2340
|
+
self,
|
|
2341
|
+
path: Literal["/regression_model"],
|
|
2342
|
+
*,
|
|
2343
|
+
params: None = None,
|
|
2344
|
+
parse_as: Literal["json"] = "json",
|
|
2345
|
+
headers: HeaderTypes | None = None,
|
|
2346
|
+
cookies: CookieTypes | None = None,
|
|
2347
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2348
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2349
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2350
|
+
extensions: RequestExtensions | None = None,
|
|
2351
|
+
) -> list[RegressionModelMetadata]:
|
|
2352
|
+
pass
|
|
2353
|
+
|
|
2354
|
+
@overload
|
|
2355
|
+
def GET(
|
|
2356
|
+
self,
|
|
2357
|
+
path: Literal["/classification_model/{name_or_id}"],
|
|
2358
|
+
*,
|
|
2359
|
+
params: GetClassificationModelByNameOrIdParams,
|
|
2360
|
+
parse_as: Literal["json"] = "json",
|
|
2361
|
+
headers: HeaderTypes | None = None,
|
|
2362
|
+
cookies: CookieTypes | None = None,
|
|
2363
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2364
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2365
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2366
|
+
extensions: RequestExtensions | None = None,
|
|
2367
|
+
) -> ClassificationModelMetadata:
|
|
2368
|
+
pass
|
|
2369
|
+
|
|
2370
|
+
@overload
|
|
2371
|
+
def GET(
|
|
2372
|
+
self,
|
|
2373
|
+
path: Literal["/regression_model/{name_or_id}"],
|
|
2374
|
+
*,
|
|
2375
|
+
params: GetRegressionModelByNameOrIdParams,
|
|
2376
|
+
parse_as: Literal["json"] = "json",
|
|
2377
|
+
headers: HeaderTypes | None = None,
|
|
2378
|
+
cookies: CookieTypes | None = None,
|
|
2379
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2380
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2381
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2382
|
+
extensions: RequestExtensions | None = None,
|
|
2383
|
+
) -> RegressionModelMetadata:
|
|
2384
|
+
pass
|
|
2385
|
+
|
|
2386
|
+
@overload
|
|
2387
|
+
def GET(
|
|
2388
|
+
self,
|
|
2389
|
+
path: Literal["/predictive_model"],
|
|
2390
|
+
*,
|
|
2391
|
+
params: None = None,
|
|
2392
|
+
parse_as: Literal["json"] = "json",
|
|
2393
|
+
headers: HeaderTypes | None = None,
|
|
2394
|
+
cookies: CookieTypes | None = None,
|
|
2395
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2396
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2397
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2398
|
+
extensions: RequestExtensions | None = None,
|
|
2399
|
+
) -> list[ClassificationModelMetadata | RegressionModelMetadata]:
|
|
2400
|
+
pass
|
|
2401
|
+
|
|
2402
|
+
@overload
|
|
2403
|
+
def GET(
|
|
2404
|
+
self,
|
|
2405
|
+
path: Literal["/classification_model/{model_name_or_id}/evaluation"],
|
|
2406
|
+
*,
|
|
2407
|
+
params: GetClassificationModelByModelNameOrIdEvaluationParams,
|
|
2408
|
+
parse_as: Literal["json"] = "json",
|
|
2409
|
+
headers: HeaderTypes | None = None,
|
|
2410
|
+
cookies: CookieTypes | None = None,
|
|
2411
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2412
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2413
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2414
|
+
extensions: RequestExtensions | None = None,
|
|
2415
|
+
) -> list[EvaluationResponseClassificationMetrics]:
|
|
2416
|
+
pass
|
|
2417
|
+
|
|
2418
|
+
@overload
|
|
2419
|
+
def GET(
|
|
2420
|
+
self,
|
|
2421
|
+
path: Literal["/regression_model/{model_name_or_id}/evaluation"],
|
|
2422
|
+
*,
|
|
2423
|
+
params: GetRegressionModelByModelNameOrIdEvaluationParams,
|
|
2424
|
+
parse_as: Literal["json"] = "json",
|
|
2425
|
+
headers: HeaderTypes | None = None,
|
|
2426
|
+
cookies: CookieTypes | None = None,
|
|
2427
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2428
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2429
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2430
|
+
extensions: RequestExtensions | None = None,
|
|
2431
|
+
) -> list[EvaluationResponseRegressionMetrics]:
|
|
2432
|
+
pass
|
|
2433
|
+
|
|
2434
|
+
@overload
|
|
2435
|
+
def GET(
|
|
2436
|
+
self,
|
|
2437
|
+
path: Literal["/classification_model/{model_name_or_id}/evaluation/{job_id}"],
|
|
2438
|
+
*,
|
|
2439
|
+
params: GetClassificationModelByModelNameOrIdEvaluationByJobIdParams,
|
|
2440
|
+
parse_as: Literal["json"] = "json",
|
|
2441
|
+
headers: HeaderTypes | None = None,
|
|
2442
|
+
cookies: CookieTypes | None = None,
|
|
2443
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2444
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2445
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2446
|
+
extensions: RequestExtensions | None = None,
|
|
2447
|
+
) -> EvaluationResponseClassificationMetrics:
|
|
2448
|
+
pass
|
|
2449
|
+
|
|
2450
|
+
@overload
|
|
2451
|
+
def GET(
|
|
2452
|
+
self,
|
|
2453
|
+
path: Literal["/regression_model/{model_name_or_id}/evaluation/{job_id}"],
|
|
2454
|
+
*,
|
|
2455
|
+
params: GetRegressionModelByModelNameOrIdEvaluationByJobIdParams,
|
|
2456
|
+
parse_as: Literal["json"] = "json",
|
|
2457
|
+
headers: HeaderTypes | None = None,
|
|
2458
|
+
cookies: CookieTypes | None = None,
|
|
2459
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2460
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2461
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2462
|
+
extensions: RequestExtensions | None = None,
|
|
2463
|
+
) -> EvaluationResponseRegressionMetrics:
|
|
2464
|
+
pass
|
|
2465
|
+
|
|
2466
|
+
@overload
|
|
2467
|
+
def GET(
|
|
2468
|
+
self,
|
|
2469
|
+
path: Literal["/job/{job_id}"],
|
|
2470
|
+
*,
|
|
2471
|
+
params: GetJobByJobIdParams,
|
|
2472
|
+
parse_as: Literal["json"] = "json",
|
|
2473
|
+
headers: HeaderTypes | None = None,
|
|
2474
|
+
cookies: CookieTypes | None = None,
|
|
2475
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2476
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2477
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2478
|
+
extensions: RequestExtensions | None = None,
|
|
2479
|
+
) -> Job:
|
|
2480
|
+
pass
|
|
2481
|
+
|
|
2482
|
+
@overload
|
|
2483
|
+
def GET(
|
|
2484
|
+
self,
|
|
2485
|
+
path: Literal["/job/{job_id}/status"],
|
|
2486
|
+
*,
|
|
2487
|
+
params: GetJobByJobIdStatusParams,
|
|
2488
|
+
parse_as: Literal["json"] = "json",
|
|
2489
|
+
headers: HeaderTypes | None = None,
|
|
2490
|
+
cookies: CookieTypes | None = None,
|
|
2491
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2492
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2493
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2494
|
+
extensions: RequestExtensions | None = None,
|
|
2495
|
+
) -> JobStatusInfo:
|
|
2496
|
+
pass
|
|
2497
|
+
|
|
2498
|
+
@overload
|
|
2499
|
+
def GET(
|
|
2500
|
+
self,
|
|
2501
|
+
path: Literal["/job"],
|
|
2502
|
+
*,
|
|
2503
|
+
params: GetJobParams,
|
|
2504
|
+
parse_as: Literal["json"] = "json",
|
|
2505
|
+
headers: HeaderTypes | None = None,
|
|
2506
|
+
cookies: CookieTypes | None = None,
|
|
2507
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2508
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2509
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2510
|
+
extensions: RequestExtensions | None = None,
|
|
2511
|
+
) -> PaginatedJob:
|
|
2512
|
+
pass
|
|
2513
|
+
|
|
2514
|
+
@overload
|
|
2515
|
+
def GET(
|
|
2516
|
+
self,
|
|
2517
|
+
path: Literal["/worker"],
|
|
2518
|
+
*,
|
|
2519
|
+
params: GetWorkerParams,
|
|
2520
|
+
parse_as: Literal["json"] = "json",
|
|
2521
|
+
headers: HeaderTypes | None = None,
|
|
2522
|
+
cookies: CookieTypes | None = None,
|
|
2523
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2524
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2525
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2526
|
+
extensions: RequestExtensions | None = None,
|
|
2527
|
+
) -> PaginatedWorkerInfo:
|
|
2528
|
+
"""
|
|
2529
|
+
List all workers in the system. Requires root access.
|
|
2530
|
+
|
|
2531
|
+
This endpoint automatically cleans up orphaned workers before returning results.
|
|
2532
|
+
"""
|
|
2533
|
+
pass
|
|
2534
|
+
|
|
2535
|
+
@overload
|
|
2536
|
+
def GET(
|
|
2537
|
+
self,
|
|
2538
|
+
path: Literal["/worker/{worker_id}"],
|
|
2539
|
+
*,
|
|
2540
|
+
params: GetWorkerByWorkerIdParams,
|
|
2541
|
+
parse_as: Literal["json"] = "json",
|
|
2542
|
+
headers: HeaderTypes | None = None,
|
|
2543
|
+
cookies: CookieTypes | None = None,
|
|
2544
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2545
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2546
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2547
|
+
extensions: RequestExtensions | None = None,
|
|
2548
|
+
) -> WorkerInfo:
|
|
2549
|
+
"""Get information about a specific worker. Requires root access."""
|
|
2550
|
+
pass
|
|
2551
|
+
|
|
2552
|
+
@overload
|
|
2553
|
+
def GET(
|
|
2554
|
+
self,
|
|
2555
|
+
path: Literal["/telemetry/prediction/{prediction_id}"],
|
|
2556
|
+
*,
|
|
2557
|
+
params: GetTelemetryPredictionByPredictionIdParams,
|
|
2558
|
+
parse_as: Literal["json"] = "json",
|
|
2559
|
+
headers: HeaderTypes | None = None,
|
|
2560
|
+
cookies: CookieTypes | None = None,
|
|
2561
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2562
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2563
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2564
|
+
extensions: RequestExtensions | None = None,
|
|
2565
|
+
) -> LabelPredictionWithMemoriesAndFeedback | ScorePredictionWithMemoriesAndFeedback:
|
|
2566
|
+
"""Get a specific prediction by ID."""
|
|
2567
|
+
pass
|
|
2568
|
+
|
|
2569
|
+
@overload
|
|
2570
|
+
def GET(
|
|
2571
|
+
self,
|
|
2572
|
+
path: Literal["/telemetry/prediction/{prediction_id}/explanation"],
|
|
2573
|
+
*,
|
|
2574
|
+
params: GetTelemetryPredictionByPredictionIdExplanationParams,
|
|
2575
|
+
parse_as: Literal["text"],
|
|
2576
|
+
headers: HeaderTypes | None = None,
|
|
2577
|
+
cookies: CookieTypes | None = None,
|
|
2578
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2579
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2580
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2581
|
+
extensions: RequestExtensions | None = None,
|
|
2582
|
+
) -> str:
|
|
2583
|
+
"""Get explanation for a prediction, optionally streaming the response."""
|
|
2584
|
+
pass
|
|
2585
|
+
|
|
2586
|
+
@overload
|
|
2587
|
+
def GET(
|
|
2588
|
+
self,
|
|
2589
|
+
path: Literal["/telemetry/prediction/{prediction_id}/action"],
|
|
2590
|
+
*,
|
|
2591
|
+
params: GetTelemetryPredictionByPredictionIdActionParams,
|
|
2592
|
+
parse_as: Literal["json"] = "json",
|
|
2593
|
+
headers: HeaderTypes | None = None,
|
|
2594
|
+
cookies: CookieTypes | None = None,
|
|
2595
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2596
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2597
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2598
|
+
extensions: RequestExtensions | None = None,
|
|
2599
|
+
) -> ActionRecommendation:
|
|
2600
|
+
"""Get action recommendation for improving a specific prediction."""
|
|
2601
|
+
pass
|
|
2602
|
+
|
|
2603
|
+
@overload
|
|
2604
|
+
def GET(
|
|
2605
|
+
self,
|
|
2606
|
+
path: Literal["/telemetry/prediction/{prediction_id}/memory_suggestions"],
|
|
2607
|
+
*,
|
|
2608
|
+
params: GetTelemetryPredictionByPredictionIdMemorySuggestionsParams,
|
|
2609
|
+
parse_as: Literal["json"] = "json",
|
|
2610
|
+
headers: HeaderTypes | None = None,
|
|
2611
|
+
cookies: CookieTypes | None = None,
|
|
2612
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2613
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2614
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2615
|
+
extensions: RequestExtensions | None = None,
|
|
2616
|
+
) -> AddMemoryRecommendations:
|
|
2617
|
+
"""
|
|
2618
|
+
Generate synthetic memory suggestions to improve a specific prediction.
|
|
2619
|
+
|
|
2620
|
+
The returned suggestions have labels as string representations of integer indices
|
|
2621
|
+
corresponding to the memoryset's label_names.
|
|
2622
|
+
"""
|
|
2623
|
+
pass
|
|
2624
|
+
|
|
2625
|
+
@overload
|
|
2626
|
+
def GET(
|
|
2627
|
+
self,
|
|
2628
|
+
path: Literal["/telemetry/feedback_category"],
|
|
2629
|
+
*,
|
|
2630
|
+
params: None = None,
|
|
2631
|
+
parse_as: Literal["json"] = "json",
|
|
2632
|
+
headers: HeaderTypes | None = None,
|
|
2633
|
+
cookies: CookieTypes | None = None,
|
|
2634
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2635
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2636
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2637
|
+
extensions: RequestExtensions | None = None,
|
|
2638
|
+
) -> list[PredictionFeedbackCategory]:
|
|
2639
|
+
"""List all feedback categories for the organization."""
|
|
2640
|
+
pass
|
|
2641
|
+
|
|
2642
|
+
@overload
|
|
2643
|
+
def GET(
|
|
2644
|
+
self,
|
|
2645
|
+
path: Literal["/telemetry/feedback_category/{name_or_id}"],
|
|
2646
|
+
*,
|
|
2647
|
+
params: GetTelemetryFeedbackCategoryByNameOrIdParams,
|
|
2648
|
+
parse_as: Literal["json"] = "json",
|
|
2649
|
+
headers: HeaderTypes | None = None,
|
|
2650
|
+
cookies: CookieTypes | None = None,
|
|
2651
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2652
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2653
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2654
|
+
extensions: RequestExtensions | None = None,
|
|
2655
|
+
) -> PredictionFeedbackCategory:
|
|
2656
|
+
"""Get a feedback category by name or ID."""
|
|
2657
|
+
pass
|
|
2658
|
+
|
|
2659
|
+
@overload
|
|
2660
|
+
def GET(
|
|
2661
|
+
self,
|
|
2662
|
+
path: Literal["/agents/bootstrap_classification_model/{job_id}"],
|
|
2663
|
+
*,
|
|
2664
|
+
params: GetAgentsBootstrapClassificationModelByJobIdParams,
|
|
2665
|
+
parse_as: Literal["json"] = "json",
|
|
2666
|
+
headers: HeaderTypes | None = None,
|
|
2667
|
+
cookies: CookieTypes | None = None,
|
|
2668
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2669
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2670
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2671
|
+
extensions: RequestExtensions | None = None,
|
|
2672
|
+
) -> BootstrapClassificationModelResponse:
|
|
2673
|
+
"""Get the status of a bootstrap labeled memory data job"""
|
|
2674
|
+
pass
|
|
2675
|
+
|
|
2676
|
+
def GET(
|
|
2677
|
+
self,
|
|
2678
|
+
path: str,
|
|
2679
|
+
*,
|
|
2680
|
+
params: Mapping[str, Any] | None = None,
|
|
2681
|
+
parse_as: Literal["json", "text"] | None = "json",
|
|
2682
|
+
headers: HeaderTypes | None = None,
|
|
2683
|
+
cookies: CookieTypes | None = None,
|
|
2684
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2685
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2686
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2687
|
+
extensions: RequestExtensions | None = None,
|
|
2688
|
+
) -> Any:
|
|
2689
|
+
path_params, query_params = self._parse_params(params or {}, path)
|
|
2690
|
+
res = self.get(
|
|
2691
|
+
path.format(**path_params),
|
|
2692
|
+
params=query_params,
|
|
2693
|
+
headers=headers,
|
|
2694
|
+
cookies=cookies,
|
|
2695
|
+
auth=auth,
|
|
2696
|
+
follow_redirects=follow_redirects,
|
|
2697
|
+
timeout=timeout,
|
|
2698
|
+
extensions=extensions,
|
|
2699
|
+
)
|
|
2700
|
+
res.raise_for_status()
|
|
2701
|
+
return (
|
|
2702
|
+
None
|
|
2703
|
+
if res.status_code == 204
|
|
2704
|
+
else res.json() if parse_as == "json" else res.text if parse_as == "text" else res.content
|
|
2705
|
+
)
|
|
2706
|
+
|
|
2707
|
+
@overload
|
|
2708
|
+
def DELETE(
|
|
2709
|
+
self,
|
|
2710
|
+
path: Literal["/cleanup"],
|
|
2711
|
+
*,
|
|
2712
|
+
params: None = None,
|
|
2713
|
+
parse_as: Literal["json"] = "json",
|
|
2714
|
+
headers: HeaderTypes | None = None,
|
|
2715
|
+
cookies: CookieTypes | None = None,
|
|
2716
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2717
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2718
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2719
|
+
extensions: RequestExtensions | None = None,
|
|
2720
|
+
) -> CleanupResponse:
|
|
2721
|
+
"""Cleanup orphaned milvus collections and blobs"""
|
|
2722
|
+
pass
|
|
2723
|
+
|
|
2724
|
+
@overload
|
|
2725
|
+
def DELETE(
|
|
2726
|
+
self,
|
|
2727
|
+
path: Literal["/auth/api_key/{name_or_id}"],
|
|
2728
|
+
*,
|
|
2729
|
+
params: DeleteAuthApiKeyByNameOrIdParams,
|
|
2730
|
+
parse_as: Literal["json"] = "json",
|
|
2731
|
+
headers: HeaderTypes | None = None,
|
|
2732
|
+
cookies: CookieTypes | None = None,
|
|
2733
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2734
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2735
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2736
|
+
extensions: RequestExtensions | None = None,
|
|
2737
|
+
) -> None:
|
|
2738
|
+
"""Delete an API key by name or ID."""
|
|
2739
|
+
pass
|
|
2740
|
+
|
|
2741
|
+
@overload
|
|
2742
|
+
def DELETE(
|
|
2743
|
+
self,
|
|
2744
|
+
path: Literal["/auth/org"],
|
|
2745
|
+
*,
|
|
2746
|
+
params: None = None,
|
|
2747
|
+
parse_as: Literal["json"] = "json",
|
|
2748
|
+
headers: HeaderTypes | None = None,
|
|
2749
|
+
cookies: CookieTypes | None = None,
|
|
2750
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2751
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2752
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2753
|
+
extensions: RequestExtensions | None = None,
|
|
2754
|
+
) -> None:
|
|
2755
|
+
"""Deletes the org and all associated resources"""
|
|
2756
|
+
pass
|
|
2757
|
+
|
|
2758
|
+
@overload
|
|
2759
|
+
def DELETE(
|
|
2760
|
+
self,
|
|
2761
|
+
path: Literal["/memoryset/{name_or_id}"],
|
|
2762
|
+
*,
|
|
2763
|
+
params: DeleteMemorysetByNameOrIdParams,
|
|
2764
|
+
parse_as: Literal["json"] = "json",
|
|
2765
|
+
headers: HeaderTypes | None = None,
|
|
2766
|
+
cookies: CookieTypes | None = None,
|
|
2767
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2768
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2769
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2770
|
+
extensions: RequestExtensions | None = None,
|
|
2771
|
+
) -> None:
|
|
2772
|
+
pass
|
|
2773
|
+
|
|
2774
|
+
@overload
|
|
2775
|
+
def DELETE(
|
|
2776
|
+
self,
|
|
2777
|
+
path: Literal["/memoryset/{name_or_id}/memory/{memory_id}"],
|
|
2778
|
+
*,
|
|
2779
|
+
params: DeleteMemorysetByNameOrIdMemoryByMemoryIdParams,
|
|
2780
|
+
parse_as: Literal["json"] = "json",
|
|
2781
|
+
headers: HeaderTypes | None = None,
|
|
2782
|
+
cookies: CookieTypes | None = None,
|
|
2783
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2784
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2785
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2786
|
+
extensions: RequestExtensions | None = None,
|
|
2787
|
+
) -> None:
|
|
2788
|
+
pass
|
|
2789
|
+
|
|
2790
|
+
@overload
|
|
2791
|
+
def DELETE(
|
|
2792
|
+
self,
|
|
2793
|
+
path: Literal["/finetuned_embedding_model/{name_or_id}"],
|
|
2794
|
+
*,
|
|
2795
|
+
params: DeleteFinetunedEmbeddingModelByNameOrIdParams,
|
|
2796
|
+
parse_as: Literal["json"] = "json",
|
|
2797
|
+
headers: HeaderTypes | None = None,
|
|
2798
|
+
cookies: CookieTypes | None = None,
|
|
2799
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2800
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2801
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2802
|
+
extensions: RequestExtensions | None = None,
|
|
2803
|
+
) -> None:
|
|
2804
|
+
"""Delete a finetuned embedding model by name or ID."""
|
|
2805
|
+
pass
|
|
2806
|
+
|
|
2807
|
+
@overload
|
|
2808
|
+
def DELETE(
|
|
2809
|
+
self,
|
|
2810
|
+
path: Literal["/datasource/{name_or_id}"],
|
|
2811
|
+
*,
|
|
2812
|
+
params: DeleteDatasourceByNameOrIdParams,
|
|
2813
|
+
parse_as: Literal["json"] = "json",
|
|
2814
|
+
headers: HeaderTypes | None = None,
|
|
2815
|
+
cookies: CookieTypes | None = None,
|
|
2816
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2817
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2818
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2819
|
+
extensions: RequestExtensions | None = None,
|
|
2820
|
+
) -> None:
|
|
2821
|
+
"""Delete a datasource by name or ID."""
|
|
2822
|
+
pass
|
|
2823
|
+
|
|
2824
|
+
@overload
|
|
2825
|
+
def DELETE(
|
|
2826
|
+
self,
|
|
2827
|
+
path: Literal["/classification_model/{name_or_id}"],
|
|
2828
|
+
*,
|
|
2829
|
+
params: DeleteClassificationModelByNameOrIdParams,
|
|
2830
|
+
parse_as: Literal["json"] = "json",
|
|
2831
|
+
headers: HeaderTypes | None = None,
|
|
2832
|
+
cookies: CookieTypes | None = None,
|
|
2833
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2834
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2835
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2836
|
+
extensions: RequestExtensions | None = None,
|
|
2837
|
+
) -> None:
|
|
2838
|
+
pass
|
|
2839
|
+
|
|
2840
|
+
@overload
|
|
2841
|
+
def DELETE(
|
|
2842
|
+
self,
|
|
2843
|
+
path: Literal["/regression_model/{name_or_id}"],
|
|
2844
|
+
*,
|
|
2845
|
+
params: DeleteRegressionModelByNameOrIdParams,
|
|
2846
|
+
parse_as: Literal["json"] = "json",
|
|
2847
|
+
headers: HeaderTypes | None = None,
|
|
2848
|
+
cookies: CookieTypes | None = None,
|
|
2849
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2850
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2851
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2852
|
+
extensions: RequestExtensions | None = None,
|
|
2853
|
+
) -> None:
|
|
2854
|
+
pass
|
|
2855
|
+
|
|
2856
|
+
@overload
|
|
2857
|
+
def DELETE(
|
|
2858
|
+
self,
|
|
2859
|
+
path: Literal["/classification_model/{model_name_or_id}/evaluation/{job_id}"],
|
|
2860
|
+
*,
|
|
2861
|
+
params: DeleteClassificationModelByModelNameOrIdEvaluationByJobIdParams,
|
|
2862
|
+
parse_as: Literal["json"] = "json",
|
|
2863
|
+
headers: HeaderTypes | None = None,
|
|
2864
|
+
cookies: CookieTypes | None = None,
|
|
2865
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2866
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2867
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2868
|
+
extensions: RequestExtensions | None = None,
|
|
2869
|
+
) -> None:
|
|
2870
|
+
pass
|
|
2871
|
+
|
|
2872
|
+
@overload
|
|
2873
|
+
def DELETE(
|
|
2874
|
+
self,
|
|
2875
|
+
path: Literal["/regression_model/{model_name_or_id}/evaluation/{job_id}"],
|
|
2876
|
+
*,
|
|
2877
|
+
params: DeleteRegressionModelByModelNameOrIdEvaluationByJobIdParams,
|
|
2878
|
+
parse_as: Literal["json"] = "json",
|
|
2879
|
+
headers: HeaderTypes | None = None,
|
|
2880
|
+
cookies: CookieTypes | None = None,
|
|
2881
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2882
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2883
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2884
|
+
extensions: RequestExtensions | None = None,
|
|
2885
|
+
) -> None:
|
|
2886
|
+
pass
|
|
2887
|
+
|
|
2888
|
+
@overload
|
|
2889
|
+
def DELETE(
|
|
2890
|
+
self,
|
|
2891
|
+
path: Literal["/job/{job_id}/abort"],
|
|
2892
|
+
*,
|
|
2893
|
+
params: DeleteJobByJobIdAbortParams,
|
|
2894
|
+
parse_as: Literal["json"] = "json",
|
|
2895
|
+
headers: HeaderTypes | None = None,
|
|
2896
|
+
cookies: CookieTypes | None = None,
|
|
2897
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2898
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2899
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2900
|
+
extensions: RequestExtensions | None = None,
|
|
2901
|
+
) -> None:
|
|
2902
|
+
pass
|
|
2903
|
+
|
|
2904
|
+
@overload
|
|
2905
|
+
def DELETE(
|
|
2906
|
+
self,
|
|
2907
|
+
path: Literal["/telemetry/feedback_category/{name_or_id}"],
|
|
2908
|
+
*,
|
|
2909
|
+
params: DeleteTelemetryFeedbackCategoryByNameOrIdParams,
|
|
2910
|
+
parse_as: Literal["json"] = "json",
|
|
2911
|
+
headers: HeaderTypes | None = None,
|
|
2912
|
+
cookies: CookieTypes | None = None,
|
|
2913
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2914
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2915
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2916
|
+
extensions: RequestExtensions | None = None,
|
|
2917
|
+
) -> None:
|
|
2918
|
+
"""Delete a feedback category and all associated feedback records."""
|
|
2919
|
+
pass
|
|
2920
|
+
|
|
2921
|
+
def DELETE(
|
|
2922
|
+
self,
|
|
2923
|
+
path: str,
|
|
2924
|
+
*,
|
|
2925
|
+
params: Mapping[str, Any] | None = None,
|
|
2926
|
+
parse_as: Literal["json", "text"] | None = "json",
|
|
2927
|
+
headers: HeaderTypes | None = None,
|
|
2928
|
+
cookies: CookieTypes | None = None,
|
|
2929
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2930
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2931
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2932
|
+
extensions: RequestExtensions | None = None,
|
|
2933
|
+
) -> Any:
|
|
2934
|
+
path_params, query_params = self._parse_params(params or {}, path)
|
|
2935
|
+
res = self.delete(
|
|
2936
|
+
path.format(**path_params),
|
|
2937
|
+
params=query_params,
|
|
2938
|
+
headers=headers,
|
|
2939
|
+
cookies=cookies,
|
|
2940
|
+
auth=auth,
|
|
2941
|
+
follow_redirects=follow_redirects,
|
|
2942
|
+
timeout=timeout,
|
|
2943
|
+
extensions=extensions,
|
|
2944
|
+
)
|
|
2945
|
+
res.raise_for_status()
|
|
2946
|
+
return (
|
|
2947
|
+
None
|
|
2948
|
+
if res.status_code == 204
|
|
2949
|
+
else res.json() if parse_as == "json" else res.text if parse_as == "text" else res.content
|
|
2950
|
+
)
|
|
2951
|
+
|
|
2952
|
+
@overload
|
|
2953
|
+
def POST(
|
|
2954
|
+
self,
|
|
2955
|
+
path: Literal["/auth/api_key"],
|
|
2956
|
+
*,
|
|
2957
|
+
params: None = None,
|
|
2958
|
+
json: CreateApiKeyRequest,
|
|
2959
|
+
data: None = None,
|
|
2960
|
+
files: None = None,
|
|
2961
|
+
content: None = None,
|
|
2962
|
+
parse_as: Literal["json"] = "json",
|
|
2963
|
+
headers: HeaderTypes | None = None,
|
|
2964
|
+
cookies: CookieTypes | None = None,
|
|
2965
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2966
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2967
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2968
|
+
extensions: RequestExtensions | None = None,
|
|
2969
|
+
) -> CreateApiKeyResponse:
|
|
2970
|
+
"""Create a new API key for the organization."""
|
|
2971
|
+
pass
|
|
2972
|
+
|
|
2973
|
+
@overload
|
|
2974
|
+
def POST(
|
|
2975
|
+
self,
|
|
2976
|
+
path: Literal["/auth/org/plan"],
|
|
2977
|
+
*,
|
|
2978
|
+
params: None = None,
|
|
2979
|
+
json: CreateOrgPlanRequest,
|
|
2980
|
+
data: None = None,
|
|
2981
|
+
files: None = None,
|
|
2982
|
+
content: None = None,
|
|
2983
|
+
parse_as: Literal["json"] = "json",
|
|
2984
|
+
headers: HeaderTypes | None = None,
|
|
2985
|
+
cookies: CookieTypes | None = None,
|
|
2986
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2987
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2988
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
2989
|
+
extensions: RequestExtensions | None = None,
|
|
2990
|
+
) -> OrgPlan:
|
|
2991
|
+
"""Create an organization plan."""
|
|
2992
|
+
pass
|
|
2993
|
+
|
|
2994
|
+
@overload
|
|
2995
|
+
def POST(
|
|
2996
|
+
self,
|
|
2997
|
+
path: Literal["/memoryset"],
|
|
2998
|
+
*,
|
|
2999
|
+
params: None = None,
|
|
3000
|
+
json: CreateMemorysetFromDatasourceRequest,
|
|
3001
|
+
data: None = None,
|
|
3002
|
+
files: None = None,
|
|
3003
|
+
content: None = None,
|
|
3004
|
+
parse_as: Literal["json"] = "json",
|
|
3005
|
+
headers: HeaderTypes | None = None,
|
|
3006
|
+
cookies: CookieTypes | None = None,
|
|
3007
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3008
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3009
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3010
|
+
extensions: RequestExtensions | None = None,
|
|
3011
|
+
) -> MemorysetMetadata:
|
|
3012
|
+
pass
|
|
3013
|
+
|
|
3014
|
+
@overload
|
|
3015
|
+
def POST(
|
|
3016
|
+
self,
|
|
3017
|
+
path: Literal["/memoryset/empty"],
|
|
3018
|
+
*,
|
|
3019
|
+
params: None = None,
|
|
3020
|
+
json: CreateMemorysetRequest,
|
|
3021
|
+
data: None = None,
|
|
3022
|
+
files: None = None,
|
|
3023
|
+
content: None = None,
|
|
3024
|
+
parse_as: Literal["json"] = "json",
|
|
3025
|
+
headers: HeaderTypes | None = None,
|
|
3026
|
+
cookies: CookieTypes | None = None,
|
|
3027
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3028
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3029
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3030
|
+
extensions: RequestExtensions | None = None,
|
|
3031
|
+
) -> MemorysetMetadata:
|
|
3032
|
+
pass
|
|
3033
|
+
|
|
3034
|
+
@overload
|
|
3035
|
+
def POST(
|
|
3036
|
+
self,
|
|
3037
|
+
path: Literal["/memoryset/{name_or_id}/clone"],
|
|
3038
|
+
*,
|
|
3039
|
+
params: PostMemorysetByNameOrIdCloneParams,
|
|
3040
|
+
json: CloneMemorysetRequest,
|
|
3041
|
+
data: None = None,
|
|
3042
|
+
files: None = None,
|
|
3043
|
+
content: None = None,
|
|
3044
|
+
parse_as: Literal["json"] = "json",
|
|
3045
|
+
headers: HeaderTypes | None = None,
|
|
3046
|
+
cookies: CookieTypes | None = None,
|
|
3047
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3048
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3049
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3050
|
+
extensions: RequestExtensions | None = None,
|
|
3051
|
+
) -> MemorysetMetadata:
|
|
3052
|
+
pass
|
|
3053
|
+
|
|
3054
|
+
@overload
|
|
3055
|
+
def POST(
|
|
3056
|
+
self,
|
|
3057
|
+
path: Literal["/batch_delete_memoryset"],
|
|
3058
|
+
*,
|
|
3059
|
+
params: None = None,
|
|
3060
|
+
json: DeleteMemorysetsRequest,
|
|
3061
|
+
data: None = None,
|
|
3062
|
+
files: None = None,
|
|
3063
|
+
content: None = None,
|
|
3064
|
+
parse_as: Literal["json"] = "json",
|
|
3065
|
+
headers: HeaderTypes | None = None,
|
|
3066
|
+
cookies: CookieTypes | None = None,
|
|
3067
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3068
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3069
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3070
|
+
extensions: RequestExtensions | None = None,
|
|
3071
|
+
) -> None:
|
|
3072
|
+
pass
|
|
3073
|
+
|
|
3074
|
+
@overload
|
|
3075
|
+
def POST(
|
|
3076
|
+
self,
|
|
3077
|
+
path: Literal["/gpu/memoryset/{name_or_id}/lookup"],
|
|
3078
|
+
*,
|
|
3079
|
+
params: PostGpuMemorysetByNameOrIdLookupParams,
|
|
3080
|
+
json: LookupRequest,
|
|
3081
|
+
data: None = None,
|
|
3082
|
+
files: None = None,
|
|
3083
|
+
content: None = None,
|
|
3084
|
+
parse_as: Literal["json"] = "json",
|
|
3085
|
+
headers: HeaderTypes | None = None,
|
|
3086
|
+
cookies: CookieTypes | None = None,
|
|
3087
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3088
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3089
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3090
|
+
extensions: RequestExtensions | None = None,
|
|
3091
|
+
) -> list[list[LabeledMemoryLookup | ScoredMemoryLookup]]:
|
|
3092
|
+
pass
|
|
3093
|
+
|
|
3094
|
+
@overload
|
|
3095
|
+
def POST(
|
|
3096
|
+
self,
|
|
3097
|
+
path: Literal["/memoryset/{name_or_id}/memories/get"],
|
|
3098
|
+
*,
|
|
3099
|
+
params: PostMemorysetByNameOrIdMemoriesGetParams,
|
|
3100
|
+
json: GetMemoriesRequest,
|
|
3101
|
+
data: None = None,
|
|
3102
|
+
files: None = None,
|
|
3103
|
+
content: None = None,
|
|
3104
|
+
parse_as: Literal["json"] = "json",
|
|
3105
|
+
headers: HeaderTypes | None = None,
|
|
3106
|
+
cookies: CookieTypes | None = None,
|
|
3107
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3108
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3109
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3110
|
+
extensions: RequestExtensions | None = None,
|
|
3111
|
+
) -> list[LabeledMemory] | list[ScoredMemory]:
|
|
3112
|
+
pass
|
|
3113
|
+
|
|
3114
|
+
@overload
|
|
3115
|
+
def POST(
|
|
3116
|
+
self,
|
|
3117
|
+
path: Literal["/memoryset/{name_or_id}/memories"],
|
|
3118
|
+
*,
|
|
3119
|
+
params: PostMemorysetByNameOrIdMemoriesParams,
|
|
3120
|
+
json: ListMemoriesRequest | None = None,
|
|
3121
|
+
data: None = None,
|
|
3122
|
+
files: None = None,
|
|
3123
|
+
content: None = None,
|
|
3124
|
+
parse_as: Literal["json"] = "json",
|
|
3125
|
+
headers: HeaderTypes | None = None,
|
|
3126
|
+
cookies: CookieTypes | None = None,
|
|
3127
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3128
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3129
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3130
|
+
extensions: RequestExtensions | None = None,
|
|
3131
|
+
) -> list[LabeledMemory] | list[ScoredMemory]:
|
|
3132
|
+
pass
|
|
3133
|
+
|
|
3134
|
+
@overload
|
|
3135
|
+
def POST(
|
|
3136
|
+
self,
|
|
3137
|
+
path: Literal["/memoryset/{name_or_id}/memories/delete"],
|
|
3138
|
+
*,
|
|
3139
|
+
params: PostMemorysetByNameOrIdMemoriesDeleteParams,
|
|
3140
|
+
json: DeleteMemoriesRequest,
|
|
3141
|
+
data: None = None,
|
|
3142
|
+
files: None = None,
|
|
3143
|
+
content: None = None,
|
|
3144
|
+
parse_as: Literal["json"] = "json",
|
|
3145
|
+
headers: HeaderTypes | None = None,
|
|
3146
|
+
cookies: CookieTypes | None = None,
|
|
3147
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3148
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3149
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3150
|
+
extensions: RequestExtensions | None = None,
|
|
3151
|
+
) -> None:
|
|
3152
|
+
pass
|
|
3153
|
+
|
|
3154
|
+
@overload
|
|
3155
|
+
def POST(
|
|
3156
|
+
self,
|
|
3157
|
+
path: Literal["/gpu/memoryset/{name_or_id}/memory"],
|
|
3158
|
+
*,
|
|
3159
|
+
params: PostGpuMemorysetByNameOrIdMemoryParams,
|
|
3160
|
+
json: PostGpuMemorysetByNameOrIdMemoryRequest,
|
|
3161
|
+
data: None = None,
|
|
3162
|
+
files: None = None,
|
|
3163
|
+
content: None = None,
|
|
3164
|
+
parse_as: Literal["json"] = "json",
|
|
3165
|
+
headers: HeaderTypes | None = None,
|
|
3166
|
+
cookies: CookieTypes | None = None,
|
|
3167
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3168
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3169
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3170
|
+
extensions: RequestExtensions | None = None,
|
|
3171
|
+
) -> list[str]:
|
|
3172
|
+
pass
|
|
3173
|
+
|
|
3174
|
+
@overload
|
|
3175
|
+
def POST(
|
|
3176
|
+
self,
|
|
3177
|
+
path: Literal["/memoryset/{name_or_id}/analysis"],
|
|
3178
|
+
*,
|
|
3179
|
+
params: PostMemorysetByNameOrIdAnalysisParams,
|
|
3180
|
+
json: MemorysetAnalysisRequest,
|
|
3181
|
+
data: None = None,
|
|
3182
|
+
files: None = None,
|
|
3183
|
+
content: None = None,
|
|
3184
|
+
parse_as: Literal["json"] = "json",
|
|
3185
|
+
headers: HeaderTypes | None = None,
|
|
3186
|
+
cookies: CookieTypes | None = None,
|
|
3187
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3188
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3189
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3190
|
+
extensions: RequestExtensions | None = None,
|
|
3191
|
+
) -> MemorysetAnalysisResponse:
|
|
3192
|
+
pass
|
|
3193
|
+
|
|
3194
|
+
@overload
|
|
3195
|
+
def POST(
|
|
3196
|
+
self,
|
|
3197
|
+
path: Literal["/memoryset/{name_or_id}/memory/{memory_id}/cascading_edits"],
|
|
3198
|
+
*,
|
|
3199
|
+
params: PostMemorysetByNameOrIdMemoryByMemoryIdCascadingEditsParams,
|
|
3200
|
+
json: CascadeEditSuggestionsRequest,
|
|
3201
|
+
data: None = None,
|
|
3202
|
+
files: None = None,
|
|
3203
|
+
content: None = None,
|
|
3204
|
+
parse_as: Literal["json"] = "json",
|
|
3205
|
+
headers: HeaderTypes | None = None,
|
|
3206
|
+
cookies: CookieTypes | None = None,
|
|
3207
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3208
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3209
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3210
|
+
extensions: RequestExtensions | None = None,
|
|
3211
|
+
) -> list[CascadingEditSuggestion]:
|
|
3212
|
+
pass
|
|
3213
|
+
|
|
3214
|
+
@overload
|
|
3215
|
+
def POST(
|
|
3216
|
+
self,
|
|
3217
|
+
path: Literal["/finetuned_embedding_model"],
|
|
3218
|
+
*,
|
|
3219
|
+
params: None = None,
|
|
3220
|
+
json: FinetuneEmbeddingModelRequest,
|
|
3221
|
+
data: None = None,
|
|
3222
|
+
files: None = None,
|
|
3223
|
+
content: None = None,
|
|
3224
|
+
parse_as: Literal["json"] = "json",
|
|
3225
|
+
headers: HeaderTypes | None = None,
|
|
3226
|
+
cookies: CookieTypes | None = None,
|
|
3227
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3228
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3229
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3230
|
+
extensions: RequestExtensions | None = None,
|
|
3231
|
+
) -> FinetunedEmbeddingModelMetadata:
|
|
3232
|
+
"""Create a finetuned embedding model."""
|
|
3233
|
+
pass
|
|
3234
|
+
|
|
3235
|
+
@overload
|
|
3236
|
+
def POST(
|
|
3237
|
+
self,
|
|
3238
|
+
path: Literal["/gpu/finetuned_embedding_model/{name_or_id}/embedding"],
|
|
3239
|
+
*,
|
|
3240
|
+
params: PostGpuFinetunedEmbeddingModelByNameOrIdEmbeddingParams,
|
|
3241
|
+
json: EmbedRequest,
|
|
3242
|
+
data: None = None,
|
|
3243
|
+
files: None = None,
|
|
3244
|
+
content: None = None,
|
|
3245
|
+
parse_as: Literal["json"] = "json",
|
|
3246
|
+
headers: HeaderTypes | None = None,
|
|
3247
|
+
cookies: CookieTypes | None = None,
|
|
3248
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3249
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3250
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3251
|
+
extensions: RequestExtensions | None = None,
|
|
3252
|
+
) -> list[list[float]]:
|
|
3253
|
+
"""Embed values using a finetuned embedding model."""
|
|
3254
|
+
pass
|
|
3255
|
+
|
|
3256
|
+
@overload
|
|
3257
|
+
def POST(
|
|
3258
|
+
self,
|
|
3259
|
+
path: Literal["/gpu/pretrained_embedding_model/{model_name}/embedding"],
|
|
3260
|
+
*,
|
|
3261
|
+
params: PostGpuPretrainedEmbeddingModelByModelNameEmbeddingParams,
|
|
3262
|
+
json: EmbedRequest,
|
|
3263
|
+
data: None = None,
|
|
3264
|
+
files: None = None,
|
|
3265
|
+
content: None = None,
|
|
3266
|
+
parse_as: Literal["json"] = "json",
|
|
3267
|
+
headers: HeaderTypes | None = None,
|
|
3268
|
+
cookies: CookieTypes | None = None,
|
|
3269
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3270
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3271
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3272
|
+
extensions: RequestExtensions | None = None,
|
|
3273
|
+
) -> list[list[float]]:
|
|
3274
|
+
"""Embed values using a pretrained embedding model."""
|
|
3275
|
+
pass
|
|
3276
|
+
|
|
3277
|
+
@overload
|
|
3278
|
+
def POST(
|
|
3279
|
+
self,
|
|
3280
|
+
path: Literal["/finetuned_embedding_model/{name_or_id}/evaluation"],
|
|
3281
|
+
*,
|
|
3282
|
+
params: PostFinetunedEmbeddingModelByNameOrIdEvaluationParams,
|
|
3283
|
+
json: EmbeddingEvaluationRequest,
|
|
3284
|
+
data: None = None,
|
|
3285
|
+
files: None = None,
|
|
3286
|
+
content: None = None,
|
|
3287
|
+
parse_as: Literal["json"] = "json",
|
|
3288
|
+
headers: HeaderTypes | None = None,
|
|
3289
|
+
cookies: CookieTypes | None = None,
|
|
3290
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3291
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3292
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3293
|
+
extensions: RequestExtensions | None = None,
|
|
3294
|
+
) -> EmbeddingEvaluationResponse:
|
|
3295
|
+
"""Evaluate a finetuned embedding model as a KNN classifier or regressor."""
|
|
3296
|
+
pass
|
|
3297
|
+
|
|
3298
|
+
@overload
|
|
3299
|
+
def POST(
|
|
3300
|
+
self,
|
|
3301
|
+
path: Literal["/pretrained_embedding_model/{model_name}/evaluation"],
|
|
3302
|
+
*,
|
|
3303
|
+
params: PostPretrainedEmbeddingModelByModelNameEvaluationParams,
|
|
3304
|
+
json: EmbeddingEvaluationRequest,
|
|
3305
|
+
data: None = None,
|
|
3306
|
+
files: None = None,
|
|
3307
|
+
content: None = None,
|
|
3308
|
+
parse_as: Literal["json"] = "json",
|
|
3309
|
+
headers: HeaderTypes | None = None,
|
|
3310
|
+
cookies: CookieTypes | None = None,
|
|
3311
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3312
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3313
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3314
|
+
extensions: RequestExtensions | None = None,
|
|
3315
|
+
) -> EmbeddingEvaluationResponse:
|
|
3316
|
+
"""Evaluate a pretrained embedding model as a KNN classifier or regressor."""
|
|
3317
|
+
pass
|
|
3318
|
+
|
|
3319
|
+
@overload
|
|
3320
|
+
def POST(
|
|
3321
|
+
self,
|
|
3322
|
+
path: Literal["/datasource/upload"],
|
|
3323
|
+
*,
|
|
3324
|
+
params: None = None,
|
|
3325
|
+
json: None = None,
|
|
3326
|
+
data: PostDatasourceUploadRequest,
|
|
3327
|
+
files: dict[Literal["files"], FileTypes] | list[tuple[Literal["files"], FileTypes]],
|
|
3328
|
+
content: None = None,
|
|
3329
|
+
parse_as: Literal["json"] = "json",
|
|
3330
|
+
headers: HeaderTypes | None = None,
|
|
3331
|
+
cookies: CookieTypes | None = None,
|
|
3332
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3333
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3334
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3335
|
+
extensions: RequestExtensions | None = None,
|
|
3336
|
+
) -> DatasourceMetadata:
|
|
3337
|
+
"""
|
|
3338
|
+
Create a datasource by uploading files.
|
|
3339
|
+
|
|
3340
|
+
Supports multiple file upload scenarios:
|
|
3341
|
+
- Multiple files: HuggingFace Dataset format (dataset_info.json, state.json, .arrow files, etc.)
|
|
3342
|
+
- Single file: CSV, JSON, JSONL, Parquet, or Pickle files
|
|
3343
|
+
"""
|
|
3344
|
+
pass
|
|
3345
|
+
|
|
3346
|
+
@overload
|
|
3347
|
+
def POST(
|
|
3348
|
+
self,
|
|
3349
|
+
path: Literal["/datasource"],
|
|
3350
|
+
*,
|
|
3351
|
+
params: None = None,
|
|
3352
|
+
json: CreateDatasourceFromContentRequest,
|
|
3353
|
+
data: None = None,
|
|
3354
|
+
files: None = None,
|
|
3355
|
+
content: None = None,
|
|
3356
|
+
parse_as: Literal["json"] = "json",
|
|
3357
|
+
headers: HeaderTypes | None = None,
|
|
3358
|
+
cookies: CookieTypes | None = None,
|
|
3359
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3360
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3361
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3362
|
+
extensions: RequestExtensions | None = None,
|
|
3363
|
+
) -> DatasourceMetadata:
|
|
3364
|
+
"""
|
|
3365
|
+
Create a datasource from JSON content.
|
|
3366
|
+
|
|
3367
|
+
Automatically detects and supports multiple JSON formats:
|
|
3368
|
+
- List of records: [{"col1": val1, "col2": val2}, {"col1": val3, "col2": val4}, ...]
|
|
3369
|
+
- Dictionary of columns: {"col1": [val1, val3, ...], "col2": [val2, val4, ...]}
|
|
3370
|
+
"""
|
|
3371
|
+
pass
|
|
3372
|
+
|
|
3373
|
+
@overload
|
|
3374
|
+
def POST(
|
|
3375
|
+
self,
|
|
3376
|
+
path: Literal["/datasource/{name_or_id}/rows"],
|
|
3377
|
+
*,
|
|
3378
|
+
params: PostDatasourceByNameOrIdRowsParams,
|
|
3379
|
+
json: GetDatasourceRowsRequest,
|
|
3380
|
+
data: None = None,
|
|
3381
|
+
files: None = None,
|
|
3382
|
+
content: None = None,
|
|
3383
|
+
parse_as: Literal["json"] = "json",
|
|
3384
|
+
headers: HeaderTypes | None = None,
|
|
3385
|
+
cookies: CookieTypes | None = None,
|
|
3386
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3387
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3388
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3389
|
+
extensions: RequestExtensions | None = None,
|
|
3390
|
+
) -> list[dict[str, Any]]:
|
|
3391
|
+
"""Get rows from a specific datasource with optional filtering."""
|
|
3392
|
+
pass
|
|
3393
|
+
|
|
3394
|
+
@overload
|
|
3395
|
+
def POST(
|
|
3396
|
+
self,
|
|
3397
|
+
path: Literal["/datasource/{name_or_id}/rows/count"],
|
|
3398
|
+
*,
|
|
3399
|
+
params: PostDatasourceByNameOrIdRowsCountParams,
|
|
3400
|
+
json: GetDatasourceRowCountRequest,
|
|
3401
|
+
data: None = None,
|
|
3402
|
+
files: None = None,
|
|
3403
|
+
content: None = None,
|
|
3404
|
+
parse_as: Literal["json"] = "json",
|
|
3405
|
+
headers: HeaderTypes | None = None,
|
|
3406
|
+
cookies: CookieTypes | None = None,
|
|
3407
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3408
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3409
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3410
|
+
extensions: RequestExtensions | None = None,
|
|
3411
|
+
) -> int:
|
|
3412
|
+
"""Get row count from a specific datasource with optional filtering."""
|
|
3413
|
+
pass
|
|
3414
|
+
|
|
3415
|
+
@overload
|
|
3416
|
+
def POST(
|
|
3417
|
+
self,
|
|
3418
|
+
path: Literal["/datasource/bootstrap_memory_data"],
|
|
3419
|
+
*,
|
|
3420
|
+
params: None = None,
|
|
3421
|
+
json: BootstrapLabeledMemoryDataInput,
|
|
3422
|
+
data: None = None,
|
|
3423
|
+
files: None = None,
|
|
3424
|
+
content: None = None,
|
|
3425
|
+
parse_as: Literal["json"] = "json",
|
|
3426
|
+
headers: HeaderTypes | None = None,
|
|
3427
|
+
cookies: CookieTypes | None = None,
|
|
3428
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3429
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3430
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3431
|
+
extensions: RequestExtensions | None = None,
|
|
3432
|
+
) -> BootstrapLabeledMemoryDataResult:
|
|
3433
|
+
"""
|
|
3434
|
+
Bootstrap memory data using an AI agent.
|
|
3435
|
+
|
|
3436
|
+
This endpoint uses the bootstrap labeled memory data agent to generate
|
|
3437
|
+
high-quality, diverse training examples for a classification model.
|
|
3438
|
+
"""
|
|
3439
|
+
pass
|
|
3440
|
+
|
|
3441
|
+
@overload
|
|
3442
|
+
def POST(
|
|
3443
|
+
self,
|
|
3444
|
+
path: Literal["/classification_model"],
|
|
3445
|
+
*,
|
|
3446
|
+
params: None = None,
|
|
3447
|
+
json: CreateClassificationModelRequest,
|
|
3448
|
+
data: None = None,
|
|
3449
|
+
files: None = None,
|
|
3450
|
+
content: None = None,
|
|
3451
|
+
parse_as: Literal["json"] = "json",
|
|
3452
|
+
headers: HeaderTypes | None = None,
|
|
3453
|
+
cookies: CookieTypes | None = None,
|
|
3454
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3455
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3456
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3457
|
+
extensions: RequestExtensions | None = None,
|
|
3458
|
+
) -> ClassificationModelMetadata:
|
|
3459
|
+
pass
|
|
3460
|
+
|
|
3461
|
+
@overload
|
|
3462
|
+
def POST(
|
|
3463
|
+
self,
|
|
3464
|
+
path: Literal["/regression_model"],
|
|
3465
|
+
*,
|
|
3466
|
+
params: None = None,
|
|
3467
|
+
json: CreateRegressionModelRequest,
|
|
3468
|
+
data: None = None,
|
|
3469
|
+
files: None = None,
|
|
3470
|
+
content: None = None,
|
|
3471
|
+
parse_as: Literal["json"] = "json",
|
|
3472
|
+
headers: HeaderTypes | None = None,
|
|
3473
|
+
cookies: CookieTypes | None = None,
|
|
3474
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3475
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3476
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3477
|
+
extensions: RequestExtensions | None = None,
|
|
3478
|
+
) -> RegressionModelMetadata:
|
|
3479
|
+
pass
|
|
3480
|
+
|
|
3481
|
+
@overload
|
|
3482
|
+
def POST(
|
|
3483
|
+
self,
|
|
3484
|
+
path: Literal["/gpu/classification_model/{name_or_id}/prediction"],
|
|
3485
|
+
*,
|
|
3486
|
+
params: PostGpuClassificationModelByNameOrIdPredictionParams,
|
|
3487
|
+
json: ClassificationPredictionRequest,
|
|
3488
|
+
data: None = None,
|
|
3489
|
+
files: None = None,
|
|
3490
|
+
content: None = None,
|
|
3491
|
+
parse_as: Literal["json"] = "json",
|
|
3492
|
+
headers: HeaderTypes | None = None,
|
|
3493
|
+
cookies: CookieTypes | None = None,
|
|
3494
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3495
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3496
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3497
|
+
extensions: RequestExtensions | None = None,
|
|
3498
|
+
) -> list[BaseLabelPredictionResult]:
|
|
3499
|
+
pass
|
|
3500
|
+
|
|
3501
|
+
@overload
|
|
3502
|
+
def POST(
|
|
3503
|
+
self,
|
|
3504
|
+
path: Literal["/classification_model/{name_or_id}/prediction"],
|
|
3505
|
+
*,
|
|
3506
|
+
params: PostClassificationModelByNameOrIdPredictionParams,
|
|
3507
|
+
json: ClassificationPredictionRequest,
|
|
3508
|
+
data: None = None,
|
|
3509
|
+
files: None = None,
|
|
3510
|
+
content: None = None,
|
|
3511
|
+
parse_as: Literal["json"] = "json",
|
|
3512
|
+
headers: HeaderTypes | None = None,
|
|
3513
|
+
cookies: CookieTypes | None = None,
|
|
3514
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3515
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3516
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3517
|
+
extensions: RequestExtensions | None = None,
|
|
3518
|
+
) -> list[BaseLabelPredictionResult]:
|
|
3519
|
+
pass
|
|
3520
|
+
|
|
3521
|
+
@overload
|
|
3522
|
+
def POST(
|
|
3523
|
+
self,
|
|
3524
|
+
path: Literal["/gpu/regression_model/{name_or_id}/prediction"],
|
|
3525
|
+
*,
|
|
3526
|
+
params: PostGpuRegressionModelByNameOrIdPredictionParams,
|
|
3527
|
+
json: RegressionPredictionRequest,
|
|
3528
|
+
data: None = None,
|
|
3529
|
+
files: None = None,
|
|
3530
|
+
content: None = None,
|
|
3531
|
+
parse_as: Literal["json"] = "json",
|
|
3532
|
+
headers: HeaderTypes | None = None,
|
|
3533
|
+
cookies: CookieTypes | None = None,
|
|
3534
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3535
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3536
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3537
|
+
extensions: RequestExtensions | None = None,
|
|
3538
|
+
) -> list[BaseScorePredictionResult]:
|
|
3539
|
+
pass
|
|
3540
|
+
|
|
3541
|
+
@overload
|
|
3542
|
+
def POST(
|
|
3543
|
+
self,
|
|
3544
|
+
path: Literal["/regression_model/{name_or_id}/prediction"],
|
|
3545
|
+
*,
|
|
3546
|
+
params: PostRegressionModelByNameOrIdPredictionParams,
|
|
3547
|
+
json: RegressionPredictionRequest,
|
|
3548
|
+
data: None = None,
|
|
3549
|
+
files: None = None,
|
|
3550
|
+
content: None = None,
|
|
3551
|
+
parse_as: Literal["json"] = "json",
|
|
3552
|
+
headers: HeaderTypes | None = None,
|
|
3553
|
+
cookies: CookieTypes | None = None,
|
|
3554
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3555
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3556
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3557
|
+
extensions: RequestExtensions | None = None,
|
|
3558
|
+
) -> list[BaseScorePredictionResult]:
|
|
3559
|
+
pass
|
|
3560
|
+
|
|
3561
|
+
@overload
|
|
3562
|
+
def POST(
|
|
3563
|
+
self,
|
|
3564
|
+
path: Literal["/classification_model/{model_name_or_id}/evaluation"],
|
|
3565
|
+
*,
|
|
3566
|
+
params: PostClassificationModelByModelNameOrIdEvaluationParams,
|
|
3567
|
+
json: ClassificationEvaluationRequest,
|
|
3568
|
+
data: None = None,
|
|
3569
|
+
files: None = None,
|
|
3570
|
+
content: None = None,
|
|
3571
|
+
parse_as: Literal["json"] = "json",
|
|
3572
|
+
headers: HeaderTypes | None = None,
|
|
3573
|
+
cookies: CookieTypes | None = None,
|
|
3574
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3575
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3576
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3577
|
+
extensions: RequestExtensions | None = None,
|
|
3578
|
+
) -> EvaluationResponse:
|
|
3579
|
+
pass
|
|
3580
|
+
|
|
3581
|
+
@overload
|
|
3582
|
+
def POST(
|
|
3583
|
+
self,
|
|
3584
|
+
path: Literal["/regression_model/{model_name_or_id}/evaluation"],
|
|
3585
|
+
*,
|
|
3586
|
+
params: PostRegressionModelByModelNameOrIdEvaluationParams,
|
|
3587
|
+
json: RegressionEvaluationRequest,
|
|
3588
|
+
data: None = None,
|
|
3589
|
+
files: None = None,
|
|
3590
|
+
content: None = None,
|
|
3591
|
+
parse_as: Literal["json"] = "json",
|
|
3592
|
+
headers: HeaderTypes | None = None,
|
|
3593
|
+
cookies: CookieTypes | None = None,
|
|
3594
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3595
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3596
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3597
|
+
extensions: RequestExtensions | None = None,
|
|
3598
|
+
) -> EvaluationResponse:
|
|
3599
|
+
pass
|
|
3600
|
+
|
|
3601
|
+
@overload
|
|
3602
|
+
def POST(
|
|
3603
|
+
self,
|
|
3604
|
+
path: Literal["/telemetry/prediction"],
|
|
3605
|
+
*,
|
|
3606
|
+
params: None = None,
|
|
3607
|
+
json: ListPredictionsRequest | None = None,
|
|
3608
|
+
data: None = None,
|
|
3609
|
+
files: None = None,
|
|
3610
|
+
content: None = None,
|
|
3611
|
+
parse_as: Literal["json"] = "json",
|
|
3612
|
+
headers: HeaderTypes | None = None,
|
|
3613
|
+
cookies: CookieTypes | None = None,
|
|
3614
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3615
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3616
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3617
|
+
extensions: RequestExtensions | None = None,
|
|
3618
|
+
) -> list[LabelPredictionWithMemoriesAndFeedback | ScorePredictionWithMemoriesAndFeedback]:
|
|
3619
|
+
"""List predictions with optional filtering and sorting."""
|
|
3620
|
+
pass
|
|
3621
|
+
|
|
3622
|
+
@overload
|
|
3623
|
+
def POST(
|
|
3624
|
+
self,
|
|
3625
|
+
path: Literal["/telemetry/prediction/count"],
|
|
3626
|
+
*,
|
|
3627
|
+
params: None = None,
|
|
3628
|
+
json: CountPredictionsRequest | None = None,
|
|
3629
|
+
data: None = None,
|
|
3630
|
+
files: None = None,
|
|
3631
|
+
content: None = None,
|
|
3632
|
+
parse_as: Literal["json"] = "json",
|
|
3633
|
+
headers: HeaderTypes | None = None,
|
|
3634
|
+
cookies: CookieTypes | None = None,
|
|
3635
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3636
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3637
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3638
|
+
extensions: RequestExtensions | None = None,
|
|
3639
|
+
) -> int:
|
|
3640
|
+
"""Count predictions with optional filtering."""
|
|
3641
|
+
pass
|
|
3642
|
+
|
|
3643
|
+
@overload
|
|
3644
|
+
def POST(
|
|
3645
|
+
self,
|
|
3646
|
+
path: Literal["/telemetry/memories"],
|
|
3647
|
+
*,
|
|
3648
|
+
params: None = None,
|
|
3649
|
+
json: TelemetryMemoriesRequest,
|
|
3650
|
+
data: None = None,
|
|
3651
|
+
files: None = None,
|
|
3652
|
+
content: None = None,
|
|
3653
|
+
parse_as: Literal["json"] = "json",
|
|
3654
|
+
headers: HeaderTypes | None = None,
|
|
3655
|
+
cookies: CookieTypes | None = None,
|
|
3656
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3657
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3658
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3659
|
+
extensions: RequestExtensions | None = None,
|
|
3660
|
+
) -> PaginatedUnionLabeledMemoryWithFeedbackMetricsScoredMemoryWithFeedbackMetrics:
|
|
3661
|
+
"""
|
|
3662
|
+
List memories with feedback metrics.
|
|
3663
|
+
**Note**: This endpoint will ONLY return memories that have been used in a prediction.
|
|
3664
|
+
If you want to query ALL memories WITHOUT feedback metrics, use the query_memoryset endpoint.
|
|
3665
|
+
"""
|
|
3666
|
+
pass
|
|
3667
|
+
|
|
3668
|
+
@overload
|
|
3669
|
+
def POST(
|
|
3670
|
+
self,
|
|
3671
|
+
path: Literal["/agents/bootstrap_classification_model"],
|
|
3672
|
+
*,
|
|
3673
|
+
params: None = None,
|
|
3674
|
+
json: BootstrapClassificationModelRequest,
|
|
3675
|
+
data: None = None,
|
|
3676
|
+
files: None = None,
|
|
3677
|
+
content: None = None,
|
|
3678
|
+
parse_as: Literal["json"] = "json",
|
|
3679
|
+
headers: HeaderTypes | None = None,
|
|
3680
|
+
cookies: CookieTypes | None = None,
|
|
3681
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3682
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3683
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3684
|
+
extensions: RequestExtensions | None = None,
|
|
3685
|
+
) -> BootstrapClassificationModelResponse:
|
|
3686
|
+
"""
|
|
3687
|
+
Bootstrap a classification model by creating a memoryset with generated memories and a classification model.
|
|
3688
|
+
|
|
3689
|
+
This endpoint uses the bootstrap_labeled_memory_data agent to generate:
|
|
3690
|
+
1. Memoryset configuration with appropriate settings
|
|
3691
|
+
2. Model configuration with optimal parameters
|
|
3692
|
+
3. High-quality training memories for each label
|
|
3693
|
+
|
|
3694
|
+
The process involves:
|
|
3695
|
+
1. Calling the agent to generate configurations and memories
|
|
3696
|
+
2. Creating a datasource from the generated memories
|
|
3697
|
+
3. Creating a memoryset from the datasource
|
|
3698
|
+
4. Creating a classification model from the memoryset
|
|
3699
|
+
"""
|
|
3700
|
+
pass
|
|
3701
|
+
|
|
3702
|
+
def POST(
|
|
3703
|
+
self,
|
|
3704
|
+
path: str,
|
|
3705
|
+
*,
|
|
3706
|
+
params: Mapping[str, Any] | None = None,
|
|
3707
|
+
json: Any | None = None,
|
|
3708
|
+
data: Mapping[str, Any] | None = None,
|
|
3709
|
+
content: RequestContent | None = None,
|
|
3710
|
+
files: dict[Any, FileTypes] | list[tuple[Any, FileTypes]] | None = None,
|
|
3711
|
+
parse_as: Literal["json", "text"] | None = "json",
|
|
3712
|
+
headers: HeaderTypes | None = None,
|
|
3713
|
+
cookies: CookieTypes | None = None,
|
|
3714
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3715
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3716
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3717
|
+
extensions: RequestExtensions | None = None,
|
|
3718
|
+
) -> Any:
|
|
3719
|
+
path_params, query_params = self._parse_params(params or {}, path)
|
|
3720
|
+
res = self.post(
|
|
3721
|
+
path.format(**path_params),
|
|
3722
|
+
params=query_params,
|
|
3723
|
+
content=content,
|
|
3724
|
+
data=data,
|
|
3725
|
+
files=files,
|
|
3726
|
+
json=json,
|
|
3727
|
+
headers=headers,
|
|
3728
|
+
cookies=cookies,
|
|
3729
|
+
auth=auth,
|
|
3730
|
+
follow_redirects=follow_redirects,
|
|
3731
|
+
timeout=timeout,
|
|
3732
|
+
extensions=extensions,
|
|
3733
|
+
)
|
|
3734
|
+
res.raise_for_status()
|
|
3735
|
+
return (
|
|
3736
|
+
None
|
|
3737
|
+
if res.status_code == 204
|
|
3738
|
+
else res.json() if parse_as == "json" else res.text if parse_as == "text" else res.content
|
|
3739
|
+
)
|
|
3740
|
+
|
|
3741
|
+
@overload
|
|
3742
|
+
def PUT(
|
|
3743
|
+
self,
|
|
3744
|
+
path: Literal["/auth/org/plan"],
|
|
3745
|
+
*,
|
|
3746
|
+
params: None = None,
|
|
3747
|
+
json: UpdateOrgPlanRequest,
|
|
3748
|
+
data: None = None,
|
|
3749
|
+
files: None = None,
|
|
3750
|
+
content: None = None,
|
|
3751
|
+
parse_as: Literal["json"] = "json",
|
|
3752
|
+
headers: HeaderTypes | None = None,
|
|
3753
|
+
cookies: CookieTypes | None = None,
|
|
3754
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3755
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3756
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3757
|
+
extensions: RequestExtensions | None = None,
|
|
3758
|
+
) -> OrgPlan:
|
|
3759
|
+
"""Update the organization plan."""
|
|
3760
|
+
pass
|
|
3761
|
+
|
|
3762
|
+
@overload
|
|
3763
|
+
def PUT(
|
|
3764
|
+
self,
|
|
3765
|
+
path: Literal["/telemetry/prediction/feedback"],
|
|
3766
|
+
*,
|
|
3767
|
+
params: None = None,
|
|
3768
|
+
json: PutTelemetryPredictionFeedbackRequest,
|
|
3769
|
+
data: None = None,
|
|
3770
|
+
files: None = None,
|
|
3771
|
+
content: None = None,
|
|
3772
|
+
parse_as: Literal["json"] = "json",
|
|
3773
|
+
headers: HeaderTypes | None = None,
|
|
3774
|
+
cookies: CookieTypes | None = None,
|
|
3775
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3776
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3777
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3778
|
+
extensions: RequestExtensions | None = None,
|
|
3779
|
+
) -> PredictionFeedbackResult:
|
|
3780
|
+
"""Record feedback for predictions, handling updates, deletions, and insertions."""
|
|
3781
|
+
pass
|
|
3782
|
+
|
|
3783
|
+
def PUT(
|
|
3784
|
+
self,
|
|
3785
|
+
path: str,
|
|
3786
|
+
*,
|
|
3787
|
+
params: Mapping[str, Any] | None = None,
|
|
3788
|
+
json: Any | None = None,
|
|
3789
|
+
data: Mapping[str, Any] | None = None,
|
|
3790
|
+
content: RequestContent | None = None,
|
|
3791
|
+
files: dict[Any, FileTypes] | list[tuple[Any, FileTypes]] | None = None,
|
|
3792
|
+
parse_as: Literal["json", "text"] | None = "json",
|
|
3793
|
+
headers: HeaderTypes | None = None,
|
|
3794
|
+
cookies: CookieTypes | None = None,
|
|
3795
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3796
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3797
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3798
|
+
extensions: RequestExtensions | None = None,
|
|
3799
|
+
) -> Any:
|
|
3800
|
+
path_params, query_params = self._parse_params(params or {}, path)
|
|
3801
|
+
res = self.put(
|
|
3802
|
+
path.format(**path_params),
|
|
3803
|
+
params=query_params,
|
|
3804
|
+
content=content,
|
|
3805
|
+
data=data,
|
|
3806
|
+
files=files,
|
|
3807
|
+
json=json,
|
|
3808
|
+
headers=headers,
|
|
3809
|
+
cookies=cookies,
|
|
3810
|
+
auth=auth,
|
|
3811
|
+
follow_redirects=follow_redirects,
|
|
3812
|
+
timeout=timeout,
|
|
3813
|
+
extensions=extensions,
|
|
3814
|
+
)
|
|
3815
|
+
res.raise_for_status()
|
|
3816
|
+
return (
|
|
3817
|
+
None
|
|
3818
|
+
if res.status_code == 204
|
|
3819
|
+
else res.json() if parse_as == "json" else res.text if parse_as == "text" else res.content
|
|
3820
|
+
)
|
|
3821
|
+
|
|
3822
|
+
@overload
|
|
3823
|
+
def PATCH(
|
|
3824
|
+
self,
|
|
3825
|
+
path: Literal["/memoryset/{name_or_id}"],
|
|
3826
|
+
*,
|
|
3827
|
+
params: PatchMemorysetByNameOrIdParams,
|
|
3828
|
+
json: MemorysetUpdate,
|
|
3829
|
+
data: None = None,
|
|
3830
|
+
files: None = None,
|
|
3831
|
+
content: None = None,
|
|
3832
|
+
parse_as: Literal["json"] = "json",
|
|
3833
|
+
headers: HeaderTypes | None = None,
|
|
3834
|
+
cookies: CookieTypes | None = None,
|
|
3835
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3836
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3837
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3838
|
+
extensions: RequestExtensions | None = None,
|
|
3839
|
+
) -> MemorysetMetadata:
|
|
3840
|
+
pass
|
|
3841
|
+
|
|
3842
|
+
@overload
|
|
3843
|
+
def PATCH(
|
|
3844
|
+
self,
|
|
3845
|
+
path: Literal["/gpu/memoryset/{name_or_id}/memory"],
|
|
3846
|
+
*,
|
|
3847
|
+
params: PatchGpuMemorysetByNameOrIdMemoryParams,
|
|
3848
|
+
json: PatchGpuMemorysetByNameOrIdMemoryRequest,
|
|
3849
|
+
data: None = None,
|
|
3850
|
+
files: None = None,
|
|
3851
|
+
content: None = None,
|
|
3852
|
+
parse_as: Literal["json"] = "json",
|
|
3853
|
+
headers: HeaderTypes | None = None,
|
|
3854
|
+
cookies: CookieTypes | None = None,
|
|
3855
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3856
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3857
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3858
|
+
extensions: RequestExtensions | None = None,
|
|
3859
|
+
) -> LabeledMemory | ScoredMemory:
|
|
3860
|
+
pass
|
|
3861
|
+
|
|
3862
|
+
@overload
|
|
3863
|
+
def PATCH(
|
|
3864
|
+
self,
|
|
3865
|
+
path: Literal["/gpu/memoryset/{name_or_id}/memories"],
|
|
3866
|
+
*,
|
|
3867
|
+
params: PatchGpuMemorysetByNameOrIdMemoriesParams,
|
|
3868
|
+
json: PatchGpuMemorysetByNameOrIdMemoriesRequest,
|
|
3869
|
+
data: None = None,
|
|
3870
|
+
files: None = None,
|
|
3871
|
+
content: None = None,
|
|
3872
|
+
parse_as: Literal["json"] = "json",
|
|
3873
|
+
headers: HeaderTypes | None = None,
|
|
3874
|
+
cookies: CookieTypes | None = None,
|
|
3875
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3876
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3877
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3878
|
+
extensions: RequestExtensions | None = None,
|
|
3879
|
+
) -> list[LabeledMemory] | list[ScoredMemory]:
|
|
3880
|
+
pass
|
|
3881
|
+
|
|
3882
|
+
@overload
|
|
3883
|
+
def PATCH(
|
|
3884
|
+
self,
|
|
3885
|
+
path: Literal["/classification_model/{name_or_id}"],
|
|
3886
|
+
*,
|
|
3887
|
+
params: PatchClassificationModelByNameOrIdParams,
|
|
3888
|
+
json: PredictiveModelUpdate,
|
|
3889
|
+
data: None = None,
|
|
3890
|
+
files: None = None,
|
|
3891
|
+
content: None = None,
|
|
3892
|
+
parse_as: Literal["json"] = "json",
|
|
3893
|
+
headers: HeaderTypes | None = None,
|
|
3894
|
+
cookies: CookieTypes | None = None,
|
|
3895
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3896
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3897
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3898
|
+
extensions: RequestExtensions | None = None,
|
|
3899
|
+
) -> ClassificationModelMetadata:
|
|
3900
|
+
pass
|
|
3901
|
+
|
|
3902
|
+
@overload
|
|
3903
|
+
def PATCH(
|
|
3904
|
+
self,
|
|
3905
|
+
path: Literal["/regression_model/{name_or_id}"],
|
|
3906
|
+
*,
|
|
3907
|
+
params: PatchRegressionModelByNameOrIdParams,
|
|
3908
|
+
json: PredictiveModelUpdate,
|
|
3909
|
+
data: None = None,
|
|
3910
|
+
files: None = None,
|
|
3911
|
+
content: None = None,
|
|
3912
|
+
parse_as: Literal["json"] = "json",
|
|
3913
|
+
headers: HeaderTypes | None = None,
|
|
3914
|
+
cookies: CookieTypes | None = None,
|
|
3915
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3916
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3917
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3918
|
+
extensions: RequestExtensions | None = None,
|
|
3919
|
+
) -> RegressionModelMetadata:
|
|
3920
|
+
pass
|
|
3921
|
+
|
|
3922
|
+
@overload
|
|
3923
|
+
def PATCH(
|
|
3924
|
+
self,
|
|
3925
|
+
path: Literal["/telemetry/prediction/{prediction_id}"],
|
|
3926
|
+
*,
|
|
3927
|
+
params: PatchTelemetryPredictionByPredictionIdParams,
|
|
3928
|
+
json: UpdatePredictionRequest,
|
|
3929
|
+
data: None = None,
|
|
3930
|
+
files: None = None,
|
|
3931
|
+
content: None = None,
|
|
3932
|
+
parse_as: Literal["json"] = "json",
|
|
3933
|
+
headers: HeaderTypes | None = None,
|
|
3934
|
+
cookies: CookieTypes | None = None,
|
|
3935
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3936
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3937
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3938
|
+
extensions: RequestExtensions | None = None,
|
|
3939
|
+
) -> Any:
|
|
3940
|
+
"""Update a prediction with new expected values, tags, or memory ID."""
|
|
3941
|
+
pass
|
|
3942
|
+
|
|
3943
|
+
def PATCH(
|
|
3944
|
+
self,
|
|
3945
|
+
path: str,
|
|
3946
|
+
*,
|
|
3947
|
+
params: Mapping[str, Any] | None = None,
|
|
3948
|
+
json: Any | None = None,
|
|
3949
|
+
data: Mapping[str, Any] | None = None,
|
|
3950
|
+
content: RequestContent | None = None,
|
|
3951
|
+
files: dict[Any, FileTypes] | list[tuple[Any, FileTypes]] | None = None,
|
|
3952
|
+
parse_as: Literal["json", "text"] | None = "json",
|
|
3953
|
+
headers: HeaderTypes | None = None,
|
|
3954
|
+
cookies: CookieTypes | None = None,
|
|
3955
|
+
auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3956
|
+
follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3957
|
+
timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
|
|
3958
|
+
extensions: RequestExtensions | None = None,
|
|
3959
|
+
) -> Any:
|
|
3960
|
+
path_params, query_params = self._parse_params(params or {}, path)
|
|
3961
|
+
res = self.patch(
|
|
3962
|
+
path.format(**path_params),
|
|
3963
|
+
params=query_params,
|
|
3964
|
+
content=content,
|
|
3965
|
+
data=data,
|
|
3966
|
+
files=files,
|
|
3967
|
+
json=json,
|
|
3968
|
+
headers=headers,
|
|
3969
|
+
cookies=cookies,
|
|
3970
|
+
auth=auth,
|
|
3971
|
+
follow_redirects=follow_redirects,
|
|
3972
|
+
timeout=timeout,
|
|
3973
|
+
extensions=extensions,
|
|
3974
|
+
)
|
|
3975
|
+
res.raise_for_status()
|
|
3976
|
+
return (
|
|
3977
|
+
None
|
|
3978
|
+
if res.status_code == 204
|
|
3979
|
+
else res.json() if parse_as == "json" else res.text if parse_as == "text" else res.content
|
|
3980
|
+
)
|
|
3981
|
+
|
|
3982
|
+
@staticmethod
|
|
3983
|
+
def _raise_error_for_response(response: Response) -> None:
|
|
3984
|
+
if response.status_code == 401:
|
|
3985
|
+
raise ValueError("Invalid API key")
|
|
3986
|
+
# elif response.status_code == 402:
|
|
3987
|
+
# res = cast(QuotaExceededErrorResponse, json.loads(response.read().decode(response.encoding or "utf-8")))
|
|
3988
|
+
# raise RuntimeError(
|
|
3989
|
+
# f"{res['quota_type'].replace('_', ' ').title()} limit reached ({res['current']}/{res['quota_limit']})"
|
|
3990
|
+
# )
|
|
3991
|
+
elif response.status_code == 403:
|
|
3992
|
+
raise PermissionError(json.loads(response.read().decode(response.encoding or "utf-8"))["reason"])
|
|
3993
|
+
elif response.status_code == 404:
|
|
3994
|
+
res = cast(NotFoundErrorResponse, json.loads(response.read().decode(response.encoding or "utf-8")))
|
|
3995
|
+
if res["resource"] is not None:
|
|
3996
|
+
raise LookupError(f"The {res['resource']} you are looking for does not exist")
|
|
3997
|
+
else:
|
|
3998
|
+
raise RuntimeError(f"Unknown API route: {response.url}")
|
|
3999
|
+
elif response.status_code == 405:
|
|
4000
|
+
raise RuntimeError(f"Unknown method {response.request.method} for API route: {response.url}")
|
|
4001
|
+
elif response.status_code == 409:
|
|
4002
|
+
res = cast(
|
|
4003
|
+
ConstraintViolationErrorResponse, json.loads(response.read().decode(response.encoding or "utf-8"))
|
|
4004
|
+
)
|
|
4005
|
+
raise RuntimeError(res["constraint"])
|
|
4006
|
+
elif response.status_code == 422:
|
|
4007
|
+
res = cast(InvalidInputErrorResponse, json.loads(response.read().decode(response.encoding or "utf-8")))
|
|
4008
|
+
issues = [f"{issue['loc'][-1]}: {issue['msg']}" for issue in res["validation_issues"]]
|
|
4009
|
+
raise ValueError("Invalid input:\n\t" + "\n\t".join(issues))
|
|
4010
|
+
elif response.status_code == 500:
|
|
4011
|
+
res = cast(InternalServerErrorResponse, json.loads(response.read().decode(response.encoding or "utf-8")))
|
|
4012
|
+
raise RuntimeError(f"Unexpected server error: {res['message']}")
|
|
4013
|
+
elif response.status_code == 503:
|
|
4014
|
+
raise RuntimeError("Orca API is currently unavailable, please try again later")
|
|
4015
|
+
elif response.status_code >= 400:
|
|
4016
|
+
raise RuntimeError(f"Unexpected status code: {response.status_code}")
|
|
4017
|
+
|
|
4018
|
+
@staticmethod
|
|
4019
|
+
def _instrument_request(request: Request) -> None:
|
|
4020
|
+
request.headers["X-Request-ID"] = str(uuid.uuid4())
|
|
4021
|
+
|
|
4022
|
+
def __init__(
|
|
4023
|
+
self,
|
|
4024
|
+
*,
|
|
4025
|
+
api_key: str | None = None,
|
|
4026
|
+
base_url: URL | str = "",
|
|
4027
|
+
headers: HeaderTypes | None = None,
|
|
4028
|
+
transport: BaseTransport | None = None,
|
|
4029
|
+
timeout: TimeoutTypes | None = None,
|
|
4030
|
+
limits: Limits | None = None,
|
|
4031
|
+
max_redirects: int = 20,
|
|
4032
|
+
event_hooks: None | (Mapping[str, list[Callable[..., Any]]]) = None,
|
|
4033
|
+
http1: bool = True,
|
|
4034
|
+
http2: bool = False,
|
|
4035
|
+
proxy: str | URL | Proxy | None = None,
|
|
4036
|
+
log_level: int = logging.WARNING,
|
|
4037
|
+
) -> None:
|
|
4038
|
+
"""
|
|
4039
|
+
Initialize an OrcaAPI httpx client
|
|
4040
|
+
|
|
4041
|
+
Params:
|
|
4042
|
+
api_key: API key to use for authentication, will default to ORCA_API_KEY if not set.
|
|
4043
|
+
base_url: URL of the OrcaAPI, will default to ORCA_API_URL or the cloud API URL if not set.
|
|
4044
|
+
"""
|
|
4045
|
+
logging.getLogger("httpx").setLevel(log_level)
|
|
4046
|
+
logging.getLogger("httpcore").setLevel(log_level)
|
|
4047
|
+
super().__init__(
|
|
4048
|
+
headers={"Api-Key": api_key or os.environ.get("ORCA_API_KEY", "")} | dict(Headers(headers or {}).items()),
|
|
4049
|
+
http1=http1,
|
|
4050
|
+
http2=http2,
|
|
4051
|
+
proxy=proxy,
|
|
4052
|
+
timeout=timeout or Timeout(connect=3, read=20, write=10, pool=5),
|
|
4053
|
+
follow_redirects=True,
|
|
4054
|
+
limits=limits or Limits(max_connections=100, max_keepalive_connections=20),
|
|
4055
|
+
max_redirects=max_redirects,
|
|
4056
|
+
event_hooks=event_hooks
|
|
4057
|
+
or {"request": [self._instrument_request], "response": [self._raise_error_for_response]},
|
|
4058
|
+
base_url=base_url or os.environ.get("ORCA_API_URL", "https://api.orcadb.ai/"),
|
|
4059
|
+
transport=transport
|
|
4060
|
+
or RetryTransport(
|
|
4061
|
+
transport=HTTPTransport(),
|
|
4062
|
+
retry=Retry(
|
|
4063
|
+
total=5,
|
|
4064
|
+
backoff_factor=0.5,
|
|
4065
|
+
allowed_methods=["GET", "POST", "PUT", "PATCH", "DELETE"],
|
|
4066
|
+
status_forcelist=[429, 500, 502, 503, 504],
|
|
4067
|
+
),
|
|
4068
|
+
),
|
|
4069
|
+
)
|
|
4070
|
+
|
|
4071
|
+
@property
|
|
4072
|
+
def api_key(self) -> str:
|
|
4073
|
+
return self.headers["Api-Key"]
|
|
4074
|
+
|
|
4075
|
+
@api_key.setter
|
|
4076
|
+
def api_key(self, api_key: str) -> None:
|
|
4077
|
+
self.headers.update(Headers({"Api-Key": api_key}))
|
|
4078
|
+
|
|
4079
|
+
client_ctx = ContextVar[Self | None]("orca_client", default=None)
|
|
4080
|
+
default_client: Self | None = None
|
|
4081
|
+
|
|
4082
|
+
@contextmanager
|
|
4083
|
+
def use(self) -> Generator[None, None, None]:
|
|
4084
|
+
"""Context manager to inject this client into any OrcaSDK methods"""
|
|
4085
|
+
token = self.client_ctx.set(self)
|
|
4086
|
+
try:
|
|
4087
|
+
yield
|
|
4088
|
+
finally:
|
|
4089
|
+
self.client_ctx.reset(token)
|
|
4090
|
+
|
|
4091
|
+
@classmethod
|
|
4092
|
+
def _resolve_client(cls, client: Self | None = None) -> Self:
|
|
4093
|
+
client = client or cls.client_ctx.get() or cls.default_client
|
|
4094
|
+
if not client:
|
|
4095
|
+
client = cls.default_client = cls()
|
|
4096
|
+
return client
|