@abliteration/sdk 0.1.6 → 0.1.8
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.
- package/.openapi-generator/FILES +16 -0
- package/README.md +12 -0
- package/dist/apis/ModelsApi.d.ts +230 -0
- package/dist/apis/ModelsApi.js +231 -1
- package/dist/esm/apis/ModelsApi.d.ts +230 -0
- package/dist/esm/apis/ModelsApi.js +230 -0
- package/dist/esm/models/DownloadAnomaly.d.ts +66 -0
- package/dist/esm/models/DownloadAnomaly.js +62 -0
- package/dist/esm/models/DownloadPoint.d.ts +34 -0
- package/dist/esm/models/DownloadPoint.js +43 -0
- package/dist/esm/models/GetModelDownloadHistory200Response.d.ts +67 -0
- package/dist/esm/models/GetModelDownloadHistory200Response.js +79 -0
- package/dist/esm/models/GetModelReadmeAt200Response.d.ts +67 -0
- package/dist/esm/models/GetModelReadmeAt200Response.js +79 -0
- package/dist/esm/models/ListAnomalies200Response.d.ts +67 -0
- package/dist/esm/models/ListAnomalies200Response.js +79 -0
- package/dist/esm/models/ListModelReadmeDrifts200Response.d.ts +67 -0
- package/dist/esm/models/ListModelReadmeDrifts200Response.js +79 -0
- package/dist/esm/models/ReadmeAt.d.ts +38 -0
- package/dist/esm/models/ReadmeAt.js +45 -0
- package/dist/esm/models/ReadmeDrift.d.ts +46 -0
- package/dist/esm/models/ReadmeDrift.js +49 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/DownloadAnomaly.d.ts +66 -0
- package/dist/models/DownloadAnomaly.js +70 -0
- package/dist/models/DownloadPoint.d.ts +34 -0
- package/dist/models/DownloadPoint.js +50 -0
- package/dist/models/GetModelDownloadHistory200Response.d.ts +67 -0
- package/dist/models/GetModelDownloadHistory200Response.js +87 -0
- package/dist/models/GetModelReadmeAt200Response.d.ts +67 -0
- package/dist/models/GetModelReadmeAt200Response.js +87 -0
- package/dist/models/ListAnomalies200Response.d.ts +67 -0
- package/dist/models/ListAnomalies200Response.js +87 -0
- package/dist/models/ListModelReadmeDrifts200Response.d.ts +67 -0
- package/dist/models/ListModelReadmeDrifts200Response.js +87 -0
- package/dist/models/ReadmeAt.d.ts +38 -0
- package/dist/models/ReadmeAt.js +52 -0
- package/dist/models/ReadmeDrift.d.ts +46 -0
- package/dist/models/ReadmeDrift.js +56 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/docs/DownloadAnomaly.md +49 -0
- package/docs/DownloadPoint.md +37 -0
- package/docs/GetModelDownloadHistory200Response.md +48 -0
- package/docs/GetModelReadmeAt200Response.md +48 -0
- package/docs/ListAnomalies200Response.md +48 -0
- package/docs/ListModelReadmeDrifts200Response.md +48 -0
- package/docs/ModelsApi.md +332 -0
- package/docs/ReadmeAt.md +39 -0
- package/docs/ReadmeDrift.md +43 -0
- package/package.json +1 -1
- package/src/apis/ModelsApi.ts +462 -0
- package/src/models/DownloadAnomaly.ts +116 -0
- package/src/models/DownloadPoint.ts +69 -0
- package/src/models/GetModelDownloadHistory200Response.ts +132 -0
- package/src/models/GetModelReadmeAt200Response.ts +132 -0
- package/src/models/ListAnomalies200Response.ts +132 -0
- package/src/models/ListModelReadmeDrifts200Response.ts +132 -0
- package/src/models/ReadmeAt.ts +75 -0
- package/src/models/ReadmeDrift.ts +87 -0
- package/src/models/index.ts +8 -0
package/dist/apis/ModelsApi.js
CHANGED
|
@@ -22,12 +22,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.ListModelsSortEnum = exports.ListModelsDelistedEnum = exports.ListHistoricalDeletionsSortEnum = exports.ListDelistedModelsSortEnum = exports.ModelsApi = void 0;
|
|
25
|
+
exports.ListModelsSortEnum = exports.ListModelsDelistedEnum = exports.ListHistoricalDeletionsSortEnum = exports.ListDelistedModelsSortEnum = exports.ListAnomaliesKindEnum = exports.ModelsApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const GetHistoricalDeletionSummary200Response_1 = require("../models/GetHistoricalDeletionSummary200Response");
|
|
28
28
|
const GetModel200Response_1 = require("../models/GetModel200Response");
|
|
29
|
+
const GetModelDownloadHistory200Response_1 = require("../models/GetModelDownloadHistory200Response");
|
|
30
|
+
const GetModelReadmeAt200Response_1 = require("../models/GetModelReadmeAt200Response");
|
|
31
|
+
const ListAnomalies200Response_1 = require("../models/ListAnomalies200Response");
|
|
29
32
|
const ListDelistedModels200Response_1 = require("../models/ListDelistedModels200Response");
|
|
30
33
|
const ListHistoricalDeletions200Response_1 = require("../models/ListHistoricalDeletions200Response");
|
|
34
|
+
const ListModelReadmeDrifts200Response_1 = require("../models/ListModelReadmeDrifts200Response");
|
|
31
35
|
const ListModels200Response_1 = require("../models/ListModels200Response");
|
|
32
36
|
/**
|
|
33
37
|
*
|
|
@@ -125,6 +129,168 @@ class ModelsApi extends runtime.BaseAPI {
|
|
|
125
129
|
return yield response.value();
|
|
126
130
|
});
|
|
127
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Creates request options for getModelDownloadHistory without sending the request
|
|
134
|
+
*/
|
|
135
|
+
getModelDownloadHistoryRequestOpts(requestParameters) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
if (requestParameters['id'] == null) {
|
|
138
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getModelDownloadHistory().');
|
|
139
|
+
}
|
|
140
|
+
const queryParameters = {};
|
|
141
|
+
if (requestParameters['days'] != null) {
|
|
142
|
+
queryParameters['days'] = requestParameters['days'];
|
|
143
|
+
}
|
|
144
|
+
const headerParameters = {};
|
|
145
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
146
|
+
const token = this.configuration.accessToken;
|
|
147
|
+
const tokenString = yield token("bearerAuth", []);
|
|
148
|
+
if (tokenString) {
|
|
149
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
let urlPath = `/api/v1/models/{id}/download-history`;
|
|
153
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
154
|
+
return {
|
|
155
|
+
path: urlPath,
|
|
156
|
+
method: 'GET',
|
|
157
|
+
headers: headerParameters,
|
|
158
|
+
query: queryParameters,
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
|
|
164
|
+
* Per-model download timeline
|
|
165
|
+
*/
|
|
166
|
+
getModelDownloadHistoryRaw(requestParameters, initOverrides) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
const requestOptions = yield this.getModelDownloadHistoryRequestOpts(requestParameters);
|
|
169
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
170
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetModelDownloadHistory200Response_1.GetModelDownloadHistory200ResponseFromJSON)(jsonValue));
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
|
|
175
|
+
* Per-model download timeline
|
|
176
|
+
*/
|
|
177
|
+
getModelDownloadHistory(requestParameters, initOverrides) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
const response = yield this.getModelDownloadHistoryRaw(requestParameters, initOverrides);
|
|
180
|
+
return yield response.value();
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Creates request options for getModelReadmeAt without sending the request
|
|
185
|
+
*/
|
|
186
|
+
getModelReadmeAtRequestOpts(requestParameters) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
if (requestParameters['id'] == null) {
|
|
189
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getModelReadmeAt().');
|
|
190
|
+
}
|
|
191
|
+
if (requestParameters['commit'] == null) {
|
|
192
|
+
throw new runtime.RequiredError('commit', 'Required parameter "commit" was null or undefined when calling getModelReadmeAt().');
|
|
193
|
+
}
|
|
194
|
+
const queryParameters = {};
|
|
195
|
+
const headerParameters = {};
|
|
196
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
197
|
+
const token = this.configuration.accessToken;
|
|
198
|
+
const tokenString = yield token("bearerAuth", []);
|
|
199
|
+
if (tokenString) {
|
|
200
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
let urlPath = `/api/v1/models/{id}/readme-at/{commit}`;
|
|
204
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
205
|
+
urlPath = urlPath.replace('{commit}', encodeURIComponent(String(requestParameters['commit'])));
|
|
206
|
+
return {
|
|
207
|
+
path: urlPath,
|
|
208
|
+
method: 'GET',
|
|
209
|
+
headers: headerParameters,
|
|
210
|
+
query: queryParameters,
|
|
211
|
+
};
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
|
|
216
|
+
* README content at one commit (wayback)
|
|
217
|
+
*/
|
|
218
|
+
getModelReadmeAtRaw(requestParameters, initOverrides) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
+
const requestOptions = yield this.getModelReadmeAtRequestOpts(requestParameters);
|
|
221
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
222
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetModelReadmeAt200Response_1.GetModelReadmeAt200ResponseFromJSON)(jsonValue));
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
|
|
227
|
+
* README content at one commit (wayback)
|
|
228
|
+
*/
|
|
229
|
+
getModelReadmeAt(requestParameters, initOverrides) {
|
|
230
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
+
const response = yield this.getModelReadmeAtRaw(requestParameters, initOverrides);
|
|
232
|
+
return yield response.value();
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Creates request options for listAnomalies without sending the request
|
|
237
|
+
*/
|
|
238
|
+
listAnomaliesRequestOpts(requestParameters) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
const queryParameters = {};
|
|
241
|
+
if (requestParameters['windowDays'] != null) {
|
|
242
|
+
queryParameters['window_days'] = requestParameters['windowDays'];
|
|
243
|
+
}
|
|
244
|
+
if (requestParameters['minBaseline'] != null) {
|
|
245
|
+
queryParameters['min_baseline'] = requestParameters['minBaseline'];
|
|
246
|
+
}
|
|
247
|
+
if (requestParameters['kind'] != null) {
|
|
248
|
+
queryParameters['kind'] = requestParameters['kind'];
|
|
249
|
+
}
|
|
250
|
+
if (requestParameters['limit'] != null) {
|
|
251
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
252
|
+
}
|
|
253
|
+
if (requestParameters['offset'] != null) {
|
|
254
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
255
|
+
}
|
|
256
|
+
const headerParameters = {};
|
|
257
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
258
|
+
const token = this.configuration.accessToken;
|
|
259
|
+
const tokenString = yield token("bearerAuth", []);
|
|
260
|
+
if (tokenString) {
|
|
261
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
let urlPath = `/api/v1/market/anomalies`;
|
|
265
|
+
return {
|
|
266
|
+
path: urlPath,
|
|
267
|
+
method: 'GET',
|
|
268
|
+
headers: headerParameters,
|
|
269
|
+
query: queryParameters,
|
|
270
|
+
};
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
|
|
275
|
+
* Anomalies in the download counter (change stream)
|
|
276
|
+
*/
|
|
277
|
+
listAnomaliesRaw(requestParameters, initOverrides) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
const requestOptions = yield this.listAnomaliesRequestOpts(requestParameters);
|
|
280
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
281
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListAnomalies200Response_1.ListAnomalies200ResponseFromJSON)(jsonValue));
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
|
|
286
|
+
* Anomalies in the download counter (change stream)
|
|
287
|
+
*/
|
|
288
|
+
listAnomalies() {
|
|
289
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
290
|
+
const response = yield this.listAnomaliesRaw(requestParameters, initOverrides);
|
|
291
|
+
return yield response.value();
|
|
292
|
+
});
|
|
293
|
+
}
|
|
128
294
|
/**
|
|
129
295
|
* Creates request options for listDelistedModels without sending the request
|
|
130
296
|
*/
|
|
@@ -240,6 +406,63 @@ class ModelsApi extends runtime.BaseAPI {
|
|
|
240
406
|
return yield response.value();
|
|
241
407
|
});
|
|
242
408
|
}
|
|
409
|
+
/**
|
|
410
|
+
* Creates request options for listModelReadmeDrifts without sending the request
|
|
411
|
+
*/
|
|
412
|
+
listModelReadmeDriftsRequestOpts(requestParameters) {
|
|
413
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
414
|
+
if (requestParameters['id'] == null) {
|
|
415
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listModelReadmeDrifts().');
|
|
416
|
+
}
|
|
417
|
+
const queryParameters = {};
|
|
418
|
+
if (requestParameters['sinceTs'] != null) {
|
|
419
|
+
queryParameters['since_ts'] = requestParameters['sinceTs'];
|
|
420
|
+
}
|
|
421
|
+
if (requestParameters['limit'] != null) {
|
|
422
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
423
|
+
}
|
|
424
|
+
if (requestParameters['offset'] != null) {
|
|
425
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
426
|
+
}
|
|
427
|
+
const headerParameters = {};
|
|
428
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
429
|
+
const token = this.configuration.accessToken;
|
|
430
|
+
const tokenString = yield token("bearerAuth", []);
|
|
431
|
+
if (tokenString) {
|
|
432
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
let urlPath = `/api/v1/models/{id}/drifts`;
|
|
436
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
437
|
+
return {
|
|
438
|
+
path: urlPath,
|
|
439
|
+
method: 'GET',
|
|
440
|
+
headers: headerParameters,
|
|
441
|
+
query: queryParameters,
|
|
442
|
+
};
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
|
|
447
|
+
* README drift stream for one model
|
|
448
|
+
*/
|
|
449
|
+
listModelReadmeDriftsRaw(requestParameters, initOverrides) {
|
|
450
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
451
|
+
const requestOptions = yield this.listModelReadmeDriftsRequestOpts(requestParameters);
|
|
452
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
453
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListModelReadmeDrifts200Response_1.ListModelReadmeDrifts200ResponseFromJSON)(jsonValue));
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
|
|
458
|
+
* README drift stream for one model
|
|
459
|
+
*/
|
|
460
|
+
listModelReadmeDrifts(requestParameters, initOverrides) {
|
|
461
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
462
|
+
const response = yield this.listModelReadmeDriftsRaw(requestParameters, initOverrides);
|
|
463
|
+
return yield response.value();
|
|
464
|
+
});
|
|
465
|
+
}
|
|
243
466
|
/**
|
|
244
467
|
* Creates request options for listModels without sending the request
|
|
245
468
|
*/
|
|
@@ -322,6 +545,13 @@ class ModelsApi extends runtime.BaseAPI {
|
|
|
322
545
|
}
|
|
323
546
|
}
|
|
324
547
|
exports.ModelsApi = ModelsApi;
|
|
548
|
+
/**
|
|
549
|
+
* @export
|
|
550
|
+
*/
|
|
551
|
+
exports.ListAnomaliesKindEnum = {
|
|
552
|
+
Spike: 'spike',
|
|
553
|
+
Drop: 'drop',
|
|
554
|
+
};
|
|
325
555
|
/**
|
|
326
556
|
* @export
|
|
327
557
|
*/
|
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import { type GetHistoricalDeletionSummary200Response } from '../models/GetHistoricalDeletionSummary200Response';
|
|
14
14
|
import { type GetModel200Response } from '../models/GetModel200Response';
|
|
15
|
+
import { type GetModelDownloadHistory200Response } from '../models/GetModelDownloadHistory200Response';
|
|
16
|
+
import { type GetModelReadmeAt200Response } from '../models/GetModelReadmeAt200Response';
|
|
17
|
+
import { type ListAnomalies200Response } from '../models/ListAnomalies200Response';
|
|
15
18
|
import { type ListDelistedModels200Response } from '../models/ListDelistedModels200Response';
|
|
16
19
|
import { type ListHistoricalDeletions200Response } from '../models/ListHistoricalDeletions200Response';
|
|
20
|
+
import { type ListModelReadmeDrifts200Response } from '../models/ListModelReadmeDrifts200Response';
|
|
17
21
|
import { type ListModels200Response } from '../models/ListModels200Response';
|
|
18
22
|
export interface GetModelRequest {
|
|
19
23
|
/**
|
|
@@ -21,6 +25,48 @@ export interface GetModelRequest {
|
|
|
21
25
|
*/
|
|
22
26
|
id: string;
|
|
23
27
|
}
|
|
28
|
+
export interface GetModelDownloadHistoryRequest {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* Window in days (max 365). Pass 0 for full history.
|
|
35
|
+
*/
|
|
36
|
+
days?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface GetModelReadmeAtRequest {
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
* HF commit sha for the README, from /drifts.
|
|
45
|
+
*/
|
|
46
|
+
commit: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ListAnomaliesRequest {
|
|
49
|
+
/**
|
|
50
|
+
* Baseline distance in days. Default 7, min 1, max 365.
|
|
51
|
+
*/
|
|
52
|
+
windowDays?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Only rows where baseline downloads >= this. Filters `0→10` noise. Default 1000.
|
|
55
|
+
*/
|
|
56
|
+
minBaseline?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Filter to one class. Omit for both.
|
|
59
|
+
*/
|
|
60
|
+
kind?: ListAnomaliesKindEnum;
|
|
61
|
+
/**
|
|
62
|
+
* Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
63
|
+
*/
|
|
64
|
+
limit?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Rows to skip. Negative and non-numeric values are treated as 0.
|
|
67
|
+
*/
|
|
68
|
+
offset?: number;
|
|
69
|
+
}
|
|
24
70
|
export interface ListDelistedModelsRequest {
|
|
25
71
|
/**
|
|
26
72
|
* ISO-8601 date or timestamp. Rows with last_seen_at >= since only. Use your previous poll's newest last_seen_at to build an incremental feed.
|
|
@@ -61,6 +107,24 @@ export interface ListHistoricalDeletionsRequest {
|
|
|
61
107
|
*/
|
|
62
108
|
offset?: number;
|
|
63
109
|
}
|
|
110
|
+
export interface ListModelReadmeDriftsRequest {
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
114
|
+
id: string;
|
|
115
|
+
/**
|
|
116
|
+
* Unix epoch seconds. Rows with commit_ts >= it only.
|
|
117
|
+
*/
|
|
118
|
+
sinceTs?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
121
|
+
*/
|
|
122
|
+
limit?: number;
|
|
123
|
+
/**
|
|
124
|
+
* Rows to skip. Negative and non-numeric values are treated as 0.
|
|
125
|
+
*/
|
|
126
|
+
offset?: number;
|
|
127
|
+
}
|
|
64
128
|
export interface ListModelsRequest {
|
|
65
129
|
/**
|
|
66
130
|
* M-code, case-insensitive. See GET /api/v1/methods.
|
|
@@ -158,6 +222,81 @@ export interface ModelsApiInterface {
|
|
|
158
222
|
* Get one model
|
|
159
223
|
*/
|
|
160
224
|
getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
|
|
225
|
+
/**
|
|
226
|
+
* Creates request options for getModelDownloadHistory without sending the request
|
|
227
|
+
* @param {string} id
|
|
228
|
+
* @param {number} [days] Window in days (max 365). Pass 0 for full history.
|
|
229
|
+
* @throws {RequiredError}
|
|
230
|
+
* @memberof ModelsApiInterface
|
|
231
|
+
*/
|
|
232
|
+
getModelDownloadHistoryRequestOpts(requestParameters: GetModelDownloadHistoryRequest): Promise<runtime.RequestOpts>;
|
|
233
|
+
/**
|
|
234
|
+
* Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
|
|
235
|
+
* @summary Per-model download timeline
|
|
236
|
+
* @param {string} id
|
|
237
|
+
* @param {number} [days] Window in days (max 365). Pass 0 for full history.
|
|
238
|
+
* @param {*} [options] Override http request option.
|
|
239
|
+
* @throws {RequiredError}
|
|
240
|
+
* @memberof ModelsApiInterface
|
|
241
|
+
*/
|
|
242
|
+
getModelDownloadHistoryRaw(requestParameters: GetModelDownloadHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelDownloadHistory200Response>>;
|
|
243
|
+
/**
|
|
244
|
+
* Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
|
|
245
|
+
* Per-model download timeline
|
|
246
|
+
*/
|
|
247
|
+
getModelDownloadHistory(requestParameters: GetModelDownloadHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelDownloadHistory200Response>;
|
|
248
|
+
/**
|
|
249
|
+
* Creates request options for getModelReadmeAt without sending the request
|
|
250
|
+
* @param {string} id
|
|
251
|
+
* @param {string} commit HF commit sha for the README, from /drifts.
|
|
252
|
+
* @throws {RequiredError}
|
|
253
|
+
* @memberof ModelsApiInterface
|
|
254
|
+
*/
|
|
255
|
+
getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts>;
|
|
256
|
+
/**
|
|
257
|
+
* Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
|
|
258
|
+
* @summary README content at one commit (wayback)
|
|
259
|
+
* @param {string} id
|
|
260
|
+
* @param {string} commit HF commit sha for the README, from /drifts.
|
|
261
|
+
* @param {*} [options] Override http request option.
|
|
262
|
+
* @throws {RequiredError}
|
|
263
|
+
* @memberof ModelsApiInterface
|
|
264
|
+
*/
|
|
265
|
+
getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>>;
|
|
266
|
+
/**
|
|
267
|
+
* Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
|
|
268
|
+
* README content at one commit (wayback)
|
|
269
|
+
*/
|
|
270
|
+
getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
|
|
271
|
+
/**
|
|
272
|
+
* Creates request options for listAnomalies without sending the request
|
|
273
|
+
* @param {number} [windowDays] Baseline distance in days. Default 7, min 1, max 365.
|
|
274
|
+
* @param {number} [minBaseline] Only rows where baseline downloads >= this. Filters `0→10` noise. Default 1000.
|
|
275
|
+
* @param {'spike' | 'drop'} [kind] Filter to one class. Omit for both.
|
|
276
|
+
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
277
|
+
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
278
|
+
* @throws {RequiredError}
|
|
279
|
+
* @memberof ModelsApiInterface
|
|
280
|
+
*/
|
|
281
|
+
listAnomaliesRequestOpts(requestParameters: ListAnomaliesRequest): Promise<runtime.RequestOpts>;
|
|
282
|
+
/**
|
|
283
|
+
* Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
|
|
284
|
+
* @summary Anomalies in the download counter (change stream)
|
|
285
|
+
* @param {number} [windowDays] Baseline distance in days. Default 7, min 1, max 365.
|
|
286
|
+
* @param {number} [minBaseline] Only rows where baseline downloads >= this. Filters `0→10` noise. Default 1000.
|
|
287
|
+
* @param {'spike' | 'drop'} [kind] Filter to one class. Omit for both.
|
|
288
|
+
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
289
|
+
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
290
|
+
* @param {*} [options] Override http request option.
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
* @memberof ModelsApiInterface
|
|
293
|
+
*/
|
|
294
|
+
listAnomaliesRaw(requestParameters: ListAnomaliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAnomalies200Response>>;
|
|
295
|
+
/**
|
|
296
|
+
* Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
|
|
297
|
+
* Anomalies in the download counter (change stream)
|
|
298
|
+
*/
|
|
299
|
+
listAnomalies(requestParameters: ListAnomaliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAnomalies200Response>;
|
|
161
300
|
/**
|
|
162
301
|
* Creates request options for listDelistedModels without sending the request
|
|
163
302
|
* @param {string} [since] ISO-8601 date or timestamp. Rows with last_seen_at >= since only. Use your previous poll\'s newest last_seen_at to build an incremental feed.
|
|
@@ -214,6 +353,33 @@ export interface ModelsApiInterface {
|
|
|
214
353
|
* Historical deletions — paged list
|
|
215
354
|
*/
|
|
216
355
|
listHistoricalDeletions(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
|
|
356
|
+
/**
|
|
357
|
+
* Creates request options for listModelReadmeDrifts without sending the request
|
|
358
|
+
* @param {string} id
|
|
359
|
+
* @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts >= it only.
|
|
360
|
+
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
361
|
+
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
362
|
+
* @throws {RequiredError}
|
|
363
|
+
* @memberof ModelsApiInterface
|
|
364
|
+
*/
|
|
365
|
+
listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts>;
|
|
366
|
+
/**
|
|
367
|
+
* Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
|
|
368
|
+
* @summary README drift stream for one model
|
|
369
|
+
* @param {string} id
|
|
370
|
+
* @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts >= it only.
|
|
371
|
+
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
372
|
+
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
373
|
+
* @param {*} [options] Override http request option.
|
|
374
|
+
* @throws {RequiredError}
|
|
375
|
+
* @memberof ModelsApiInterface
|
|
376
|
+
*/
|
|
377
|
+
listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>>;
|
|
378
|
+
/**
|
|
379
|
+
* Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
|
|
380
|
+
* README drift stream for one model
|
|
381
|
+
*/
|
|
382
|
+
listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response>;
|
|
217
383
|
/**
|
|
218
384
|
* Creates request options for listModels without sending the request
|
|
219
385
|
* @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
|
|
@@ -290,6 +456,48 @@ export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInter
|
|
|
290
456
|
* Get one model
|
|
291
457
|
*/
|
|
292
458
|
getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
|
|
459
|
+
/**
|
|
460
|
+
* Creates request options for getModelDownloadHistory without sending the request
|
|
461
|
+
*/
|
|
462
|
+
getModelDownloadHistoryRequestOpts(requestParameters: GetModelDownloadHistoryRequest): Promise<runtime.RequestOpts>;
|
|
463
|
+
/**
|
|
464
|
+
* Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
|
|
465
|
+
* Per-model download timeline
|
|
466
|
+
*/
|
|
467
|
+
getModelDownloadHistoryRaw(requestParameters: GetModelDownloadHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelDownloadHistory200Response>>;
|
|
468
|
+
/**
|
|
469
|
+
* Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
|
|
470
|
+
* Per-model download timeline
|
|
471
|
+
*/
|
|
472
|
+
getModelDownloadHistory(requestParameters: GetModelDownloadHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelDownloadHistory200Response>;
|
|
473
|
+
/**
|
|
474
|
+
* Creates request options for getModelReadmeAt without sending the request
|
|
475
|
+
*/
|
|
476
|
+
getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts>;
|
|
477
|
+
/**
|
|
478
|
+
* Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
|
|
479
|
+
* README content at one commit (wayback)
|
|
480
|
+
*/
|
|
481
|
+
getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>>;
|
|
482
|
+
/**
|
|
483
|
+
* Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
|
|
484
|
+
* README content at one commit (wayback)
|
|
485
|
+
*/
|
|
486
|
+
getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
|
|
487
|
+
/**
|
|
488
|
+
* Creates request options for listAnomalies without sending the request
|
|
489
|
+
*/
|
|
490
|
+
listAnomaliesRequestOpts(requestParameters: ListAnomaliesRequest): Promise<runtime.RequestOpts>;
|
|
491
|
+
/**
|
|
492
|
+
* Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
|
|
493
|
+
* Anomalies in the download counter (change stream)
|
|
494
|
+
*/
|
|
495
|
+
listAnomaliesRaw(requestParameters: ListAnomaliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAnomalies200Response>>;
|
|
496
|
+
/**
|
|
497
|
+
* Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
|
|
498
|
+
* Anomalies in the download counter (change stream)
|
|
499
|
+
*/
|
|
500
|
+
listAnomalies(requestParameters?: ListAnomaliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAnomalies200Response>;
|
|
293
501
|
/**
|
|
294
502
|
* Creates request options for listDelistedModels without sending the request
|
|
295
503
|
*/
|
|
@@ -318,6 +526,20 @@ export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInter
|
|
|
318
526
|
* Historical deletions — paged list
|
|
319
527
|
*/
|
|
320
528
|
listHistoricalDeletions(requestParameters?: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
|
|
529
|
+
/**
|
|
530
|
+
* Creates request options for listModelReadmeDrifts without sending the request
|
|
531
|
+
*/
|
|
532
|
+
listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts>;
|
|
533
|
+
/**
|
|
534
|
+
* Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
|
|
535
|
+
* README drift stream for one model
|
|
536
|
+
*/
|
|
537
|
+
listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>>;
|
|
538
|
+
/**
|
|
539
|
+
* Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
|
|
540
|
+
* README drift stream for one model
|
|
541
|
+
*/
|
|
542
|
+
listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response>;
|
|
321
543
|
/**
|
|
322
544
|
* Creates request options for listModels without sending the request
|
|
323
545
|
*/
|
|
@@ -333,6 +555,14 @@ export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInter
|
|
|
333
555
|
*/
|
|
334
556
|
listModels(requestParameters?: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModels200Response>;
|
|
335
557
|
}
|
|
558
|
+
/**
|
|
559
|
+
* @export
|
|
560
|
+
*/
|
|
561
|
+
export declare const ListAnomaliesKindEnum: {
|
|
562
|
+
readonly Spike: "spike";
|
|
563
|
+
readonly Drop: "drop";
|
|
564
|
+
};
|
|
565
|
+
export type ListAnomaliesKindEnum = typeof ListAnomaliesKindEnum[keyof typeof ListAnomaliesKindEnum];
|
|
336
566
|
/**
|
|
337
567
|
* @export
|
|
338
568
|
*/
|