@abliteration/sdk 0.1.7 → 0.1.9
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 +10 -0
- package/README.md +7 -0
- package/dist/apis/IndicesApi.d.ts +8 -8
- package/dist/apis/IndicesApi.js +4 -4
- package/dist/apis/ModelsApi.d.ts +122 -0
- package/dist/apis/ModelsApi.js +120 -1
- package/dist/esm/apis/IndicesApi.d.ts +8 -8
- package/dist/esm/apis/IndicesApi.js +4 -4
- package/dist/esm/apis/ModelsApi.d.ts +122 -0
- package/dist/esm/apis/ModelsApi.js +119 -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/FreedomVelocityDailyPoint.d.ts +42 -0
- package/dist/esm/models/FreedomVelocityDailyPoint.js +47 -0
- package/dist/esm/models/GetModelDownloadHistory200Response.d.ts +67 -0
- package/dist/esm/models/GetModelDownloadHistory200Response.js +79 -0
- package/dist/esm/models/IndexDetail.d.ts +14 -1
- package/dist/esm/models/IndexDetail.js +7 -0
- package/dist/esm/models/ListAnomalies200Response.d.ts +67 -0
- package/dist/esm/models/ListAnomalies200Response.js +79 -0
- package/dist/esm/models/ModelIndex.d.ts +9 -1
- package/dist/esm/models/ModelIndex.js +4 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -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/FreedomVelocityDailyPoint.d.ts +42 -0
- package/dist/models/FreedomVelocityDailyPoint.js +54 -0
- package/dist/models/GetModelDownloadHistory200Response.d.ts +67 -0
- package/dist/models/GetModelDownloadHistory200Response.js +87 -0
- package/dist/models/IndexDetail.d.ts +14 -1
- package/dist/models/IndexDetail.js +7 -0
- package/dist/models/ListAnomalies200Response.d.ts +67 -0
- package/dist/models/ListAnomalies200Response.js +87 -0
- package/dist/models/ModelIndex.d.ts +9 -1
- package/dist/models/ModelIndex.js +4 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/DownloadAnomaly.md +49 -0
- package/docs/DownloadPoint.md +37 -0
- package/docs/FreedomVelocityDailyPoint.md +41 -0
- package/docs/GetModelDownloadHistory200Response.md +48 -0
- package/docs/IndexDetail.md +6 -0
- package/docs/IndicesApi.md +2 -2
- package/docs/ListAnomalies200Response.md +48 -0
- package/docs/ModelIndex.md +4 -0
- package/docs/ModelsApi.md +167 -0
- package/package.json +3 -2
- package/src/apis/IndicesApi.ts +8 -8
- package/src/apis/ModelsApi.ts +236 -0
- package/src/models/DownloadAnomaly.ts +116 -0
- package/src/models/DownloadPoint.ts +69 -0
- package/src/models/FreedomVelocityDailyPoint.ts +81 -0
- package/src/models/GetModelDownloadHistory200Response.ts +132 -0
- package/src/models/IndexDetail.ts +26 -1
- package/src/models/ListAnomalies200Response.ts +132 -0
- package/src/models/ModelIndex.ts +13 -1
- package/src/models/index.ts +5 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
# DownloadAnomaly
|
|
3
|
+
|
|
4
|
+
One model whose downloads-per-window crossed a threshold.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`model_id` | string
|
|
11
|
+
`current_at` | string
|
|
12
|
+
`current_downloads` | number
|
|
13
|
+
`baseline_at` | string
|
|
14
|
+
`baseline_downloads` | number
|
|
15
|
+
`ratio` | number
|
|
16
|
+
`delta` | number
|
|
17
|
+
`kind` | string
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { DownloadAnomaly } from '@abliteration/sdk'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"model_id": null,
|
|
27
|
+
"current_at": null,
|
|
28
|
+
"current_downloads": null,
|
|
29
|
+
"baseline_at": null,
|
|
30
|
+
"baseline_downloads": null,
|
|
31
|
+
"ratio": null,
|
|
32
|
+
"delta": null,
|
|
33
|
+
"kind": null,
|
|
34
|
+
} satisfies DownloadAnomaly
|
|
35
|
+
|
|
36
|
+
console.log(example)
|
|
37
|
+
|
|
38
|
+
// Convert the instance to a JSON string
|
|
39
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
40
|
+
console.log(exampleJSON)
|
|
41
|
+
|
|
42
|
+
// Parse the JSON string back to an object
|
|
43
|
+
const exampleParsed = JSON.parse(exampleJSON) as DownloadAnomaly
|
|
44
|
+
console.log(exampleParsed)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# DownloadPoint
|
|
3
|
+
|
|
4
|
+
One snapshot in a per-model download timeline.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`date` | string
|
|
11
|
+
`downloads` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { DownloadPoint } from '@abliteration/sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"date": null,
|
|
21
|
+
"downloads": null,
|
|
22
|
+
} satisfies DownloadPoint
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as DownloadPoint
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# FreedomVelocityDailyPoint
|
|
3
|
+
|
|
4
|
+
One stored daily Freedom Velocity reading.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`date` | string
|
|
11
|
+
`value` | number
|
|
12
|
+
`median` | number
|
|
13
|
+
`bases_count` | number
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { FreedomVelocityDailyPoint } from '@abliteration/sdk'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"date": 2026-11-09,
|
|
23
|
+
"value": null,
|
|
24
|
+
"median": null,
|
|
25
|
+
"bases_count": null,
|
|
26
|
+
} satisfies FreedomVelocityDailyPoint
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as FreedomVelocityDailyPoint
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
# GetModelDownloadHistory200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<DownloadPoint>](DownloadPoint.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 { GetModelDownloadHistory200Response } 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 GetModelDownloadHistory200Response
|
|
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 GetModelDownloadHistory200Response
|
|
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/IndexDetail.md
CHANGED
|
@@ -15,8 +15,11 @@ Name | Type
|
|
|
15
15
|
`history_available` | boolean
|
|
16
16
|
`as_of` | string
|
|
17
17
|
`note` | string
|
|
18
|
+
`median` | number
|
|
19
|
+
`bases_count` | number
|
|
18
20
|
`recent_history` | [Array<DaiPoint>](DaiPoint.md)
|
|
19
21
|
`history` | [Array<DaiPoint>](DaiPoint.md)
|
|
22
|
+
`daily_history` | [Array<FreedomVelocityDailyPoint>](FreedomVelocityDailyPoint.md)
|
|
20
23
|
|
|
21
24
|
## Example
|
|
22
25
|
|
|
@@ -34,8 +37,11 @@ const example = {
|
|
|
34
37
|
"history_available": null,
|
|
35
38
|
"as_of": null,
|
|
36
39
|
"note": null,
|
|
40
|
+
"median": null,
|
|
41
|
+
"bases_count": null,
|
|
37
42
|
"recent_history": null,
|
|
38
43
|
"history": null,
|
|
44
|
+
"daily_history": null,
|
|
39
45
|
} satisfies IndexDetail
|
|
40
46
|
|
|
41
47
|
console.log(example)
|
package/docs/IndicesApi.md
CHANGED
|
@@ -15,7 +15,7 @@ All URIs are relative to *https://abliteration.org*
|
|
|
15
15
|
|
|
16
16
|
One index with history
|
|
17
17
|
|
|
18
|
-
Cost: 10 credits. Only dai has a history
|
|
18
|
+
Cost: 10 credits. Only dai has a series in history; the others return an empty history array. freedom-velocity also returns daily_history, its stored daily values oldest first, and its history_available is true when that series is non-empty. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
19
19
|
|
|
20
20
|
### Example
|
|
21
21
|
|
|
@@ -91,7 +91,7 @@ example().catch(console.error);
|
|
|
91
91
|
|
|
92
92
|
All four indices
|
|
93
93
|
|
|
94
|
-
Cost: 20 credits. Check the measured flag before treating a value as a finding.
|
|
94
|
+
Cost: 20 credits. Check the measured flag before treating a value as a finding. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
95
95
|
|
|
96
96
|
### Example
|
|
97
97
|
|
|
@@ -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
|
+
|
package/docs/ModelIndex.md
CHANGED
|
@@ -15,6 +15,8 @@ Name | Type
|
|
|
15
15
|
`history_available` | boolean
|
|
16
16
|
`as_of` | string
|
|
17
17
|
`note` | string
|
|
18
|
+
`median` | number
|
|
19
|
+
`bases_count` | number
|
|
18
20
|
`recent_history` | [Array<DaiPoint>](DaiPoint.md)
|
|
19
21
|
|
|
20
22
|
## Example
|
|
@@ -33,6 +35,8 @@ const example = {
|
|
|
33
35
|
"history_available": null,
|
|
34
36
|
"as_of": null,
|
|
35
37
|
"note": null,
|
|
38
|
+
"median": null,
|
|
39
|
+
"bases_count": null,
|
|
36
40
|
"recent_history": null,
|
|
37
41
|
} satisfies ModelIndex
|
|
38
42
|
|
package/docs/ModelsApi.md
CHANGED
|
@@ -6,7 +6,9 @@ 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 |
|
|
9
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) |
|
|
10
12
|
| [**listDelistedModels**](ModelsApi.md#listdelistedmodels) | **GET** /api/v1/models/delisted | List delisted models (change stream) |
|
|
11
13
|
| [**listHistoricalDeletions**](ModelsApi.md#listhistoricaldeletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list |
|
|
12
14
|
| [**listModelReadmeDrifts**](ModelsApi.md#listmodelreadmedrifts) | **GET** /api/v1/models/{id}/drifts | README drift stream for one model |
|
|
@@ -157,6 +159,84 @@ example().catch(console.error);
|
|
|
157
159
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
158
160
|
|
|
159
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
|
+
|
|
160
240
|
## getModelReadmeAt
|
|
161
241
|
|
|
162
242
|
> GetModelReadmeAt200Response getModelReadmeAt(id, commit)
|
|
@@ -236,6 +316,93 @@ example().catch(console.error);
|
|
|
236
316
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
237
317
|
|
|
238
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
|
+
|
|
239
406
|
## listDelistedModels
|
|
240
407
|
|
|
241
408
|
> ListDelistedModels200Response listDelistedModels(since, sort, limit, offset)
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abliteration/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "OpenAPI client for @abliteration/sdk",
|
|
5
5
|
"author": "OpenAPI-Generator",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/
|
|
8
|
+
"url": "git+https://github.com/neymark/abliteration.git",
|
|
9
|
+
"directory": "packages/reserve/npm-sdk"
|
|
9
10
|
},
|
|
10
11
|
"main": "./dist/index.js",
|
|
11
12
|
"types": "./dist/index.d.ts",
|
package/src/apis/IndicesApi.ts
CHANGED
|
@@ -47,7 +47,7 @@ export interface IndicesApiInterface {
|
|
|
47
47
|
getIndexRequestOpts(requestParameters: GetIndexRequest): Promise<runtime.RequestOpts>;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
* Cost: 10 credits. Only dai has a history
|
|
50
|
+
* Cost: 10 credits. Only dai has a series in history; the others return an empty history array. freedom-velocity also returns daily_history, its stored daily values oldest first, and its history_available is true when that series is non-empty. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
51
51
|
* @summary One index with history
|
|
52
52
|
* @param {'dai' | 'DAI' | 'freedom-velocity' | 'FV' | 'freedom_velocity' | 'weaponization' | 'WEAP' | 'f2w-latency' | 'F2W' | 'f2w_latency'} id Canonical id or one of the short aliases (DAI, FV, WEAP, F2W). Case-insensitive.
|
|
53
53
|
* @param {*} [options] Override http request option.
|
|
@@ -57,7 +57,7 @@ export interface IndicesApiInterface {
|
|
|
57
57
|
getIndexRaw(requestParameters: GetIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetIndex200Response>>;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* Cost: 10 credits. Only dai has a history
|
|
60
|
+
* Cost: 10 credits. Only dai has a series in history; the others return an empty history array. freedom-velocity also returns daily_history, its stored daily values oldest first, and its history_available is true when that series is non-empty. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
61
61
|
* One index with history
|
|
62
62
|
*/
|
|
63
63
|
getIndex(requestParameters: GetIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetIndex200Response>;
|
|
@@ -70,7 +70,7 @@ export interface IndicesApiInterface {
|
|
|
70
70
|
listIndicesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Cost: 20 credits. Check the measured flag before treating a value as a finding.
|
|
73
|
+
* Cost: 20 credits. Check the measured flag before treating a value as a finding. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
74
74
|
* @summary All four indices
|
|
75
75
|
* @param {*} [options] Override http request option.
|
|
76
76
|
* @throws {RequiredError}
|
|
@@ -79,7 +79,7 @@ export interface IndicesApiInterface {
|
|
|
79
79
|
listIndicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListIndices200Response>>;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* Cost: 20 credits. Check the measured flag before treating a value as a finding.
|
|
82
|
+
* Cost: 20 credits. Check the measured flag before treating a value as a finding. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
83
83
|
* All four indices
|
|
84
84
|
*/
|
|
85
85
|
listIndices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListIndices200Response>;
|
|
@@ -127,7 +127,7 @@ export class IndicesApi extends runtime.BaseAPI implements IndicesApiInterface {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* Cost: 10 credits. Only dai has a history
|
|
130
|
+
* Cost: 10 credits. Only dai has a series in history; the others return an empty history array. freedom-velocity also returns daily_history, its stored daily values oldest first, and its history_available is true when that series is non-empty. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
131
131
|
* One index with history
|
|
132
132
|
*/
|
|
133
133
|
async getIndexRaw(requestParameters: GetIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetIndex200Response>> {
|
|
@@ -138,7 +138,7 @@ export class IndicesApi extends runtime.BaseAPI implements IndicesApiInterface {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
|
-
* Cost: 10 credits. Only dai has a history
|
|
141
|
+
* Cost: 10 credits. Only dai has a series in history; the others return an empty history array. freedom-velocity also returns daily_history, its stored daily values oldest first, and its history_available is true when that series is non-empty. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
142
142
|
* One index with history
|
|
143
143
|
*/
|
|
144
144
|
async getIndex(requestParameters: GetIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetIndex200Response> {
|
|
@@ -174,7 +174,7 @@ export class IndicesApi extends runtime.BaseAPI implements IndicesApiInterface {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* Cost: 20 credits. Check the measured flag before treating a value as a finding.
|
|
177
|
+
* Cost: 20 credits. Check the measured flag before treating a value as a finding. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
178
178
|
* All four indices
|
|
179
179
|
*/
|
|
180
180
|
async listIndicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListIndices200Response>> {
|
|
@@ -185,7 +185,7 @@ export class IndicesApi extends runtime.BaseAPI implements IndicesApiInterface {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
|
-
* Cost: 20 credits. Check the measured flag before treating a value as a finding.
|
|
188
|
+
* Cost: 20 credits. Check the measured flag before treating a value as a finding. freedom-velocity: average days from a base model\'s release on Hugging Face (repo createdAt) until the first catalog model derived from it (abliterated or uncensored, at any depth, including delisted models) appears on Hugging Face, across base models released on or after 2024-06-01. The base must be a valid original: chains whose top is a catalog model or carries an abliterated, uncensored or heretic marker are excluded. The median and the number of bases are returned as median and bases_count.
|
|
189
189
|
* All four indices
|
|
190
190
|
*/
|
|
191
191
|
async listIndices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListIndices200Response> {
|