@abliteration/sdk 0.1.5 → 0.1.7

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.
Files changed (74) hide show
  1. package/.openapi-generator/FILES +20 -0
  2. package/README.md +14 -0
  3. package/dist/apis/ModelsApi.d.ts +217 -0
  4. package/dist/apis/ModelsApi.js +225 -1
  5. package/dist/esm/apis/ModelsApi.d.ts +217 -0
  6. package/dist/esm/apis/ModelsApi.js +224 -0
  7. package/dist/esm/models/DeletionSummary.d.ts +52 -0
  8. package/dist/esm/models/DeletionSummary.js +53 -0
  9. package/dist/esm/models/DeletionSummaryTimelineInner.d.ts +34 -0
  10. package/dist/esm/models/DeletionSummaryTimelineInner.js +43 -0
  11. package/dist/esm/models/DeletionSummaryTopByDownloadsInner.d.ts +42 -0
  12. package/dist/esm/models/DeletionSummaryTopByDownloadsInner.js +47 -0
  13. package/dist/esm/models/GetHistoricalDeletionSummary200Response.d.ts +67 -0
  14. package/dist/esm/models/GetHistoricalDeletionSummary200Response.js +79 -0
  15. package/dist/esm/models/GetModelReadmeAt200Response.d.ts +67 -0
  16. package/dist/esm/models/GetModelReadmeAt200Response.js +79 -0
  17. package/dist/esm/models/HistoricalDeletion.d.ts +50 -0
  18. package/dist/esm/models/HistoricalDeletion.js +51 -0
  19. package/dist/esm/models/ListHistoricalDeletions200Response.d.ts +67 -0
  20. package/dist/esm/models/ListHistoricalDeletions200Response.js +79 -0
  21. package/dist/esm/models/ListModelReadmeDrifts200Response.d.ts +67 -0
  22. package/dist/esm/models/ListModelReadmeDrifts200Response.js +79 -0
  23. package/dist/esm/models/ReadmeAt.d.ts +38 -0
  24. package/dist/esm/models/ReadmeAt.js +45 -0
  25. package/dist/esm/models/ReadmeDrift.d.ts +46 -0
  26. package/dist/esm/models/ReadmeDrift.js +49 -0
  27. package/dist/esm/models/index.d.ts +10 -0
  28. package/dist/esm/models/index.js +10 -0
  29. package/dist/models/DeletionSummary.d.ts +52 -0
  30. package/dist/models/DeletionSummary.js +60 -0
  31. package/dist/models/DeletionSummaryTimelineInner.d.ts +34 -0
  32. package/dist/models/DeletionSummaryTimelineInner.js +50 -0
  33. package/dist/models/DeletionSummaryTopByDownloadsInner.d.ts +42 -0
  34. package/dist/models/DeletionSummaryTopByDownloadsInner.js +54 -0
  35. package/dist/models/GetHistoricalDeletionSummary200Response.d.ts +67 -0
  36. package/dist/models/GetHistoricalDeletionSummary200Response.js +87 -0
  37. package/dist/models/GetModelReadmeAt200Response.d.ts +67 -0
  38. package/dist/models/GetModelReadmeAt200Response.js +87 -0
  39. package/dist/models/HistoricalDeletion.d.ts +50 -0
  40. package/dist/models/HistoricalDeletion.js +58 -0
  41. package/dist/models/ListHistoricalDeletions200Response.d.ts +67 -0
  42. package/dist/models/ListHistoricalDeletions200Response.js +87 -0
  43. package/dist/models/ListModelReadmeDrifts200Response.d.ts +67 -0
  44. package/dist/models/ListModelReadmeDrifts200Response.js +87 -0
  45. package/dist/models/ReadmeAt.d.ts +38 -0
  46. package/dist/models/ReadmeAt.js +52 -0
  47. package/dist/models/ReadmeDrift.d.ts +46 -0
  48. package/dist/models/ReadmeDrift.js +56 -0
  49. package/dist/models/index.d.ts +10 -0
  50. package/dist/models/index.js +10 -0
  51. package/docs/DeletionSummary.md +45 -0
  52. package/docs/DeletionSummaryTimelineInner.md +36 -0
  53. package/docs/DeletionSummaryTopByDownloadsInner.md +40 -0
  54. package/docs/GetHistoricalDeletionSummary200Response.md +48 -0
  55. package/docs/GetModelReadmeAt200Response.md +48 -0
  56. package/docs/HistoricalDeletion.md +44 -0
  57. package/docs/ListHistoricalDeletions200Response.md +48 -0
  58. package/docs/ListModelReadmeDrifts200Response.md +48 -0
  59. package/docs/ModelsApi.md +321 -0
  60. package/docs/ReadmeAt.md +39 -0
  61. package/docs/ReadmeDrift.md +43 -0
  62. package/package.json +1 -1
  63. package/src/apis/ModelsApi.ts +436 -0
  64. package/src/models/DeletionSummary.ts +108 -0
  65. package/src/models/DeletionSummaryTimelineInner.ts +69 -0
  66. package/src/models/DeletionSummaryTopByDownloadsInner.ts +81 -0
  67. package/src/models/GetHistoricalDeletionSummary200Response.ts +132 -0
  68. package/src/models/GetModelReadmeAt200Response.ts +132 -0
  69. package/src/models/HistoricalDeletion.ts +93 -0
  70. package/src/models/ListHistoricalDeletions200Response.ts +132 -0
  71. package/src/models/ListModelReadmeDrifts200Response.ts +132 -0
  72. package/src/models/ReadmeAt.ts +75 -0
  73. package/src/models/ReadmeDrift.ts +87 -0
  74. package/src/models/index.ts +10 -0
package/docs/ModelsApi.md CHANGED
@@ -4,12 +4,83 @@ All URIs are relative to *https://abliteration.org*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**getHistoricalDeletionSummary**](ModelsApi.md#gethistoricaldeletionsummary) | **GET** /api/v1/models/historical-deletions/summary | Historical deletions — aggregate summary |
7
8
  | [**getModel**](ModelsApi.md#getmodel) | **GET** /api/v1/models/{id} | Get one model |
9
+ | [**getModelReadmeAt**](ModelsApi.md#getmodelreadmeat) | **GET** /api/v1/models/{id}/readme-at/{commit} | README content at one commit (wayback) |
8
10
  | [**listDelistedModels**](ModelsApi.md#listdelistedmodels) | **GET** /api/v1/models/delisted | List delisted models (change stream) |
11
+ | [**listHistoricalDeletions**](ModelsApi.md#listhistoricaldeletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list |
12
+ | [**listModelReadmeDrifts**](ModelsApi.md#listmodelreadmedrifts) | **GET** /api/v1/models/{id}/drifts | README drift stream for one model |
9
13
  | [**listModels**](ModelsApi.md#listmodels) | **GET** /api/v1/models | List models |
10
14
 
11
15
 
12
16
 
17
+ ## getHistoricalDeletionSummary
18
+
19
+ > GetHistoricalDeletionSummary200Response getHistoricalDeletionSummary()
20
+
21
+ Historical deletions — aggregate summary
22
+
23
+ Cost: 20 credits, flat. Aggregates from the 24-month HF snapshot analysis: total ever seen, total deleted, deletion rate, average months alive, monthly timeline of losses, top-10 by peak downloads. One call replaces half a dozen separate queries.
24
+
25
+ ### Example
26
+
27
+ ```ts
28
+ import {
29
+ Configuration,
30
+ ModelsApi,
31
+ } from '@abliteration/sdk';
32
+ import type { GetHistoricalDeletionSummaryRequest } from '@abliteration/sdk';
33
+
34
+ async function example() {
35
+ console.log("🚀 Testing @abliteration/sdk SDK...");
36
+ const config = new Configuration({
37
+ // Configure HTTP bearer authorization: bearerAuth
38
+ accessToken: "YOUR BEARER TOKEN",
39
+ });
40
+ const api = new ModelsApi(config);
41
+
42
+ try {
43
+ const data = await api.getHistoricalDeletionSummary();
44
+ console.log(data);
45
+ } catch (error) {
46
+ console.error(error);
47
+ }
48
+ }
49
+
50
+ // Run the test
51
+ example().catch(console.error);
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+ This endpoint does not need any parameter.
57
+
58
+ ### Return type
59
+
60
+ [**GetHistoricalDeletionSummary200Response**](GetHistoricalDeletionSummary200Response.md)
61
+
62
+ ### Authorization
63
+
64
+ [bearerAuth](../README.md#bearerAuth)
65
+
66
+ ### HTTP request headers
67
+
68
+ - **Content-Type**: Not defined
69
+ - **Accept**: `application/json`
70
+
71
+
72
+ ### HTTP response details
73
+ | Status code | Description | Response headers |
74
+ |-------------|-------------|------------------|
75
+ | **200** | Deletion summary. | - |
76
+ | **401** | Missing, unknown or revoked key. | - |
77
+ | **402** | Not enough credits. Only possible while metering is enabled. | - |
78
+ | **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
79
+ | **503** | Catalog temporarily unreadable. Nothing was charged. | - |
80
+
81
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
82
+
83
+
13
84
  ## getModel
14
85
 
15
86
  > GetModel200Response getModel(id)
@@ -86,6 +157,85 @@ example().catch(console.error);
86
157
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
87
158
 
88
159
 
160
+ ## getModelReadmeAt
161
+
162
+ > GetModelReadmeAt200Response getModelReadmeAt(id, commit)
163
+
164
+ README content at one commit (wayback)
165
+
166
+ 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.
167
+
168
+ ### Example
169
+
170
+ ```ts
171
+ import {
172
+ Configuration,
173
+ ModelsApi,
174
+ } from '@abliteration/sdk';
175
+ import type { GetModelReadmeAtRequest } from '@abliteration/sdk';
176
+
177
+ async function example() {
178
+ console.log("🚀 Testing @abliteration/sdk SDK...");
179
+ const config = new Configuration({
180
+ // Configure HTTP bearer authorization: bearerAuth
181
+ accessToken: "YOUR BEARER TOKEN",
182
+ });
183
+ const api = new ModelsApi(config);
184
+
185
+ const body = {
186
+ // string
187
+ id: id_example,
188
+ // string | HF commit sha for the README, from /drifts.
189
+ commit: commit_example,
190
+ } satisfies GetModelReadmeAtRequest;
191
+
192
+ try {
193
+ const data = await api.getModelReadmeAt(body);
194
+ console.log(data);
195
+ } catch (error) {
196
+ console.error(error);
197
+ }
198
+ }
199
+
200
+ // Run the test
201
+ example().catch(console.error);
202
+ ```
203
+
204
+ ### Parameters
205
+
206
+
207
+ | Name | Type | Description | Notes |
208
+ |------------- | ------------- | ------------- | -------------|
209
+ | **id** | `string` | | [Defaults to `undefined`] |
210
+ | **commit** | `string` | HF commit sha for the README, from /drifts. | [Defaults to `undefined`] |
211
+
212
+ ### Return type
213
+
214
+ [**GetModelReadmeAt200Response**](GetModelReadmeAt200Response.md)
215
+
216
+ ### Authorization
217
+
218
+ [bearerAuth](../README.md#bearerAuth)
219
+
220
+ ### HTTP request headers
221
+
222
+ - **Content-Type**: Not defined
223
+ - **Accept**: `application/json`
224
+
225
+
226
+ ### HTTP response details
227
+ | Status code | Description | Response headers |
228
+ |-------------|-------------|------------------|
229
+ | **200** | README content at commit. | - |
230
+ | **401** | Missing, unknown or revoked key. | - |
231
+ | **402** | Not enough credits. Only possible while metering is enabled. | - |
232
+ | **404** | No such entity. | - |
233
+ | **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
234
+ | **503** | Catalog temporarily unreadable. Nothing was charged. | - |
235
+
236
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
237
+
238
+
89
239
  ## listDelistedModels
90
240
 
91
241
  > ListDelistedModels200Response listDelistedModels(since, sort, limit, offset)
@@ -170,6 +320,177 @@ example().catch(console.error);
170
320
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
171
321
 
172
322
 
323
+ ## listHistoricalDeletions
324
+
325
+ > ListHistoricalDeletions200Response listHistoricalDeletions(sinceMonth, minPeakDownloads, sort, limit, offset)
326
+
327
+ Historical deletions — paged list
328
+
329
+ Cost: 5 credits, flat. Paged/filterable window on the 24-month deletion backlog. Rows are frozen at the moment the model was last seen on the Hub — peak_downloads and total_months_alive never change after death. Sort by size (`downloads`, default), recency (`recent`, newest deaths first) or lifespan (`lifespan`, longest-lived first — surprising deaths).
330
+
331
+ ### Example
332
+
333
+ ```ts
334
+ import {
335
+ Configuration,
336
+ ModelsApi,
337
+ } from '@abliteration/sdk';
338
+ import type { ListHistoricalDeletionsRequest } from '@abliteration/sdk';
339
+
340
+ async function example() {
341
+ console.log("🚀 Testing @abliteration/sdk SDK...");
342
+ const config = new Configuration({
343
+ // Configure HTTP bearer authorization: bearerAuth
344
+ accessToken: "YOUR BEARER TOKEN",
345
+ });
346
+ const api = new ModelsApi(config);
347
+
348
+ const body = {
349
+ // string | ISO YYYY-MM. Rows with last_seen_month >= it only. (optional)
350
+ sinceMonth: sinceMonth_example,
351
+ // number | Only rows whose peak downloads >= this. `casualties over N` queries. (optional)
352
+ minPeakDownloads: 56,
353
+ // 'downloads' | 'recent' | 'lifespan' | `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (longest-lived first). (optional)
354
+ sort: sort_example,
355
+ // number | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (optional)
356
+ limit: 56,
357
+ // number | Rows to skip. Negative and non-numeric values are treated as 0. (optional)
358
+ offset: 56,
359
+ } satisfies ListHistoricalDeletionsRequest;
360
+
361
+ try {
362
+ const data = await api.listHistoricalDeletions(body);
363
+ console.log(data);
364
+ } catch (error) {
365
+ console.error(error);
366
+ }
367
+ }
368
+
369
+ // Run the test
370
+ example().catch(console.error);
371
+ ```
372
+
373
+ ### Parameters
374
+
375
+
376
+ | Name | Type | Description | Notes |
377
+ |------------- | ------------- | ------------- | -------------|
378
+ | **sinceMonth** | `string` | ISO YYYY-MM. Rows with last_seen_month >= it only. | [Optional] [Defaults to `undefined`] |
379
+ | **minPeakDownloads** | `number` | Only rows whose peak downloads >= this. `casualties over N` queries. | [Optional] [Defaults to `undefined`] |
380
+ | **sort** | `downloads`, `recent`, `lifespan` | `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (longest-lived first). | [Optional] [Defaults to `'downloads'`] [Enum: downloads, recent, lifespan] |
381
+ | **limit** | `number` | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [Optional] [Defaults to `50`] |
382
+ | **offset** | `number` | Rows to skip. Negative and non-numeric values are treated as 0. | [Optional] [Defaults to `0`] |
383
+
384
+ ### Return type
385
+
386
+ [**ListHistoricalDeletions200Response**](ListHistoricalDeletions200Response.md)
387
+
388
+ ### Authorization
389
+
390
+ [bearerAuth](../README.md#bearerAuth)
391
+
392
+ ### HTTP request headers
393
+
394
+ - **Content-Type**: Not defined
395
+ - **Accept**: `application/json`
396
+
397
+
398
+ ### HTTP response details
399
+ | Status code | Description | Response headers |
400
+ |-------------|-------------|------------------|
401
+ | **200** | Historical deletions. | - |
402
+ | **401** | Missing, unknown or revoked key. | - |
403
+ | **402** | Not enough credits. Only possible while metering is enabled. | - |
404
+ | **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
405
+ | **503** | Catalog temporarily unreadable. Nothing was charged. | - |
406
+
407
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
408
+
409
+
410
+ ## listModelReadmeDrifts
411
+
412
+ > ListModelReadmeDrifts200Response listModelReadmeDrifts(id, sinceTs, limit, offset)
413
+
414
+ README drift stream for one model
415
+
416
+ 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.
417
+
418
+ ### Example
419
+
420
+ ```ts
421
+ import {
422
+ Configuration,
423
+ ModelsApi,
424
+ } from '@abliteration/sdk';
425
+ import type { ListModelReadmeDriftsRequest } from '@abliteration/sdk';
426
+
427
+ async function example() {
428
+ console.log("🚀 Testing @abliteration/sdk SDK...");
429
+ const config = new Configuration({
430
+ // Configure HTTP bearer authorization: bearerAuth
431
+ accessToken: "YOUR BEARER TOKEN",
432
+ });
433
+ const api = new ModelsApi(config);
434
+
435
+ const body = {
436
+ // string
437
+ id: mlabonne/Qwen3-30B-A3B-abliterated,
438
+ // number | Unix epoch seconds. Rows with commit_ts >= it only. (optional)
439
+ sinceTs: 789,
440
+ // number | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (optional)
441
+ limit: 56,
442
+ // number | Rows to skip. Negative and non-numeric values are treated as 0. (optional)
443
+ offset: 56,
444
+ } satisfies ListModelReadmeDriftsRequest;
445
+
446
+ try {
447
+ const data = await api.listModelReadmeDrifts(body);
448
+ console.log(data);
449
+ } catch (error) {
450
+ console.error(error);
451
+ }
452
+ }
453
+
454
+ // Run the test
455
+ example().catch(console.error);
456
+ ```
457
+
458
+ ### Parameters
459
+
460
+
461
+ | Name | Type | Description | Notes |
462
+ |------------- | ------------- | ------------- | -------------|
463
+ | **id** | `string` | | [Defaults to `undefined`] |
464
+ | **sinceTs** | `number` | Unix epoch seconds. Rows with commit_ts >= it only. | [Optional] [Defaults to `undefined`] |
465
+ | **limit** | `number` | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [Optional] [Defaults to `50`] |
466
+ | **offset** | `number` | Rows to skip. Negative and non-numeric values are treated as 0. | [Optional] [Defaults to `0`] |
467
+
468
+ ### Return type
469
+
470
+ [**ListModelReadmeDrifts200Response**](ListModelReadmeDrifts200Response.md)
471
+
472
+ ### Authorization
473
+
474
+ [bearerAuth](../README.md#bearerAuth)
475
+
476
+ ### HTTP request headers
477
+
478
+ - **Content-Type**: Not defined
479
+ - **Accept**: `application/json`
480
+
481
+
482
+ ### HTTP response details
483
+ | Status code | Description | Response headers |
484
+ |-------------|-------------|------------------|
485
+ | **200** | README commits. | - |
486
+ | **401** | Missing, unknown or revoked key. | - |
487
+ | **402** | Not enough credits. Only possible while metering is enabled. | - |
488
+ | **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
489
+ | **503** | Catalog temporarily unreadable. Nothing was charged. | - |
490
+
491
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
492
+
493
+
173
494
  ## listModels
174
495
 
175
496
  > ListModels200Response listModels(method, family, author, license, downloadsGte, downloadsLte, createdAfter, createdBefore, delisted, sort, limit, offset)
@@ -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
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abliteration/sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "OpenAPI client for @abliteration/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {