@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
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
# GetModelReadmeAt200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [ReadmeAt](ReadmeAt.md)
|
|
10
|
+
`cost` | number
|
|
11
|
+
`credits_remaining` | number
|
|
12
|
+
`rate_limit_limit` | number
|
|
13
|
+
`rate_limit_remaining` | number
|
|
14
|
+
`rate_limit_reset` | number
|
|
15
|
+
`metering` | string
|
|
16
|
+
`request_id` | string
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { GetModelReadmeAt200Response } from '@abliteration/sdk'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"data": null,
|
|
26
|
+
"cost": null,
|
|
27
|
+
"credits_remaining": null,
|
|
28
|
+
"rate_limit_limit": null,
|
|
29
|
+
"rate_limit_remaining": null,
|
|
30
|
+
"rate_limit_reset": null,
|
|
31
|
+
"metering": null,
|
|
32
|
+
"request_id": null,
|
|
33
|
+
} satisfies GetModelReadmeAt200Response
|
|
34
|
+
|
|
35
|
+
console.log(example)
|
|
36
|
+
|
|
37
|
+
// Convert the instance to a JSON string
|
|
38
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
39
|
+
console.log(exampleJSON)
|
|
40
|
+
|
|
41
|
+
// Parse the JSON string back to an object
|
|
42
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetModelReadmeAt200Response
|
|
43
|
+
console.log(exampleParsed)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
47
|
+
|
|
48
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
# ListAnomalies200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<DownloadAnomaly>](DownloadAnomaly.md)
|
|
10
|
+
`cost` | number
|
|
11
|
+
`credits_remaining` | number
|
|
12
|
+
`rate_limit_limit` | number
|
|
13
|
+
`rate_limit_remaining` | number
|
|
14
|
+
`rate_limit_reset` | number
|
|
15
|
+
`metering` | string
|
|
16
|
+
`request_id` | string
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { ListAnomalies200Response } from '@abliteration/sdk'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"data": null,
|
|
26
|
+
"cost": null,
|
|
27
|
+
"credits_remaining": null,
|
|
28
|
+
"rate_limit_limit": null,
|
|
29
|
+
"rate_limit_remaining": null,
|
|
30
|
+
"rate_limit_reset": null,
|
|
31
|
+
"metering": null,
|
|
32
|
+
"request_id": null,
|
|
33
|
+
} satisfies ListAnomalies200Response
|
|
34
|
+
|
|
35
|
+
console.log(example)
|
|
36
|
+
|
|
37
|
+
// Convert the instance to a JSON string
|
|
38
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
39
|
+
console.log(exampleJSON)
|
|
40
|
+
|
|
41
|
+
// Parse the JSON string back to an object
|
|
42
|
+
const exampleParsed = JSON.parse(exampleJSON) as ListAnomalies200Response
|
|
43
|
+
console.log(exampleParsed)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
47
|
+
|
|
48
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
# ListModelReadmeDrifts200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<ReadmeDrift>](ReadmeDrift.md)
|
|
10
|
+
`cost` | number
|
|
11
|
+
`credits_remaining` | number
|
|
12
|
+
`rate_limit_limit` | number
|
|
13
|
+
`rate_limit_remaining` | number
|
|
14
|
+
`rate_limit_reset` | number
|
|
15
|
+
`metering` | string
|
|
16
|
+
`request_id` | string
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { ListModelReadmeDrifts200Response } from '@abliteration/sdk'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"data": null,
|
|
26
|
+
"cost": null,
|
|
27
|
+
"credits_remaining": null,
|
|
28
|
+
"rate_limit_limit": null,
|
|
29
|
+
"rate_limit_remaining": null,
|
|
30
|
+
"rate_limit_reset": null,
|
|
31
|
+
"metering": null,
|
|
32
|
+
"request_id": null,
|
|
33
|
+
} satisfies ListModelReadmeDrifts200Response
|
|
34
|
+
|
|
35
|
+
console.log(example)
|
|
36
|
+
|
|
37
|
+
// Convert the instance to a JSON string
|
|
38
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
39
|
+
console.log(exampleJSON)
|
|
40
|
+
|
|
41
|
+
// Parse the JSON string back to an object
|
|
42
|
+
const exampleParsed = JSON.parse(exampleJSON) as ListModelReadmeDrifts200Response
|
|
43
|
+
console.log(exampleParsed)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
47
|
+
|
|
48
|
+
|
package/docs/ModelsApi.md
CHANGED
|
@@ -6,8 +6,12 @@ All URIs are relative to *https://abliteration.org*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**getHistoricalDeletionSummary**](ModelsApi.md#gethistoricaldeletionsummary) | **GET** /api/v1/models/historical-deletions/summary | Historical deletions — aggregate summary |
|
|
8
8
|
| [**getModel**](ModelsApi.md#getmodel) | **GET** /api/v1/models/{id} | Get one model |
|
|
9
|
+
| [**getModelDownloadHistory**](ModelsApi.md#getmodeldownloadhistory) | **GET** /api/v1/models/{id}/download-history | Per-model download timeline |
|
|
10
|
+
| [**getModelReadmeAt**](ModelsApi.md#getmodelreadmeat) | **GET** /api/v1/models/{id}/readme-at/{commit} | README content at one commit (wayback) |
|
|
11
|
+
| [**listAnomalies**](ModelsApi.md#listanomalies) | **GET** /api/v1/market/anomalies | Anomalies in the download counter (change stream) |
|
|
9
12
|
| [**listDelistedModels**](ModelsApi.md#listdelistedmodels) | **GET** /api/v1/models/delisted | List delisted models (change stream) |
|
|
10
13
|
| [**listHistoricalDeletions**](ModelsApi.md#listhistoricaldeletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list |
|
|
14
|
+
| [**listModelReadmeDrifts**](ModelsApi.md#listmodelreadmedrifts) | **GET** /api/v1/models/{id}/drifts | README drift stream for one model |
|
|
11
15
|
| [**listModels**](ModelsApi.md#listmodels) | **GET** /api/v1/models | List models |
|
|
12
16
|
|
|
13
17
|
|
|
@@ -155,6 +159,250 @@ example().catch(console.error);
|
|
|
155
159
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
156
160
|
|
|
157
161
|
|
|
162
|
+
## getModelDownloadHistory
|
|
163
|
+
|
|
164
|
+
> GetModelDownloadHistory200Response getModelDownloadHistory(id, days)
|
|
165
|
+
|
|
166
|
+
Per-model download timeline
|
|
167
|
+
|
|
168
|
+
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.
|
|
169
|
+
|
|
170
|
+
### Example
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
import {
|
|
174
|
+
Configuration,
|
|
175
|
+
ModelsApi,
|
|
176
|
+
} from '@abliteration/sdk';
|
|
177
|
+
import type { GetModelDownloadHistoryRequest } from '@abliteration/sdk';
|
|
178
|
+
|
|
179
|
+
async function example() {
|
|
180
|
+
console.log("🚀 Testing @abliteration/sdk SDK...");
|
|
181
|
+
const config = new Configuration({
|
|
182
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
183
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
184
|
+
});
|
|
185
|
+
const api = new ModelsApi(config);
|
|
186
|
+
|
|
187
|
+
const body = {
|
|
188
|
+
// string
|
|
189
|
+
id: id_example,
|
|
190
|
+
// number | Window in days (max 365). Pass 0 for full history. (optional)
|
|
191
|
+
days: 56,
|
|
192
|
+
} satisfies GetModelDownloadHistoryRequest;
|
|
193
|
+
|
|
194
|
+
try {
|
|
195
|
+
const data = await api.getModelDownloadHistory(body);
|
|
196
|
+
console.log(data);
|
|
197
|
+
} catch (error) {
|
|
198
|
+
console.error(error);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Run the test
|
|
203
|
+
example().catch(console.error);
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Parameters
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
| Name | Type | Description | Notes |
|
|
210
|
+
|------------- | ------------- | ------------- | -------------|
|
|
211
|
+
| **id** | `string` | | [Defaults to `undefined`] |
|
|
212
|
+
| **days** | `number` | Window in days (max 365). Pass 0 for full history. | [Optional] [Defaults to `90`] |
|
|
213
|
+
|
|
214
|
+
### Return type
|
|
215
|
+
|
|
216
|
+
[**GetModelDownloadHistory200Response**](GetModelDownloadHistory200Response.md)
|
|
217
|
+
|
|
218
|
+
### Authorization
|
|
219
|
+
|
|
220
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
221
|
+
|
|
222
|
+
### HTTP request headers
|
|
223
|
+
|
|
224
|
+
- **Content-Type**: Not defined
|
|
225
|
+
- **Accept**: `application/json`
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### HTTP response details
|
|
229
|
+
| Status code | Description | Response headers |
|
|
230
|
+
|-------------|-------------|------------------|
|
|
231
|
+
| **200** | Timeline. | - |
|
|
232
|
+
| **401** | Missing, unknown or revoked key. | - |
|
|
233
|
+
| **402** | Not enough credits. Only possible while metering is enabled. | - |
|
|
234
|
+
| **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
|
|
235
|
+
| **503** | Catalog temporarily unreadable. Nothing was charged. | - |
|
|
236
|
+
|
|
237
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
## getModelReadmeAt
|
|
241
|
+
|
|
242
|
+
> GetModelReadmeAt200Response getModelReadmeAt(id, commit)
|
|
243
|
+
|
|
244
|
+
README content at one commit (wayback)
|
|
245
|
+
|
|
246
|
+
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.
|
|
247
|
+
|
|
248
|
+
### Example
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
import {
|
|
252
|
+
Configuration,
|
|
253
|
+
ModelsApi,
|
|
254
|
+
} from '@abliteration/sdk';
|
|
255
|
+
import type { GetModelReadmeAtRequest } from '@abliteration/sdk';
|
|
256
|
+
|
|
257
|
+
async function example() {
|
|
258
|
+
console.log("🚀 Testing @abliteration/sdk SDK...");
|
|
259
|
+
const config = new Configuration({
|
|
260
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
261
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
262
|
+
});
|
|
263
|
+
const api = new ModelsApi(config);
|
|
264
|
+
|
|
265
|
+
const body = {
|
|
266
|
+
// string
|
|
267
|
+
id: id_example,
|
|
268
|
+
// string | HF commit sha for the README, from /drifts.
|
|
269
|
+
commit: commit_example,
|
|
270
|
+
} satisfies GetModelReadmeAtRequest;
|
|
271
|
+
|
|
272
|
+
try {
|
|
273
|
+
const data = await api.getModelReadmeAt(body);
|
|
274
|
+
console.log(data);
|
|
275
|
+
} catch (error) {
|
|
276
|
+
console.error(error);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// Run the test
|
|
281
|
+
example().catch(console.error);
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Parameters
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
| Name | Type | Description | Notes |
|
|
288
|
+
|------------- | ------------- | ------------- | -------------|
|
|
289
|
+
| **id** | `string` | | [Defaults to `undefined`] |
|
|
290
|
+
| **commit** | `string` | HF commit sha for the README, from /drifts. | [Defaults to `undefined`] |
|
|
291
|
+
|
|
292
|
+
### Return type
|
|
293
|
+
|
|
294
|
+
[**GetModelReadmeAt200Response**](GetModelReadmeAt200Response.md)
|
|
295
|
+
|
|
296
|
+
### Authorization
|
|
297
|
+
|
|
298
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
299
|
+
|
|
300
|
+
### HTTP request headers
|
|
301
|
+
|
|
302
|
+
- **Content-Type**: Not defined
|
|
303
|
+
- **Accept**: `application/json`
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
### HTTP response details
|
|
307
|
+
| Status code | Description | Response headers |
|
|
308
|
+
|-------------|-------------|------------------|
|
|
309
|
+
| **200** | README content at commit. | - |
|
|
310
|
+
| **401** | Missing, unknown or revoked key. | - |
|
|
311
|
+
| **402** | Not enough credits. Only possible while metering is enabled. | - |
|
|
312
|
+
| **404** | No such entity. | - |
|
|
313
|
+
| **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
|
|
314
|
+
| **503** | Catalog temporarily unreadable. Nothing was charged. | - |
|
|
315
|
+
|
|
316
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
## listAnomalies
|
|
320
|
+
|
|
321
|
+
> ListAnomalies200Response listAnomalies(windowDays, minBaseline, kind, limit, offset)
|
|
322
|
+
|
|
323
|
+
Anomalies in the download counter (change stream)
|
|
324
|
+
|
|
325
|
+
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`.
|
|
326
|
+
|
|
327
|
+
### Example
|
|
328
|
+
|
|
329
|
+
```ts
|
|
330
|
+
import {
|
|
331
|
+
Configuration,
|
|
332
|
+
ModelsApi,
|
|
333
|
+
} from '@abliteration/sdk';
|
|
334
|
+
import type { ListAnomaliesRequest } from '@abliteration/sdk';
|
|
335
|
+
|
|
336
|
+
async function example() {
|
|
337
|
+
console.log("🚀 Testing @abliteration/sdk SDK...");
|
|
338
|
+
const config = new Configuration({
|
|
339
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
340
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
341
|
+
});
|
|
342
|
+
const api = new ModelsApi(config);
|
|
343
|
+
|
|
344
|
+
const body = {
|
|
345
|
+
// number | Baseline distance in days. Default 7, min 1, max 365. (optional)
|
|
346
|
+
windowDays: 56,
|
|
347
|
+
// number | Only rows where baseline downloads >= this. Filters `0→10` noise. Default 1000. (optional)
|
|
348
|
+
minBaseline: 56,
|
|
349
|
+
// 'spike' | 'drop' | Filter to one class. Omit for both. (optional)
|
|
350
|
+
kind: kind_example,
|
|
351
|
+
// number | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (optional)
|
|
352
|
+
limit: 56,
|
|
353
|
+
// number | Rows to skip. Negative and non-numeric values are treated as 0. (optional)
|
|
354
|
+
offset: 56,
|
|
355
|
+
} satisfies ListAnomaliesRequest;
|
|
356
|
+
|
|
357
|
+
try {
|
|
358
|
+
const data = await api.listAnomalies(body);
|
|
359
|
+
console.log(data);
|
|
360
|
+
} catch (error) {
|
|
361
|
+
console.error(error);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Run the test
|
|
366
|
+
example().catch(console.error);
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Parameters
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
| Name | Type | Description | Notes |
|
|
373
|
+
|------------- | ------------- | ------------- | -------------|
|
|
374
|
+
| **windowDays** | `number` | Baseline distance in days. Default 7, min 1, max 365. | [Optional] [Defaults to `7`] |
|
|
375
|
+
| **minBaseline** | `number` | Only rows where baseline downloads >= this. Filters `0→10` noise. Default 1000. | [Optional] [Defaults to `1000`] |
|
|
376
|
+
| **kind** | `spike`, `drop` | Filter to one class. Omit for both. | [Optional] [Defaults to `undefined`] [Enum: spike, drop] |
|
|
377
|
+
| **limit** | `number` | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [Optional] [Defaults to `50`] |
|
|
378
|
+
| **offset** | `number` | Rows to skip. Negative and non-numeric values are treated as 0. | [Optional] [Defaults to `0`] |
|
|
379
|
+
|
|
380
|
+
### Return type
|
|
381
|
+
|
|
382
|
+
[**ListAnomalies200Response**](ListAnomalies200Response.md)
|
|
383
|
+
|
|
384
|
+
### Authorization
|
|
385
|
+
|
|
386
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
387
|
+
|
|
388
|
+
### HTTP request headers
|
|
389
|
+
|
|
390
|
+
- **Content-Type**: Not defined
|
|
391
|
+
- **Accept**: `application/json`
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
### HTTP response details
|
|
395
|
+
| Status code | Description | Response headers |
|
|
396
|
+
|-------------|-------------|------------------|
|
|
397
|
+
| **200** | Detected anomalies. | - |
|
|
398
|
+
| **401** | Missing, unknown or revoked key. | - |
|
|
399
|
+
| **402** | Not enough credits. Only possible while metering is enabled. | - |
|
|
400
|
+
| **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
|
|
401
|
+
| **503** | Catalog temporarily unreadable. Nothing was charged. | - |
|
|
402
|
+
|
|
403
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
404
|
+
|
|
405
|
+
|
|
158
406
|
## listDelistedModels
|
|
159
407
|
|
|
160
408
|
> ListDelistedModels200Response listDelistedModels(since, sort, limit, offset)
|
|
@@ -326,6 +574,90 @@ example().catch(console.error);
|
|
|
326
574
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
327
575
|
|
|
328
576
|
|
|
577
|
+
## listModelReadmeDrifts
|
|
578
|
+
|
|
579
|
+
> ListModelReadmeDrifts200Response listModelReadmeDrifts(id, sinceTs, limit, offset)
|
|
580
|
+
|
|
581
|
+
README drift stream for one model
|
|
582
|
+
|
|
583
|
+
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.
|
|
584
|
+
|
|
585
|
+
### Example
|
|
586
|
+
|
|
587
|
+
```ts
|
|
588
|
+
import {
|
|
589
|
+
Configuration,
|
|
590
|
+
ModelsApi,
|
|
591
|
+
} from '@abliteration/sdk';
|
|
592
|
+
import type { ListModelReadmeDriftsRequest } from '@abliteration/sdk';
|
|
593
|
+
|
|
594
|
+
async function example() {
|
|
595
|
+
console.log("🚀 Testing @abliteration/sdk SDK...");
|
|
596
|
+
const config = new Configuration({
|
|
597
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
598
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
599
|
+
});
|
|
600
|
+
const api = new ModelsApi(config);
|
|
601
|
+
|
|
602
|
+
const body = {
|
|
603
|
+
// string
|
|
604
|
+
id: mlabonne/Qwen3-30B-A3B-abliterated,
|
|
605
|
+
// number | Unix epoch seconds. Rows with commit_ts >= it only. (optional)
|
|
606
|
+
sinceTs: 789,
|
|
607
|
+
// number | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (optional)
|
|
608
|
+
limit: 56,
|
|
609
|
+
// number | Rows to skip. Negative and non-numeric values are treated as 0. (optional)
|
|
610
|
+
offset: 56,
|
|
611
|
+
} satisfies ListModelReadmeDriftsRequest;
|
|
612
|
+
|
|
613
|
+
try {
|
|
614
|
+
const data = await api.listModelReadmeDrifts(body);
|
|
615
|
+
console.log(data);
|
|
616
|
+
} catch (error) {
|
|
617
|
+
console.error(error);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
// Run the test
|
|
622
|
+
example().catch(console.error);
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
### Parameters
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
| Name | Type | Description | Notes |
|
|
629
|
+
|------------- | ------------- | ------------- | -------------|
|
|
630
|
+
| **id** | `string` | | [Defaults to `undefined`] |
|
|
631
|
+
| **sinceTs** | `number` | Unix epoch seconds. Rows with commit_ts >= it only. | [Optional] [Defaults to `undefined`] |
|
|
632
|
+
| **limit** | `number` | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [Optional] [Defaults to `50`] |
|
|
633
|
+
| **offset** | `number` | Rows to skip. Negative and non-numeric values are treated as 0. | [Optional] [Defaults to `0`] |
|
|
634
|
+
|
|
635
|
+
### Return type
|
|
636
|
+
|
|
637
|
+
[**ListModelReadmeDrifts200Response**](ListModelReadmeDrifts200Response.md)
|
|
638
|
+
|
|
639
|
+
### Authorization
|
|
640
|
+
|
|
641
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
642
|
+
|
|
643
|
+
### HTTP request headers
|
|
644
|
+
|
|
645
|
+
- **Content-Type**: Not defined
|
|
646
|
+
- **Accept**: `application/json`
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
### HTTP response details
|
|
650
|
+
| Status code | Description | Response headers |
|
|
651
|
+
|-------------|-------------|------------------|
|
|
652
|
+
| **200** | README commits. | - |
|
|
653
|
+
| **401** | Missing, unknown or revoked key. | - |
|
|
654
|
+
| **402** | Not enough credits. Only possible while metering is enabled. | - |
|
|
655
|
+
| **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
|
|
656
|
+
| **503** | Catalog temporarily unreadable. Nothing was charged. | - |
|
|
657
|
+
|
|
658
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
659
|
+
|
|
660
|
+
|
|
329
661
|
## listModels
|
|
330
662
|
|
|
331
663
|
> ListModels200Response listModels(method, family, author, license, downloadsGte, downloadsLte, createdAfter, createdBefore, delisted, sort, limit, offset)
|
package/docs/ReadmeAt.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# ReadmeAt
|
|
3
|
+
|
|
4
|
+
Wayback-machine view: full README content at one commit.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`commit` | string
|
|
12
|
+
`content` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { ReadmeAt } from '@abliteration/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"id": null,
|
|
22
|
+
"commit": null,
|
|
23
|
+
"content": null,
|
|
24
|
+
} satisfies ReadmeAt
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as ReadmeAt
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
# ReadmeDrift
|
|
3
|
+
|
|
4
|
+
One commit that changed the model\'s README on HF.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`commit_sha` | string
|
|
11
|
+
`commit_ts` | number
|
|
12
|
+
`commit_message` | string
|
|
13
|
+
`content_size` | number
|
|
14
|
+
`size_delta` | number
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { ReadmeDrift } from '@abliteration/sdk'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"commit_sha": null,
|
|
24
|
+
"commit_ts": null,
|
|
25
|
+
"commit_message": null,
|
|
26
|
+
"content_size": null,
|
|
27
|
+
"size_delta": null,
|
|
28
|
+
} satisfies ReadmeDrift
|
|
29
|
+
|
|
30
|
+
console.log(example)
|
|
31
|
+
|
|
32
|
+
// Convert the instance to a JSON string
|
|
33
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
34
|
+
console.log(exampleJSON)
|
|
35
|
+
|
|
36
|
+
// Parse the JSON string back to an object
|
|
37
|
+
const exampleParsed = JSON.parse(exampleJSON) as ReadmeDrift
|
|
38
|
+
console.log(exampleParsed)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
42
|
+
|
|
43
|
+
|