@abliteration/sdk 0.1.6 → 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 (38) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +6 -0
  3. package/dist/apis/ModelsApi.d.ts +108 -0
  4. package/dist/apis/ModelsApi.js +111 -0
  5. package/dist/esm/apis/ModelsApi.d.ts +108 -0
  6. package/dist/esm/apis/ModelsApi.js +111 -0
  7. package/dist/esm/models/GetModelReadmeAt200Response.d.ts +67 -0
  8. package/dist/esm/models/GetModelReadmeAt200Response.js +79 -0
  9. package/dist/esm/models/ListModelReadmeDrifts200Response.d.ts +67 -0
  10. package/dist/esm/models/ListModelReadmeDrifts200Response.js +79 -0
  11. package/dist/esm/models/ReadmeAt.d.ts +38 -0
  12. package/dist/esm/models/ReadmeAt.js +45 -0
  13. package/dist/esm/models/ReadmeDrift.d.ts +46 -0
  14. package/dist/esm/models/ReadmeDrift.js +49 -0
  15. package/dist/esm/models/index.d.ts +4 -0
  16. package/dist/esm/models/index.js +4 -0
  17. package/dist/models/GetModelReadmeAt200Response.d.ts +67 -0
  18. package/dist/models/GetModelReadmeAt200Response.js +87 -0
  19. package/dist/models/ListModelReadmeDrifts200Response.d.ts +67 -0
  20. package/dist/models/ListModelReadmeDrifts200Response.js +87 -0
  21. package/dist/models/ReadmeAt.d.ts +38 -0
  22. package/dist/models/ReadmeAt.js +52 -0
  23. package/dist/models/ReadmeDrift.d.ts +46 -0
  24. package/dist/models/ReadmeDrift.js +56 -0
  25. package/dist/models/index.d.ts +4 -0
  26. package/dist/models/index.js +4 -0
  27. package/docs/GetModelReadmeAt200Response.md +48 -0
  28. package/docs/ListModelReadmeDrifts200Response.md +48 -0
  29. package/docs/ModelsApi.md +165 -0
  30. package/docs/ReadmeAt.md +39 -0
  31. package/docs/ReadmeDrift.md +43 -0
  32. package/package.json +1 -1
  33. package/src/apis/ModelsApi.ts +226 -0
  34. package/src/models/GetModelReadmeAt200Response.ts +132 -0
  35. package/src/models/ListModelReadmeDrifts200Response.ts +132 -0
  36. package/src/models/ReadmeAt.ts +75 -0
  37. package/src/models/ReadmeDrift.ts +87 -0
  38. package/src/models/index.ts +4 -0
package/docs/ModelsApi.md CHANGED
@@ -6,8 +6,10 @@ 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
+ | [**getModelReadmeAt**](ModelsApi.md#getmodelreadmeat) | **GET** /api/v1/models/{id}/readme-at/{commit} | README content at one commit (wayback) |
9
10
  | [**listDelistedModels**](ModelsApi.md#listdelistedmodels) | **GET** /api/v1/models/delisted | List delisted models (change stream) |
10
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 |
11
13
  | [**listModels**](ModelsApi.md#listmodels) | **GET** /api/v1/models | List models |
12
14
 
13
15
 
@@ -155,6 +157,85 @@ example().catch(console.error);
155
157
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
156
158
 
157
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
+
158
239
  ## listDelistedModels
159
240
 
160
241
  > ListDelistedModels200Response listDelistedModels(since, sort, limit, offset)
@@ -326,6 +407,90 @@ example().catch(console.error);
326
407
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
327
408
 
328
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
+
329
494
  ## listModels
330
495
 
331
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.6",
3
+ "version": "0.1.7",
4
4
  "description": "OpenAPI client for @abliteration/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -23,6 +23,11 @@ import {
23
23
  GetModel200ResponseFromJSON,
24
24
  GetModel200ResponseToJSON,
25
25
  } from '../models/GetModel200Response';
26
+ import {
27
+ type GetModelReadmeAt200Response,
28
+ GetModelReadmeAt200ResponseFromJSON,
29
+ GetModelReadmeAt200ResponseToJSON,
30
+ } from '../models/GetModelReadmeAt200Response';
26
31
  import {
27
32
  type ListDelistedModels200Response,
28
33
  ListDelistedModels200ResponseFromJSON,
@@ -33,6 +38,11 @@ import {
33
38
  ListHistoricalDeletions200ResponseFromJSON,
34
39
  ListHistoricalDeletions200ResponseToJSON,
35
40
  } from '../models/ListHistoricalDeletions200Response';
41
+ import {
42
+ type ListModelReadmeDrifts200Response,
43
+ ListModelReadmeDrifts200ResponseFromJSON,
44
+ ListModelReadmeDrifts200ResponseToJSON,
45
+ } from '../models/ListModelReadmeDrifts200Response';
36
46
  import {
37
47
  type ListModels200Response,
38
48
  ListModels200ResponseFromJSON,
@@ -46,6 +56,17 @@ export interface GetModelRequest {
46
56
  id: string;
47
57
  }
48
58
 
59
+ export interface GetModelReadmeAtRequest {
60
+ /**
61
+ *
62
+ */
63
+ id: string;
64
+ /**
65
+ * HF commit sha for the README, from /drifts.
66
+ */
67
+ commit: string;
68
+ }
69
+
49
70
  export interface ListDelistedModelsRequest {
50
71
  /**
51
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.
@@ -88,6 +109,25 @@ export interface ListHistoricalDeletionsRequest {
88
109
  offset?: number;
89
110
  }
90
111
 
112
+ export interface ListModelReadmeDriftsRequest {
113
+ /**
114
+ *
115
+ */
116
+ id: string;
117
+ /**
118
+ * Unix epoch seconds. Rows with commit_ts >= it only.
119
+ */
120
+ sinceTs?: number;
121
+ /**
122
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
123
+ */
124
+ limit?: number;
125
+ /**
126
+ * Rows to skip. Negative and non-numeric values are treated as 0.
127
+ */
128
+ offset?: number;
129
+ }
130
+
91
131
  export interface ListModelsRequest {
92
132
  /**
93
133
  * M-code, case-insensitive. See GET /api/v1/methods.
@@ -192,6 +232,32 @@ export interface ModelsApiInterface {
192
232
  */
193
233
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
194
234
 
235
+ /**
236
+ * Creates request options for getModelReadmeAt without sending the request
237
+ * @param {string} id
238
+ * @param {string} commit HF commit sha for the README, from /drifts.
239
+ * @throws {RequiredError}
240
+ * @memberof ModelsApiInterface
241
+ */
242
+ getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts>;
243
+
244
+ /**
245
+ * 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.
246
+ * @summary README content at one commit (wayback)
247
+ * @param {string} id
248
+ * @param {string} commit HF commit sha for the README, from /drifts.
249
+ * @param {*} [options] Override http request option.
250
+ * @throws {RequiredError}
251
+ * @memberof ModelsApiInterface
252
+ */
253
+ getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>>;
254
+
255
+ /**
256
+ * 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.
257
+ * README content at one commit (wayback)
258
+ */
259
+ getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
260
+
195
261
  /**
196
262
  * Creates request options for listDelistedModels without sending the request
197
263
  * @param {string} [since] ISO-8601 date or timestamp. Rows with last_seen_at &gt;&#x3D; since only. Use your previous poll\&#39;s newest last_seen_at to build an incremental feed.
@@ -254,6 +320,36 @@ export interface ModelsApiInterface {
254
320
  */
255
321
  listHistoricalDeletions(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
256
322
 
323
+ /**
324
+ * Creates request options for listModelReadmeDrifts without sending the request
325
+ * @param {string} id
326
+ * @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
327
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
328
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
329
+ * @throws {RequiredError}
330
+ * @memberof ModelsApiInterface
331
+ */
332
+ listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts>;
333
+
334
+ /**
335
+ * 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.
336
+ * @summary README drift stream for one model
337
+ * @param {string} id
338
+ * @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
339
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
340
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ * @memberof ModelsApiInterface
344
+ */
345
+ listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>>;
346
+
347
+ /**
348
+ * 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.
349
+ * README drift stream for one model
350
+ */
351
+ listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response>;
352
+
257
353
  /**
258
354
  * Creates request options for listModels without sending the request
259
355
  * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
@@ -409,6 +505,69 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
409
505
  return await response.value();
410
506
  }
411
507
 
508
+ /**
509
+ * Creates request options for getModelReadmeAt without sending the request
510
+ */
511
+ async getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts> {
512
+ if (requestParameters['id'] == null) {
513
+ throw new runtime.RequiredError(
514
+ 'id',
515
+ 'Required parameter "id" was null or undefined when calling getModelReadmeAt().'
516
+ );
517
+ }
518
+
519
+ if (requestParameters['commit'] == null) {
520
+ throw new runtime.RequiredError(
521
+ 'commit',
522
+ 'Required parameter "commit" was null or undefined when calling getModelReadmeAt().'
523
+ );
524
+ }
525
+
526
+ const queryParameters: any = {};
527
+
528
+ const headerParameters: runtime.HTTPHeaders = {};
529
+
530
+ if (this.configuration && this.configuration.accessToken) {
531
+ const token = this.configuration.accessToken;
532
+ const tokenString = await token("bearerAuth", []);
533
+
534
+ if (tokenString) {
535
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
536
+ }
537
+ }
538
+
539
+ let urlPath = `/api/v1/models/{id}/readme-at/{commit}`;
540
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
541
+ urlPath = urlPath.replace('{commit}', encodeURIComponent(String(requestParameters['commit'])));
542
+
543
+ return {
544
+ path: urlPath,
545
+ method: 'GET',
546
+ headers: headerParameters,
547
+ query: queryParameters,
548
+ };
549
+ }
550
+
551
+ /**
552
+ * 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.
553
+ * README content at one commit (wayback)
554
+ */
555
+ async getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>> {
556
+ const requestOptions = await this.getModelReadmeAtRequestOpts(requestParameters);
557
+ const response = await this.request(requestOptions, initOverrides);
558
+
559
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetModelReadmeAt200ResponseFromJSON(jsonValue));
560
+ }
561
+
562
+ /**
563
+ * 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.
564
+ * README content at one commit (wayback)
565
+ */
566
+ async getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response> {
567
+ const response = await this.getModelReadmeAtRaw(requestParameters, initOverrides);
568
+ return await response.value();
569
+ }
570
+
412
571
  /**
413
572
  * Creates request options for listDelistedModels without sending the request
414
573
  */
@@ -539,6 +698,73 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
539
698
  return await response.value();
540
699
  }
541
700
 
701
+ /**
702
+ * Creates request options for listModelReadmeDrifts without sending the request
703
+ */
704
+ async listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts> {
705
+ if (requestParameters['id'] == null) {
706
+ throw new runtime.RequiredError(
707
+ 'id',
708
+ 'Required parameter "id" was null or undefined when calling listModelReadmeDrifts().'
709
+ );
710
+ }
711
+
712
+ const queryParameters: any = {};
713
+
714
+ if (requestParameters['sinceTs'] != null) {
715
+ queryParameters['since_ts'] = requestParameters['sinceTs'];
716
+ }
717
+
718
+ if (requestParameters['limit'] != null) {
719
+ queryParameters['limit'] = requestParameters['limit'];
720
+ }
721
+
722
+ if (requestParameters['offset'] != null) {
723
+ queryParameters['offset'] = requestParameters['offset'];
724
+ }
725
+
726
+ const headerParameters: runtime.HTTPHeaders = {};
727
+
728
+ if (this.configuration && this.configuration.accessToken) {
729
+ const token = this.configuration.accessToken;
730
+ const tokenString = await token("bearerAuth", []);
731
+
732
+ if (tokenString) {
733
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
734
+ }
735
+ }
736
+
737
+ let urlPath = `/api/v1/models/{id}/drifts`;
738
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
739
+
740
+ return {
741
+ path: urlPath,
742
+ method: 'GET',
743
+ headers: headerParameters,
744
+ query: queryParameters,
745
+ };
746
+ }
747
+
748
+ /**
749
+ * 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.
750
+ * README drift stream for one model
751
+ */
752
+ async listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>> {
753
+ const requestOptions = await this.listModelReadmeDriftsRequestOpts(requestParameters);
754
+ const response = await this.request(requestOptions, initOverrides);
755
+
756
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListModelReadmeDrifts200ResponseFromJSON(jsonValue));
757
+ }
758
+
759
+ /**
760
+ * 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.
761
+ * README drift stream for one model
762
+ */
763
+ async listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response> {
764
+ const response = await this.listModelReadmeDriftsRaw(requestParameters, initOverrides);
765
+ return await response.value();
766
+ }
767
+
542
768
  /**
543
769
  * Creates request options for listModels without sending the request
544
770
  */
@@ -0,0 +1,132 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * abliteration.org Public API
5
+ * Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { ReadmeAt } from './ReadmeAt';
17
+ import {
18
+ ReadmeAtFromJSON,
19
+ ReadmeAtFromJSONTyped,
20
+ ReadmeAtToJSON,
21
+ ReadmeAtToJSONTyped,
22
+ } from './ReadmeAt';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface GetModelReadmeAt200Response
28
+ */
29
+ export interface GetModelReadmeAt200Response {
30
+ /**
31
+ *
32
+ */
33
+ data: ReadmeAt;
34
+ /**
35
+ * Credits this call costs.
36
+ */
37
+ cost: number;
38
+ /**
39
+ * Wallet balance after the call. Unchanged while metering is preview.
40
+ */
41
+ credits_remaining: number;
42
+ /**
43
+ * Ceiling for the current window. Also returned as X-RateLimit-Limit.
44
+ */
45
+ rate_limit_limit: number;
46
+ /**
47
+ * Calls left in the current window for this key. Also returned as X-RateLimit-Remaining.
48
+ */
49
+ rate_limit_remaining: number;
50
+ /**
51
+ * Unix seconds at which the window resets to full ceiling. Also returned as X-RateLimit-Reset.
52
+ */
53
+ rate_limit_reset: number;
54
+ /**
55
+ * Whether cost was actually deducted.
56
+ */
57
+ metering: GetModelReadmeAt200ResponseMeteringEnum;
58
+ /**
59
+ * Also returned in the x-request-id header.
60
+ */
61
+ request_id: string;
62
+ }
63
+
64
+
65
+ /**
66
+ * @export
67
+ */
68
+ export const GetModelReadmeAt200ResponseMeteringEnum = {
69
+ Preview: 'preview',
70
+ Billed: 'billed',
71
+ } as const;
72
+ export type GetModelReadmeAt200ResponseMeteringEnum = typeof GetModelReadmeAt200ResponseMeteringEnum[keyof typeof GetModelReadmeAt200ResponseMeteringEnum];
73
+
74
+
75
+ /**
76
+ * Check if a given object implements the GetModelReadmeAt200Response interface.
77
+ */
78
+ export function instanceOfGetModelReadmeAt200Response(value: object): value is GetModelReadmeAt200Response {
79
+ if (!('data' in value) || value['data'] === undefined) return false;
80
+ if (!('cost' in value) || value['cost'] === undefined) return false;
81
+ if (!('credits_remaining' in value) || value['credits_remaining'] === undefined) return false;
82
+ if (!('rate_limit_limit' in value) || value['rate_limit_limit'] === undefined) return false;
83
+ if (!('rate_limit_remaining' in value) || value['rate_limit_remaining'] === undefined) return false;
84
+ if (!('rate_limit_reset' in value) || value['rate_limit_reset'] === undefined) return false;
85
+ if (!('metering' in value) || value['metering'] === undefined) return false;
86
+ if (!('request_id' in value) || value['request_id'] === undefined) return false;
87
+ return true;
88
+ }
89
+
90
+ export function GetModelReadmeAt200ResponseFromJSON(json: any): GetModelReadmeAt200Response {
91
+ return GetModelReadmeAt200ResponseFromJSONTyped(json, false);
92
+ }
93
+
94
+ export function GetModelReadmeAt200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetModelReadmeAt200Response {
95
+ if (json == null) {
96
+ return json;
97
+ }
98
+ return {
99
+
100
+ 'data': ReadmeAtFromJSON(json['data']),
101
+ 'cost': json['cost'],
102
+ 'credits_remaining': json['credits_remaining'],
103
+ 'rate_limit_limit': json['rate_limit_limit'],
104
+ 'rate_limit_remaining': json['rate_limit_remaining'],
105
+ 'rate_limit_reset': json['rate_limit_reset'],
106
+ 'metering': json['metering'],
107
+ 'request_id': json['request_id'],
108
+ };
109
+ }
110
+
111
+ export function GetModelReadmeAt200ResponseToJSON(json: any): GetModelReadmeAt200Response {
112
+ return GetModelReadmeAt200ResponseToJSONTyped(json, false);
113
+ }
114
+
115
+ export function GetModelReadmeAt200ResponseToJSONTyped(value?: GetModelReadmeAt200Response | null, ignoreDiscriminator: boolean = false): any {
116
+ if (value == null) {
117
+ return value;
118
+ }
119
+
120
+ return {
121
+
122
+ 'data': ReadmeAtToJSON(value['data']),
123
+ 'cost': value['cost'],
124
+ 'credits_remaining': value['credits_remaining'],
125
+ 'rate_limit_limit': value['rate_limit_limit'],
126
+ 'rate_limit_remaining': value['rate_limit_remaining'],
127
+ 'rate_limit_reset': value['rate_limit_reset'],
128
+ 'metering': value['metering'],
129
+ 'request_id': value['request_id'],
130
+ };
131
+ }
132
+