@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
@@ -20,6 +20,7 @@ docs/GetHistoricalDeletionSummary200Response.md
20
20
  docs/GetIndex200Response.md
21
21
  docs/GetMethod200Response.md
22
22
  docs/GetModel200Response.md
23
+ docs/GetModelReadmeAt200Response.md
23
24
  docs/HistoricalDeletion.md
24
25
  docs/IndexDetail.md
25
26
  docs/IndicesApi.md
@@ -29,6 +30,7 @@ docs/ListDelistedModels200Response.md
29
30
  docs/ListHistoricalDeletions200Response.md
30
31
  docs/ListIndices200Response.md
31
32
  docs/ListMethods200Response.md
33
+ docs/ListModelReadmeDrifts200Response.md
32
34
  docs/ListModels200Response.md
33
35
  docs/ListTimeline200Response.md
34
36
  docs/Method.md
@@ -41,6 +43,8 @@ docs/ModelIndex.md
41
43
  docs/ModelSummary.md
42
44
  docs/ModelsApi.md
43
45
  docs/Passport.md
46
+ docs/ReadmeAt.md
47
+ docs/ReadmeDrift.md
44
48
  docs/TimelineApi.md
45
49
  package.json
46
50
  src/apis/AuthorsApi.ts
@@ -68,6 +72,7 @@ src/models/GetHistoricalDeletionSummary200Response.ts
68
72
  src/models/GetIndex200Response.ts
69
73
  src/models/GetMethod200Response.ts
70
74
  src/models/GetModel200Response.ts
75
+ src/models/GetModelReadmeAt200Response.ts
71
76
  src/models/HistoricalDeletion.ts
72
77
  src/models/IndexDetail.ts
73
78
  src/models/ListAuthors200Response.ts
@@ -76,6 +81,7 @@ src/models/ListDelistedModels200Response.ts
76
81
  src/models/ListHistoricalDeletions200Response.ts
77
82
  src/models/ListIndices200Response.ts
78
83
  src/models/ListMethods200Response.ts
84
+ src/models/ListModelReadmeDrifts200Response.ts
79
85
  src/models/ListModels200Response.ts
80
86
  src/models/ListTimeline200Response.ts
81
87
  src/models/Method.ts
@@ -86,6 +92,8 @@ src/models/ModelError.ts
86
92
  src/models/ModelIndex.ts
87
93
  src/models/ModelSummary.ts
88
94
  src/models/Passport.ts
95
+ src/models/ReadmeAt.ts
96
+ src/models/ReadmeDrift.ts
89
97
  src/models/index.ts
90
98
  src/runtime.ts
91
99
  tsconfig.esm.json
package/README.md CHANGED
@@ -64,8 +64,10 @@ All URIs are relative to *https://abliteration.org*
64
64
  *MethodsApi* | [**listMethods**](docs/MethodsApi.md#listmethods) | **GET** /api/v1/methods | List the method taxonomy
65
65
  *ModelsApi* | [**getHistoricalDeletionSummary**](docs/ModelsApi.md#gethistoricaldeletionsummary) | **GET** /api/v1/models/historical-deletions/summary | Historical deletions — aggregate summary
66
66
  *ModelsApi* | [**getModel**](docs/ModelsApi.md#getmodel) | **GET** /api/v1/models/{id} | Get one model
67
+ *ModelsApi* | [**getModelReadmeAt**](docs/ModelsApi.md#getmodelreadmeat) | **GET** /api/v1/models/{id}/readme-at/{commit} | README content at one commit (wayback)
67
68
  *ModelsApi* | [**listDelistedModels**](docs/ModelsApi.md#listdelistedmodels) | **GET** /api/v1/models/delisted | List delisted models (change stream)
68
69
  *ModelsApi* | [**listHistoricalDeletions**](docs/ModelsApi.md#listhistoricaldeletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list
70
+ *ModelsApi* | [**listModelReadmeDrifts**](docs/ModelsApi.md#listmodelreadmedrifts) | **GET** /api/v1/models/{id}/drifts | README drift stream for one model
69
71
  *ModelsApi* | [**listModels**](docs/ModelsApi.md#listmodels) | **GET** /api/v1/models | List models
70
72
  *TimelineApi* | [**listTimeline**](docs/TimelineApi.md#listtimeline) | **GET** /api/v1/timeline | Curated field events
71
73
 
@@ -89,6 +91,7 @@ All URIs are relative to *https://abliteration.org*
89
91
  - [GetIndex200Response](docs/GetIndex200Response.md)
90
92
  - [GetMethod200Response](docs/GetMethod200Response.md)
91
93
  - [GetModel200Response](docs/GetModel200Response.md)
94
+ - [GetModelReadmeAt200Response](docs/GetModelReadmeAt200Response.md)
92
95
  - [HistoricalDeletion](docs/HistoricalDeletion.md)
93
96
  - [IndexDetail](docs/IndexDetail.md)
94
97
  - [ListAuthors200Response](docs/ListAuthors200Response.md)
@@ -97,6 +100,7 @@ All URIs are relative to *https://abliteration.org*
97
100
  - [ListHistoricalDeletions200Response](docs/ListHistoricalDeletions200Response.md)
98
101
  - [ListIndices200Response](docs/ListIndices200Response.md)
99
102
  - [ListMethods200Response](docs/ListMethods200Response.md)
103
+ - [ListModelReadmeDrifts200Response](docs/ListModelReadmeDrifts200Response.md)
100
104
  - [ListModels200Response](docs/ListModels200Response.md)
101
105
  - [ListTimeline200Response](docs/ListTimeline200Response.md)
102
106
  - [Method](docs/Method.md)
@@ -107,6 +111,8 @@ All URIs are relative to *https://abliteration.org*
107
111
  - [ModelIndex](docs/ModelIndex.md)
108
112
  - [ModelSummary](docs/ModelSummary.md)
109
113
  - [Passport](docs/Passport.md)
114
+ - [ReadmeAt](docs/ReadmeAt.md)
115
+ - [ReadmeDrift](docs/ReadmeDrift.md)
110
116
 
111
117
  ### Authorization
112
118
 
@@ -12,8 +12,10 @@
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 GetModelReadmeAt200Response } from '../models/GetModelReadmeAt200Response';
15
16
  import { type ListDelistedModels200Response } from '../models/ListDelistedModels200Response';
16
17
  import { type ListHistoricalDeletions200Response } from '../models/ListHistoricalDeletions200Response';
18
+ import { type ListModelReadmeDrifts200Response } from '../models/ListModelReadmeDrifts200Response';
17
19
  import { type ListModels200Response } from '../models/ListModels200Response';
18
20
  export interface GetModelRequest {
19
21
  /**
@@ -21,6 +23,16 @@ export interface GetModelRequest {
21
23
  */
22
24
  id: string;
23
25
  }
26
+ export interface GetModelReadmeAtRequest {
27
+ /**
28
+ *
29
+ */
30
+ id: string;
31
+ /**
32
+ * HF commit sha for the README, from /drifts.
33
+ */
34
+ commit: string;
35
+ }
24
36
  export interface ListDelistedModelsRequest {
25
37
  /**
26
38
  * 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 +73,24 @@ export interface ListHistoricalDeletionsRequest {
61
73
  */
62
74
  offset?: number;
63
75
  }
76
+ export interface ListModelReadmeDriftsRequest {
77
+ /**
78
+ *
79
+ */
80
+ id: string;
81
+ /**
82
+ * Unix epoch seconds. Rows with commit_ts >= it only.
83
+ */
84
+ sinceTs?: number;
85
+ /**
86
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
87
+ */
88
+ limit?: number;
89
+ /**
90
+ * Rows to skip. Negative and non-numeric values are treated as 0.
91
+ */
92
+ offset?: number;
93
+ }
64
94
  export interface ListModelsRequest {
65
95
  /**
66
96
  * M-code, case-insensitive. See GET /api/v1/methods.
@@ -158,6 +188,29 @@ export interface ModelsApiInterface {
158
188
  * Get one model
159
189
  */
160
190
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
191
+ /**
192
+ * Creates request options for getModelReadmeAt without sending the request
193
+ * @param {string} id
194
+ * @param {string} commit HF commit sha for the README, from /drifts.
195
+ * @throws {RequiredError}
196
+ * @memberof ModelsApiInterface
197
+ */
198
+ getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts>;
199
+ /**
200
+ * 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.
201
+ * @summary README content at one commit (wayback)
202
+ * @param {string} id
203
+ * @param {string} commit HF commit sha for the README, from /drifts.
204
+ * @param {*} [options] Override http request option.
205
+ * @throws {RequiredError}
206
+ * @memberof ModelsApiInterface
207
+ */
208
+ getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>>;
209
+ /**
210
+ * 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.
211
+ * README content at one commit (wayback)
212
+ */
213
+ getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
161
214
  /**
162
215
  * Creates request options for listDelistedModels without sending the request
163
216
  * @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.
@@ -214,6 +267,33 @@ export interface ModelsApiInterface {
214
267
  * Historical deletions — paged list
215
268
  */
216
269
  listHistoricalDeletions(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
270
+ /**
271
+ * Creates request options for listModelReadmeDrifts without sending the request
272
+ * @param {string} id
273
+ * @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
274
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
275
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
276
+ * @throws {RequiredError}
277
+ * @memberof ModelsApiInterface
278
+ */
279
+ listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts>;
280
+ /**
281
+ * 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.
282
+ * @summary README drift stream for one model
283
+ * @param {string} id
284
+ * @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
285
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
286
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ * @memberof ModelsApiInterface
290
+ */
291
+ listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>>;
292
+ /**
293
+ * 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.
294
+ * README drift stream for one model
295
+ */
296
+ listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response>;
217
297
  /**
218
298
  * Creates request options for listModels without sending the request
219
299
  * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
@@ -290,6 +370,20 @@ export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInter
290
370
  * Get one model
291
371
  */
292
372
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
373
+ /**
374
+ * Creates request options for getModelReadmeAt without sending the request
375
+ */
376
+ getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts>;
377
+ /**
378
+ * 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.
379
+ * README content at one commit (wayback)
380
+ */
381
+ getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>>;
382
+ /**
383
+ * 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.
384
+ * README content at one commit (wayback)
385
+ */
386
+ getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
293
387
  /**
294
388
  * Creates request options for listDelistedModels without sending the request
295
389
  */
@@ -318,6 +412,20 @@ export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInter
318
412
  * Historical deletions — paged list
319
413
  */
320
414
  listHistoricalDeletions(requestParameters?: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
415
+ /**
416
+ * Creates request options for listModelReadmeDrifts without sending the request
417
+ */
418
+ listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts>;
419
+ /**
420
+ * 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.
421
+ * README drift stream for one model
422
+ */
423
+ listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>>;
424
+ /**
425
+ * 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.
426
+ * README drift stream for one model
427
+ */
428
+ listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response>;
321
429
  /**
322
430
  * Creates request options for listModels without sending the request
323
431
  */
@@ -26,8 +26,10 @@ exports.ListModelsSortEnum = exports.ListModelsDelistedEnum = exports.ListHistor
26
26
  const runtime = require("../runtime");
27
27
  const GetHistoricalDeletionSummary200Response_1 = require("../models/GetHistoricalDeletionSummary200Response");
28
28
  const GetModel200Response_1 = require("../models/GetModel200Response");
29
+ const GetModelReadmeAt200Response_1 = require("../models/GetModelReadmeAt200Response");
29
30
  const ListDelistedModels200Response_1 = require("../models/ListDelistedModels200Response");
30
31
  const ListHistoricalDeletions200Response_1 = require("../models/ListHistoricalDeletions200Response");
32
+ const ListModelReadmeDrifts200Response_1 = require("../models/ListModelReadmeDrifts200Response");
31
33
  const ListModels200Response_1 = require("../models/ListModels200Response");
32
34
  /**
33
35
  *
@@ -125,6 +127,58 @@ class ModelsApi extends runtime.BaseAPI {
125
127
  return yield response.value();
126
128
  });
127
129
  }
130
+ /**
131
+ * Creates request options for getModelReadmeAt without sending the request
132
+ */
133
+ getModelReadmeAtRequestOpts(requestParameters) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ if (requestParameters['id'] == null) {
136
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getModelReadmeAt().');
137
+ }
138
+ if (requestParameters['commit'] == null) {
139
+ throw new runtime.RequiredError('commit', 'Required parameter "commit" was null or undefined when calling getModelReadmeAt().');
140
+ }
141
+ const queryParameters = {};
142
+ const headerParameters = {};
143
+ if (this.configuration && this.configuration.accessToken) {
144
+ const token = this.configuration.accessToken;
145
+ const tokenString = yield token("bearerAuth", []);
146
+ if (tokenString) {
147
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
148
+ }
149
+ }
150
+ let urlPath = `/api/v1/models/{id}/readme-at/{commit}`;
151
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
152
+ urlPath = urlPath.replace('{commit}', encodeURIComponent(String(requestParameters['commit'])));
153
+ return {
154
+ path: urlPath,
155
+ method: 'GET',
156
+ headers: headerParameters,
157
+ query: queryParameters,
158
+ };
159
+ });
160
+ }
161
+ /**
162
+ * 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.
163
+ * README content at one commit (wayback)
164
+ */
165
+ getModelReadmeAtRaw(requestParameters, initOverrides) {
166
+ return __awaiter(this, void 0, void 0, function* () {
167
+ const requestOptions = yield this.getModelReadmeAtRequestOpts(requestParameters);
168
+ const response = yield this.request(requestOptions, initOverrides);
169
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetModelReadmeAt200Response_1.GetModelReadmeAt200ResponseFromJSON)(jsonValue));
170
+ });
171
+ }
172
+ /**
173
+ * 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.
174
+ * README content at one commit (wayback)
175
+ */
176
+ getModelReadmeAt(requestParameters, initOverrides) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ const response = yield this.getModelReadmeAtRaw(requestParameters, initOverrides);
179
+ return yield response.value();
180
+ });
181
+ }
128
182
  /**
129
183
  * Creates request options for listDelistedModels without sending the request
130
184
  */
@@ -240,6 +294,63 @@ class ModelsApi extends runtime.BaseAPI {
240
294
  return yield response.value();
241
295
  });
242
296
  }
297
+ /**
298
+ * Creates request options for listModelReadmeDrifts without sending the request
299
+ */
300
+ listModelReadmeDriftsRequestOpts(requestParameters) {
301
+ return __awaiter(this, void 0, void 0, function* () {
302
+ if (requestParameters['id'] == null) {
303
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listModelReadmeDrifts().');
304
+ }
305
+ const queryParameters = {};
306
+ if (requestParameters['sinceTs'] != null) {
307
+ queryParameters['since_ts'] = requestParameters['sinceTs'];
308
+ }
309
+ if (requestParameters['limit'] != null) {
310
+ queryParameters['limit'] = requestParameters['limit'];
311
+ }
312
+ if (requestParameters['offset'] != null) {
313
+ queryParameters['offset'] = requestParameters['offset'];
314
+ }
315
+ const headerParameters = {};
316
+ if (this.configuration && this.configuration.accessToken) {
317
+ const token = this.configuration.accessToken;
318
+ const tokenString = yield token("bearerAuth", []);
319
+ if (tokenString) {
320
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
321
+ }
322
+ }
323
+ let urlPath = `/api/v1/models/{id}/drifts`;
324
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
325
+ return {
326
+ path: urlPath,
327
+ method: 'GET',
328
+ headers: headerParameters,
329
+ query: queryParameters,
330
+ };
331
+ });
332
+ }
333
+ /**
334
+ * 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.
335
+ * README drift stream for one model
336
+ */
337
+ listModelReadmeDriftsRaw(requestParameters, initOverrides) {
338
+ return __awaiter(this, void 0, void 0, function* () {
339
+ const requestOptions = yield this.listModelReadmeDriftsRequestOpts(requestParameters);
340
+ const response = yield this.request(requestOptions, initOverrides);
341
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListModelReadmeDrifts200Response_1.ListModelReadmeDrifts200ResponseFromJSON)(jsonValue));
342
+ });
343
+ }
344
+ /**
345
+ * 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.
346
+ * README drift stream for one model
347
+ */
348
+ listModelReadmeDrifts(requestParameters, initOverrides) {
349
+ return __awaiter(this, void 0, void 0, function* () {
350
+ const response = yield this.listModelReadmeDriftsRaw(requestParameters, initOverrides);
351
+ return yield response.value();
352
+ });
353
+ }
243
354
  /**
244
355
  * Creates request options for listModels without sending the request
245
356
  */
@@ -12,8 +12,10 @@
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 GetModelReadmeAt200Response } from '../models/GetModelReadmeAt200Response';
15
16
  import { type ListDelistedModels200Response } from '../models/ListDelistedModels200Response';
16
17
  import { type ListHistoricalDeletions200Response } from '../models/ListHistoricalDeletions200Response';
18
+ import { type ListModelReadmeDrifts200Response } from '../models/ListModelReadmeDrifts200Response';
17
19
  import { type ListModels200Response } from '../models/ListModels200Response';
18
20
  export interface GetModelRequest {
19
21
  /**
@@ -21,6 +23,16 @@ export interface GetModelRequest {
21
23
  */
22
24
  id: string;
23
25
  }
26
+ export interface GetModelReadmeAtRequest {
27
+ /**
28
+ *
29
+ */
30
+ id: string;
31
+ /**
32
+ * HF commit sha for the README, from /drifts.
33
+ */
34
+ commit: string;
35
+ }
24
36
  export interface ListDelistedModelsRequest {
25
37
  /**
26
38
  * 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 +73,24 @@ export interface ListHistoricalDeletionsRequest {
61
73
  */
62
74
  offset?: number;
63
75
  }
76
+ export interface ListModelReadmeDriftsRequest {
77
+ /**
78
+ *
79
+ */
80
+ id: string;
81
+ /**
82
+ * Unix epoch seconds. Rows with commit_ts >= it only.
83
+ */
84
+ sinceTs?: number;
85
+ /**
86
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
87
+ */
88
+ limit?: number;
89
+ /**
90
+ * Rows to skip. Negative and non-numeric values are treated as 0.
91
+ */
92
+ offset?: number;
93
+ }
64
94
  export interface ListModelsRequest {
65
95
  /**
66
96
  * M-code, case-insensitive. See GET /api/v1/methods.
@@ -158,6 +188,29 @@ export interface ModelsApiInterface {
158
188
  * Get one model
159
189
  */
160
190
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
191
+ /**
192
+ * Creates request options for getModelReadmeAt without sending the request
193
+ * @param {string} id
194
+ * @param {string} commit HF commit sha for the README, from /drifts.
195
+ * @throws {RequiredError}
196
+ * @memberof ModelsApiInterface
197
+ */
198
+ getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts>;
199
+ /**
200
+ * 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.
201
+ * @summary README content at one commit (wayback)
202
+ * @param {string} id
203
+ * @param {string} commit HF commit sha for the README, from /drifts.
204
+ * @param {*} [options] Override http request option.
205
+ * @throws {RequiredError}
206
+ * @memberof ModelsApiInterface
207
+ */
208
+ getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>>;
209
+ /**
210
+ * 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.
211
+ * README content at one commit (wayback)
212
+ */
213
+ getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
161
214
  /**
162
215
  * Creates request options for listDelistedModels without sending the request
163
216
  * @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.
@@ -214,6 +267,33 @@ export interface ModelsApiInterface {
214
267
  * Historical deletions — paged list
215
268
  */
216
269
  listHistoricalDeletions(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
270
+ /**
271
+ * Creates request options for listModelReadmeDrifts without sending the request
272
+ * @param {string} id
273
+ * @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
274
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
275
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
276
+ * @throws {RequiredError}
277
+ * @memberof ModelsApiInterface
278
+ */
279
+ listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts>;
280
+ /**
281
+ * 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.
282
+ * @summary README drift stream for one model
283
+ * @param {string} id
284
+ * @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
285
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
286
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ * @memberof ModelsApiInterface
290
+ */
291
+ listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>>;
292
+ /**
293
+ * 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.
294
+ * README drift stream for one model
295
+ */
296
+ listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response>;
217
297
  /**
218
298
  * Creates request options for listModels without sending the request
219
299
  * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
@@ -290,6 +370,20 @@ export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInter
290
370
  * Get one model
291
371
  */
292
372
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
373
+ /**
374
+ * Creates request options for getModelReadmeAt without sending the request
375
+ */
376
+ getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts>;
377
+ /**
378
+ * 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.
379
+ * README content at one commit (wayback)
380
+ */
381
+ getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>>;
382
+ /**
383
+ * 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.
384
+ * README content at one commit (wayback)
385
+ */
386
+ getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
293
387
  /**
294
388
  * Creates request options for listDelistedModels without sending the request
295
389
  */
@@ -318,6 +412,20 @@ export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInter
318
412
  * Historical deletions — paged list
319
413
  */
320
414
  listHistoricalDeletions(requestParameters?: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
415
+ /**
416
+ * Creates request options for listModelReadmeDrifts without sending the request
417
+ */
418
+ listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts>;
419
+ /**
420
+ * 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.
421
+ * README drift stream for one model
422
+ */
423
+ listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>>;
424
+ /**
425
+ * 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.
426
+ * README drift stream for one model
427
+ */
428
+ listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response>;
321
429
  /**
322
430
  * Creates request options for listModels without sending the request
323
431
  */