abliteration 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.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/docs/DownloadAnomaly.md +32 -0
- data/docs/DownloadPoint.md +20 -0
- data/docs/GetModelDownloadHistory200Response.md +32 -0
- data/docs/GetModelReadmeAt200Response.md +32 -0
- data/docs/ListAnomalies200Response.md +32 -0
- data/docs/ListModelReadmeDrifts200Response.md +32 -0
- data/docs/ModelsApi.md +304 -0
- data/docs/ReadmeAt.md +22 -0
- data/docs/ReadmeDrift.md +26 -0
- data/lib/abliteration/api/models_api.rb +327 -0
- data/lib/abliteration/models/download_anomaly.rb +250 -0
- data/lib/abliteration/models/download_point.rb +158 -0
- data/lib/abliteration/models/get_model_download_history200_response.rb +386 -0
- data/lib/abliteration/models/get_model_readme_at200_response.rb +384 -0
- data/lib/abliteration/models/list_anomalies200_response.rb +386 -0
- data/lib/abliteration/models/list_model_readme_drifts200_response.rb +386 -0
- data/lib/abliteration/models/readme_at.rb +169 -0
- data/lib/abliteration/models/readme_drift.rb +188 -0
- data/lib/abliteration/version.rb +1 -1
- data/lib/abliteration.rb +8 -0
- data/spec/models/download_anomaly_spec.rb +82 -0
- data/spec/models/download_point_spec.rb +42 -0
- data/spec/models/get_model_download_history200_response_spec.rb +82 -0
- data/spec/models/get_model_readme_at200_response_spec.rb +82 -0
- data/spec/models/list_anomalies200_response_spec.rb +82 -0
- data/spec/models/list_model_readme_drifts200_response_spec.rb +82 -0
- data/spec/models/readme_at_spec.rb +48 -0
- data/spec/models/readme_drift_spec.rb +60 -0
- metadata +33 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b716c004351088508c4b5f1e556b0f629b7c4ebef25ff11b3e12463d4d8e20c
|
|
4
|
+
data.tar.gz: f8ffe5d532a2fda781136c741e4e636b5eaa46a6f51c986be6d87eddf3524f33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8136feaf6e57bcaa1b29146f686a62ff0b9603380daba943996a20d5032bbad148f61bb30fc0961b38df53ef9bd7e93a06d78cbec33f95f1984f6f00f37c5478
|
|
7
|
+
data.tar.gz: 6e7c1d50e0ba3ff34e91131b586332176d8fcbbd1e6f700af217226428417d18f877f1d822e67dc5d85cd317cd7286ef5a3bbbfb8ad84f61976a9b982f9417c5
|
data/README.md
CHANGED
|
@@ -99,8 +99,12 @@ Class | Method | HTTP request | Description
|
|
|
99
99
|
*Abliteration::MethodsApi* | [**list_methods**](docs/MethodsApi.md#list_methods) | **GET** /api/v1/methods | List the method taxonomy
|
|
100
100
|
*Abliteration::ModelsApi* | [**get_historical_deletion_summary**](docs/ModelsApi.md#get_historical_deletion_summary) | **GET** /api/v1/models/historical-deletions/summary | Historical deletions — aggregate summary
|
|
101
101
|
*Abliteration::ModelsApi* | [**get_model**](docs/ModelsApi.md#get_model) | **GET** /api/v1/models/{id} | Get one model
|
|
102
|
+
*Abliteration::ModelsApi* | [**get_model_download_history**](docs/ModelsApi.md#get_model_download_history) | **GET** /api/v1/models/{id}/download-history | Per-model download timeline
|
|
103
|
+
*Abliteration::ModelsApi* | [**get_model_readme_at**](docs/ModelsApi.md#get_model_readme_at) | **GET** /api/v1/models/{id}/readme-at/{commit} | README content at one commit (wayback)
|
|
104
|
+
*Abliteration::ModelsApi* | [**list_anomalies**](docs/ModelsApi.md#list_anomalies) | **GET** /api/v1/market/anomalies | Anomalies in the download counter (change stream)
|
|
102
105
|
*Abliteration::ModelsApi* | [**list_delisted_models**](docs/ModelsApi.md#list_delisted_models) | **GET** /api/v1/models/delisted | List delisted models (change stream)
|
|
103
106
|
*Abliteration::ModelsApi* | [**list_historical_deletions**](docs/ModelsApi.md#list_historical_deletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list
|
|
107
|
+
*Abliteration::ModelsApi* | [**list_model_readme_drifts**](docs/ModelsApi.md#list_model_readme_drifts) | **GET** /api/v1/models/{id}/drifts | README drift stream for one model
|
|
104
108
|
*Abliteration::ModelsApi* | [**list_models**](docs/ModelsApi.md#list_models) | **GET** /api/v1/models | List models
|
|
105
109
|
*Abliteration::TimelineApi* | [**list_timeline**](docs/TimelineApi.md#list_timeline) | **GET** /api/v1/timeline | Curated field events
|
|
106
110
|
|
|
@@ -116,6 +120,8 @@ Class | Method | HTTP request | Description
|
|
|
116
120
|
- [Abliteration::DeletionSummaryTimelineInner](docs/DeletionSummaryTimelineInner.md)
|
|
117
121
|
- [Abliteration::DeletionSummaryTopByDownloadsInner](docs/DeletionSummaryTopByDownloadsInner.md)
|
|
118
122
|
- [Abliteration::DelistedModel](docs/DelistedModel.md)
|
|
123
|
+
- [Abliteration::DownloadAnomaly](docs/DownloadAnomaly.md)
|
|
124
|
+
- [Abliteration::DownloadPoint](docs/DownloadPoint.md)
|
|
119
125
|
- [Abliteration::Envelope](docs/Envelope.md)
|
|
120
126
|
- [Abliteration::Error](docs/Error.md)
|
|
121
127
|
- [Abliteration::Event](docs/Event.md)
|
|
@@ -125,15 +131,19 @@ Class | Method | HTTP request | Description
|
|
|
125
131
|
- [Abliteration::GetIndex200Response](docs/GetIndex200Response.md)
|
|
126
132
|
- [Abliteration::GetMethod200Response](docs/GetMethod200Response.md)
|
|
127
133
|
- [Abliteration::GetModel200Response](docs/GetModel200Response.md)
|
|
134
|
+
- [Abliteration::GetModelDownloadHistory200Response](docs/GetModelDownloadHistory200Response.md)
|
|
135
|
+
- [Abliteration::GetModelReadmeAt200Response](docs/GetModelReadmeAt200Response.md)
|
|
128
136
|
- [Abliteration::HistoricalDeletion](docs/HistoricalDeletion.md)
|
|
129
137
|
- [Abliteration::Index](docs/Index.md)
|
|
130
138
|
- [Abliteration::IndexDetail](docs/IndexDetail.md)
|
|
139
|
+
- [Abliteration::ListAnomalies200Response](docs/ListAnomalies200Response.md)
|
|
131
140
|
- [Abliteration::ListAuthors200Response](docs/ListAuthors200Response.md)
|
|
132
141
|
- [Abliteration::ListDatasets200Response](docs/ListDatasets200Response.md)
|
|
133
142
|
- [Abliteration::ListDelistedModels200Response](docs/ListDelistedModels200Response.md)
|
|
134
143
|
- [Abliteration::ListHistoricalDeletions200Response](docs/ListHistoricalDeletions200Response.md)
|
|
135
144
|
- [Abliteration::ListIndices200Response](docs/ListIndices200Response.md)
|
|
136
145
|
- [Abliteration::ListMethods200Response](docs/ListMethods200Response.md)
|
|
146
|
+
- [Abliteration::ListModelReadmeDrifts200Response](docs/ListModelReadmeDrifts200Response.md)
|
|
137
147
|
- [Abliteration::ListModels200Response](docs/ListModels200Response.md)
|
|
138
148
|
- [Abliteration::ListTimeline200Response](docs/ListTimeline200Response.md)
|
|
139
149
|
- [Abliteration::Method](docs/Method.md)
|
|
@@ -142,6 +152,8 @@ Class | Method | HTTP request | Description
|
|
|
142
152
|
- [Abliteration::ModelDetail](docs/ModelDetail.md)
|
|
143
153
|
- [Abliteration::ModelSummary](docs/ModelSummary.md)
|
|
144
154
|
- [Abliteration::Passport](docs/Passport.md)
|
|
155
|
+
- [Abliteration::ReadmeAt](docs/ReadmeAt.md)
|
|
156
|
+
- [Abliteration::ReadmeDrift](docs/ReadmeDrift.md)
|
|
145
157
|
|
|
146
158
|
|
|
147
159
|
## Documentation for Authorization
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Abliteration::DownloadAnomaly
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **model_id** | **String** | | [optional] |
|
|
8
|
+
| **current_at** | **String** | ISO-8601 timestamp of the current snapshot. | [optional] |
|
|
9
|
+
| **current_downloads** | **Integer** | | [optional] |
|
|
10
|
+
| **baseline_at** | **String** | ISO-8601 timestamp of the baseline snapshot the delta is computed against. | [optional] |
|
|
11
|
+
| **baseline_downloads** | **Integer** | | [optional] |
|
|
12
|
+
| **ratio** | **Float** | current_downloads / baseline_downloads. | [optional] |
|
|
13
|
+
| **delta** | **Integer** | current_downloads - baseline_downloads (signed). | [optional] |
|
|
14
|
+
| **kind** | **String** | `spike` when ratio >= 2, `drop` when ratio <= 0.5. | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'abliteration'
|
|
20
|
+
|
|
21
|
+
instance = Abliteration::DownloadAnomaly.new(
|
|
22
|
+
model_id: null,
|
|
23
|
+
current_at: null,
|
|
24
|
+
current_downloads: null,
|
|
25
|
+
baseline_at: null,
|
|
26
|
+
baseline_downloads: null,
|
|
27
|
+
ratio: null,
|
|
28
|
+
delta: null,
|
|
29
|
+
kind: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Abliteration::DownloadPoint
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **date** | **String** | ISO-8601 timestamp of the observation. | [optional] |
|
|
8
|
+
| **downloads** | **Integer** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'abliteration'
|
|
14
|
+
|
|
15
|
+
instance = Abliteration::DownloadPoint.new(
|
|
16
|
+
date: null,
|
|
17
|
+
downloads: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Abliteration::GetModelDownloadHistory200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<DownloadPoint>**](DownloadPoint.md) | | |
|
|
8
|
+
| **cost** | **Integer** | Credits this call costs. | |
|
|
9
|
+
| **credits_remaining** | **Integer** | Wallet balance after the call. Unchanged while metering is preview. | |
|
|
10
|
+
| **rate_limit_limit** | **Integer** | Ceiling for the current window. Also returned as X-RateLimit-Limit. | |
|
|
11
|
+
| **rate_limit_remaining** | **Integer** | Calls left in the current window for this key. Also returned as X-RateLimit-Remaining. | |
|
|
12
|
+
| **rate_limit_reset** | **Integer** | Unix seconds at which the window resets to full ceiling. Also returned as X-RateLimit-Reset. | |
|
|
13
|
+
| **metering** | **String** | Whether cost was actually deducted. | |
|
|
14
|
+
| **request_id** | **String** | Also returned in the x-request-id header. | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'abliteration'
|
|
20
|
+
|
|
21
|
+
instance = Abliteration::GetModelDownloadHistory200Response.new(
|
|
22
|
+
data: null,
|
|
23
|
+
cost: null,
|
|
24
|
+
credits_remaining: null,
|
|
25
|
+
rate_limit_limit: null,
|
|
26
|
+
rate_limit_remaining: null,
|
|
27
|
+
rate_limit_reset: null,
|
|
28
|
+
metering: null,
|
|
29
|
+
request_id: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Abliteration::GetModelReadmeAt200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**ReadmeAt**](ReadmeAt.md) | | |
|
|
8
|
+
| **cost** | **Integer** | Credits this call costs. | |
|
|
9
|
+
| **credits_remaining** | **Integer** | Wallet balance after the call. Unchanged while metering is preview. | |
|
|
10
|
+
| **rate_limit_limit** | **Integer** | Ceiling for the current window. Also returned as X-RateLimit-Limit. | |
|
|
11
|
+
| **rate_limit_remaining** | **Integer** | Calls left in the current window for this key. Also returned as X-RateLimit-Remaining. | |
|
|
12
|
+
| **rate_limit_reset** | **Integer** | Unix seconds at which the window resets to full ceiling. Also returned as X-RateLimit-Reset. | |
|
|
13
|
+
| **metering** | **String** | Whether cost was actually deducted. | |
|
|
14
|
+
| **request_id** | **String** | Also returned in the x-request-id header. | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'abliteration'
|
|
20
|
+
|
|
21
|
+
instance = Abliteration::GetModelReadmeAt200Response.new(
|
|
22
|
+
data: null,
|
|
23
|
+
cost: null,
|
|
24
|
+
credits_remaining: null,
|
|
25
|
+
rate_limit_limit: null,
|
|
26
|
+
rate_limit_remaining: null,
|
|
27
|
+
rate_limit_reset: null,
|
|
28
|
+
metering: null,
|
|
29
|
+
request_id: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Abliteration::ListAnomalies200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<DownloadAnomaly>**](DownloadAnomaly.md) | | |
|
|
8
|
+
| **cost** | **Integer** | Credits this call costs. | |
|
|
9
|
+
| **credits_remaining** | **Integer** | Wallet balance after the call. Unchanged while metering is preview. | |
|
|
10
|
+
| **rate_limit_limit** | **Integer** | Ceiling for the current window. Also returned as X-RateLimit-Limit. | |
|
|
11
|
+
| **rate_limit_remaining** | **Integer** | Calls left in the current window for this key. Also returned as X-RateLimit-Remaining. | |
|
|
12
|
+
| **rate_limit_reset** | **Integer** | Unix seconds at which the window resets to full ceiling. Also returned as X-RateLimit-Reset. | |
|
|
13
|
+
| **metering** | **String** | Whether cost was actually deducted. | |
|
|
14
|
+
| **request_id** | **String** | Also returned in the x-request-id header. | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'abliteration'
|
|
20
|
+
|
|
21
|
+
instance = Abliteration::ListAnomalies200Response.new(
|
|
22
|
+
data: null,
|
|
23
|
+
cost: null,
|
|
24
|
+
credits_remaining: null,
|
|
25
|
+
rate_limit_limit: null,
|
|
26
|
+
rate_limit_remaining: null,
|
|
27
|
+
rate_limit_reset: null,
|
|
28
|
+
metering: null,
|
|
29
|
+
request_id: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Abliteration::ListModelReadmeDrifts200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<ReadmeDrift>**](ReadmeDrift.md) | | |
|
|
8
|
+
| **cost** | **Integer** | Credits this call costs. | |
|
|
9
|
+
| **credits_remaining** | **Integer** | Wallet balance after the call. Unchanged while metering is preview. | |
|
|
10
|
+
| **rate_limit_limit** | **Integer** | Ceiling for the current window. Also returned as X-RateLimit-Limit. | |
|
|
11
|
+
| **rate_limit_remaining** | **Integer** | Calls left in the current window for this key. Also returned as X-RateLimit-Remaining. | |
|
|
12
|
+
| **rate_limit_reset** | **Integer** | Unix seconds at which the window resets to full ceiling. Also returned as X-RateLimit-Reset. | |
|
|
13
|
+
| **metering** | **String** | Whether cost was actually deducted. | |
|
|
14
|
+
| **request_id** | **String** | Also returned in the x-request-id header. | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'abliteration'
|
|
20
|
+
|
|
21
|
+
instance = Abliteration::ListModelReadmeDrifts200Response.new(
|
|
22
|
+
data: null,
|
|
23
|
+
cost: null,
|
|
24
|
+
credits_remaining: null,
|
|
25
|
+
rate_limit_limit: null,
|
|
26
|
+
rate_limit_remaining: null,
|
|
27
|
+
rate_limit_reset: null,
|
|
28
|
+
metering: null,
|
|
29
|
+
request_id: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
data/docs/ModelsApi.md
CHANGED
|
@@ -6,8 +6,12 @@ All URIs are relative to *https://abliteration.org*
|
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**get_historical_deletion_summary**](ModelsApi.md#get_historical_deletion_summary) | **GET** /api/v1/models/historical-deletions/summary | Historical deletions — aggregate summary |
|
|
8
8
|
| [**get_model**](ModelsApi.md#get_model) | **GET** /api/v1/models/{id} | Get one model |
|
|
9
|
+
| [**get_model_download_history**](ModelsApi.md#get_model_download_history) | **GET** /api/v1/models/{id}/download-history | Per-model download timeline |
|
|
10
|
+
| [**get_model_readme_at**](ModelsApi.md#get_model_readme_at) | **GET** /api/v1/models/{id}/readme-at/{commit} | README content at one commit (wayback) |
|
|
11
|
+
| [**list_anomalies**](ModelsApi.md#list_anomalies) | **GET** /api/v1/market/anomalies | Anomalies in the download counter (change stream) |
|
|
9
12
|
| [**list_delisted_models**](ModelsApi.md#list_delisted_models) | **GET** /api/v1/models/delisted | List delisted models (change stream) |
|
|
10
13
|
| [**list_historical_deletions**](ModelsApi.md#list_historical_deletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list |
|
|
14
|
+
| [**list_model_readme_drifts**](ModelsApi.md#list_model_readme_drifts) | **GET** /api/v1/models/{id}/drifts | README drift stream for one model |
|
|
11
15
|
| [**list_models**](ModelsApi.md#list_models) | **GET** /api/v1/models | List models |
|
|
12
16
|
|
|
13
17
|
|
|
@@ -146,6 +150,229 @@ end
|
|
|
146
150
|
- **Accept**: application/json
|
|
147
151
|
|
|
148
152
|
|
|
153
|
+
## get_model_download_history
|
|
154
|
+
|
|
155
|
+
> <GetModelDownloadHistory200Response> get_model_download_history(id, opts)
|
|
156
|
+
|
|
157
|
+
Per-model download timeline
|
|
158
|
+
|
|
159
|
+
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.
|
|
160
|
+
|
|
161
|
+
### Examples
|
|
162
|
+
|
|
163
|
+
```ruby
|
|
164
|
+
require 'time'
|
|
165
|
+
require 'abliteration'
|
|
166
|
+
# setup authorization
|
|
167
|
+
Abliteration.configure do |config|
|
|
168
|
+
# Configure Bearer authorization: bearerAuth
|
|
169
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
api_instance = Abliteration::ModelsApi.new
|
|
173
|
+
id = 'id_example' # String |
|
|
174
|
+
opts = {
|
|
175
|
+
days: 56 # Integer | Window in days (max 365). Pass 0 for full history.
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
begin
|
|
179
|
+
# Per-model download timeline
|
|
180
|
+
result = api_instance.get_model_download_history(id, opts)
|
|
181
|
+
p result
|
|
182
|
+
rescue Abliteration::ApiError => e
|
|
183
|
+
puts "Error when calling ModelsApi->get_model_download_history: #{e}"
|
|
184
|
+
end
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### Using the get_model_download_history_with_http_info variant
|
|
188
|
+
|
|
189
|
+
This returns an Array which contains the response data, status code and headers.
|
|
190
|
+
|
|
191
|
+
> <Array(<GetModelDownloadHistory200Response>, Integer, Hash)> get_model_download_history_with_http_info(id, opts)
|
|
192
|
+
|
|
193
|
+
```ruby
|
|
194
|
+
begin
|
|
195
|
+
# Per-model download timeline
|
|
196
|
+
data, status_code, headers = api_instance.get_model_download_history_with_http_info(id, opts)
|
|
197
|
+
p status_code # => 2xx
|
|
198
|
+
p headers # => { ... }
|
|
199
|
+
p data # => <GetModelDownloadHistory200Response>
|
|
200
|
+
rescue Abliteration::ApiError => e
|
|
201
|
+
puts "Error when calling ModelsApi->get_model_download_history_with_http_info: #{e}"
|
|
202
|
+
end
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Parameters
|
|
206
|
+
|
|
207
|
+
| Name | Type | Description | Notes |
|
|
208
|
+
| ---- | ---- | ----------- | ----- |
|
|
209
|
+
| **id** | **String** | | |
|
|
210
|
+
| **days** | **Integer** | Window in days (max 365). Pass 0 for full history. | [optional][default to 90] |
|
|
211
|
+
|
|
212
|
+
### Return type
|
|
213
|
+
|
|
214
|
+
[**GetModelDownloadHistory200Response**](GetModelDownloadHistory200Response.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
|
+
## get_model_readme_at
|
|
227
|
+
|
|
228
|
+
> <GetModelReadmeAt200Response> get_model_readme_at(id, commit)
|
|
229
|
+
|
|
230
|
+
README content at one commit (wayback)
|
|
231
|
+
|
|
232
|
+
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.
|
|
233
|
+
|
|
234
|
+
### Examples
|
|
235
|
+
|
|
236
|
+
```ruby
|
|
237
|
+
require 'time'
|
|
238
|
+
require 'abliteration'
|
|
239
|
+
# setup authorization
|
|
240
|
+
Abliteration.configure do |config|
|
|
241
|
+
# Configure Bearer authorization: bearerAuth
|
|
242
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
api_instance = Abliteration::ModelsApi.new
|
|
246
|
+
id = 'id_example' # String |
|
|
247
|
+
commit = 'commit_example' # String | HF commit sha for the README, from /drifts.
|
|
248
|
+
|
|
249
|
+
begin
|
|
250
|
+
# README content at one commit (wayback)
|
|
251
|
+
result = api_instance.get_model_readme_at(id, commit)
|
|
252
|
+
p result
|
|
253
|
+
rescue Abliteration::ApiError => e
|
|
254
|
+
puts "Error when calling ModelsApi->get_model_readme_at: #{e}"
|
|
255
|
+
end
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
#### Using the get_model_readme_at_with_http_info variant
|
|
259
|
+
|
|
260
|
+
This returns an Array which contains the response data, status code and headers.
|
|
261
|
+
|
|
262
|
+
> <Array(<GetModelReadmeAt200Response>, Integer, Hash)> get_model_readme_at_with_http_info(id, commit)
|
|
263
|
+
|
|
264
|
+
```ruby
|
|
265
|
+
begin
|
|
266
|
+
# README content at one commit (wayback)
|
|
267
|
+
data, status_code, headers = api_instance.get_model_readme_at_with_http_info(id, commit)
|
|
268
|
+
p status_code # => 2xx
|
|
269
|
+
p headers # => { ... }
|
|
270
|
+
p data # => <GetModelReadmeAt200Response>
|
|
271
|
+
rescue Abliteration::ApiError => e
|
|
272
|
+
puts "Error when calling ModelsApi->get_model_readme_at_with_http_info: #{e}"
|
|
273
|
+
end
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Parameters
|
|
277
|
+
|
|
278
|
+
| Name | Type | Description | Notes |
|
|
279
|
+
| ---- | ---- | ----------- | ----- |
|
|
280
|
+
| **id** | **String** | | |
|
|
281
|
+
| **commit** | **String** | HF commit sha for the README, from /drifts. | |
|
|
282
|
+
|
|
283
|
+
### Return type
|
|
284
|
+
|
|
285
|
+
[**GetModelReadmeAt200Response**](GetModelReadmeAt200Response.md)
|
|
286
|
+
|
|
287
|
+
### Authorization
|
|
288
|
+
|
|
289
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
290
|
+
|
|
291
|
+
### HTTP request headers
|
|
292
|
+
|
|
293
|
+
- **Content-Type**: Not defined
|
|
294
|
+
- **Accept**: application/json
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
## list_anomalies
|
|
298
|
+
|
|
299
|
+
> <ListAnomalies200Response> list_anomalies(opts)
|
|
300
|
+
|
|
301
|
+
Anomalies in the download counter (change stream)
|
|
302
|
+
|
|
303
|
+
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`.
|
|
304
|
+
|
|
305
|
+
### Examples
|
|
306
|
+
|
|
307
|
+
```ruby
|
|
308
|
+
require 'time'
|
|
309
|
+
require 'abliteration'
|
|
310
|
+
# setup authorization
|
|
311
|
+
Abliteration.configure do |config|
|
|
312
|
+
# Configure Bearer authorization: bearerAuth
|
|
313
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
api_instance = Abliteration::ModelsApi.new
|
|
317
|
+
opts = {
|
|
318
|
+
window_days: 56, # Integer | Baseline distance in days. Default 7, min 1, max 365.
|
|
319
|
+
min_baseline: 56, # Integer | Only rows where baseline downloads >= this. Filters `0→10` noise. Default 1000.
|
|
320
|
+
kind: 'spike', # String | Filter to one class. Omit for both.
|
|
321
|
+
limit: 56, # Integer | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
322
|
+
offset: 56 # Integer | Rows to skip. Negative and non-numeric values are treated as 0.
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
begin
|
|
326
|
+
# Anomalies in the download counter (change stream)
|
|
327
|
+
result = api_instance.list_anomalies(opts)
|
|
328
|
+
p result
|
|
329
|
+
rescue Abliteration::ApiError => e
|
|
330
|
+
puts "Error when calling ModelsApi->list_anomalies: #{e}"
|
|
331
|
+
end
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
#### Using the list_anomalies_with_http_info variant
|
|
335
|
+
|
|
336
|
+
This returns an Array which contains the response data, status code and headers.
|
|
337
|
+
|
|
338
|
+
> <Array(<ListAnomalies200Response>, Integer, Hash)> list_anomalies_with_http_info(opts)
|
|
339
|
+
|
|
340
|
+
```ruby
|
|
341
|
+
begin
|
|
342
|
+
# Anomalies in the download counter (change stream)
|
|
343
|
+
data, status_code, headers = api_instance.list_anomalies_with_http_info(opts)
|
|
344
|
+
p status_code # => 2xx
|
|
345
|
+
p headers # => { ... }
|
|
346
|
+
p data # => <ListAnomalies200Response>
|
|
347
|
+
rescue Abliteration::ApiError => e
|
|
348
|
+
puts "Error when calling ModelsApi->list_anomalies_with_http_info: #{e}"
|
|
349
|
+
end
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Parameters
|
|
353
|
+
|
|
354
|
+
| Name | Type | Description | Notes |
|
|
355
|
+
| ---- | ---- | ----------- | ----- |
|
|
356
|
+
| **window_days** | **Integer** | Baseline distance in days. Default 7, min 1, max 365. | [optional][default to 7] |
|
|
357
|
+
| **min_baseline** | **Integer** | Only rows where baseline downloads >= this. Filters `0→10` noise. Default 1000. | [optional][default to 1000] |
|
|
358
|
+
| **kind** | **String** | Filter to one class. Omit for both. | [optional] |
|
|
359
|
+
| **limit** | **Integer** | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [optional][default to 50] |
|
|
360
|
+
| **offset** | **Integer** | Rows to skip. Negative and non-numeric values are treated as 0. | [optional][default to 0] |
|
|
361
|
+
|
|
362
|
+
### Return type
|
|
363
|
+
|
|
364
|
+
[**ListAnomalies200Response**](ListAnomalies200Response.md)
|
|
365
|
+
|
|
366
|
+
### Authorization
|
|
367
|
+
|
|
368
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
369
|
+
|
|
370
|
+
### HTTP request headers
|
|
371
|
+
|
|
372
|
+
- **Content-Type**: Not defined
|
|
373
|
+
- **Accept**: application/json
|
|
374
|
+
|
|
375
|
+
|
|
149
376
|
## list_delisted_models
|
|
150
377
|
|
|
151
378
|
> <ListDelistedModels200Response> list_delisted_models(opts)
|
|
@@ -302,6 +529,83 @@ end
|
|
|
302
529
|
- **Accept**: application/json
|
|
303
530
|
|
|
304
531
|
|
|
532
|
+
## list_model_readme_drifts
|
|
533
|
+
|
|
534
|
+
> <ListModelReadmeDrifts200Response> list_model_readme_drifts(id, opts)
|
|
535
|
+
|
|
536
|
+
README drift stream for one model
|
|
537
|
+
|
|
538
|
+
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.
|
|
539
|
+
|
|
540
|
+
### Examples
|
|
541
|
+
|
|
542
|
+
```ruby
|
|
543
|
+
require 'time'
|
|
544
|
+
require 'abliteration'
|
|
545
|
+
# setup authorization
|
|
546
|
+
Abliteration.configure do |config|
|
|
547
|
+
# Configure Bearer authorization: bearerAuth
|
|
548
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
api_instance = Abliteration::ModelsApi.new
|
|
552
|
+
id = 'mlabonne/Qwen3-30B-A3B-abliterated' # String |
|
|
553
|
+
opts = {
|
|
554
|
+
since_ts: 789, # Integer | Unix epoch seconds. Rows with commit_ts >= it only.
|
|
555
|
+
limit: 56, # Integer | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
556
|
+
offset: 56 # Integer | Rows to skip. Negative and non-numeric values are treated as 0.
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
begin
|
|
560
|
+
# README drift stream for one model
|
|
561
|
+
result = api_instance.list_model_readme_drifts(id, opts)
|
|
562
|
+
p result
|
|
563
|
+
rescue Abliteration::ApiError => e
|
|
564
|
+
puts "Error when calling ModelsApi->list_model_readme_drifts: #{e}"
|
|
565
|
+
end
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
#### Using the list_model_readme_drifts_with_http_info variant
|
|
569
|
+
|
|
570
|
+
This returns an Array which contains the response data, status code and headers.
|
|
571
|
+
|
|
572
|
+
> <Array(<ListModelReadmeDrifts200Response>, Integer, Hash)> list_model_readme_drifts_with_http_info(id, opts)
|
|
573
|
+
|
|
574
|
+
```ruby
|
|
575
|
+
begin
|
|
576
|
+
# README drift stream for one model
|
|
577
|
+
data, status_code, headers = api_instance.list_model_readme_drifts_with_http_info(id, opts)
|
|
578
|
+
p status_code # => 2xx
|
|
579
|
+
p headers # => { ... }
|
|
580
|
+
p data # => <ListModelReadmeDrifts200Response>
|
|
581
|
+
rescue Abliteration::ApiError => e
|
|
582
|
+
puts "Error when calling ModelsApi->list_model_readme_drifts_with_http_info: #{e}"
|
|
583
|
+
end
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
### Parameters
|
|
587
|
+
|
|
588
|
+
| Name | Type | Description | Notes |
|
|
589
|
+
| ---- | ---- | ----------- | ----- |
|
|
590
|
+
| **id** | **String** | | |
|
|
591
|
+
| **since_ts** | **Integer** | Unix epoch seconds. Rows with commit_ts >= it only. | [optional] |
|
|
592
|
+
| **limit** | **Integer** | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [optional][default to 50] |
|
|
593
|
+
| **offset** | **Integer** | Rows to skip. Negative and non-numeric values are treated as 0. | [optional][default to 0] |
|
|
594
|
+
|
|
595
|
+
### Return type
|
|
596
|
+
|
|
597
|
+
[**ListModelReadmeDrifts200Response**](ListModelReadmeDrifts200Response.md)
|
|
598
|
+
|
|
599
|
+
### Authorization
|
|
600
|
+
|
|
601
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
602
|
+
|
|
603
|
+
### HTTP request headers
|
|
604
|
+
|
|
605
|
+
- **Content-Type**: Not defined
|
|
606
|
+
- **Accept**: application/json
|
|
607
|
+
|
|
608
|
+
|
|
305
609
|
## list_models
|
|
306
610
|
|
|
307
611
|
> <ListModels200Response> list_models(opts)
|
data/docs/ReadmeAt.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Abliteration::ReadmeAt
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | Model id (author/name). | [optional] |
|
|
8
|
+
| **commit** | **String** | Commit sha (echoes the path param). | [optional] |
|
|
9
|
+
| **content** | **String** | Full README markdown at that commit. Up to ~100KB. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'abliteration'
|
|
15
|
+
|
|
16
|
+
instance = Abliteration::ReadmeAt.new(
|
|
17
|
+
id: null,
|
|
18
|
+
commit: null,
|
|
19
|
+
content: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/ReadmeDrift.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Abliteration::ReadmeDrift
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **commit_sha** | **String** | | [optional] |
|
|
8
|
+
| **commit_ts** | **Integer** | Unix epoch seconds. | [optional] |
|
|
9
|
+
| **commit_message** | **String** | | [optional] |
|
|
10
|
+
| **content_size** | **Integer** | README byte size at this commit. | [optional] |
|
|
11
|
+
| **size_delta** | **Integer** | Bytes added (positive) or removed (negative) since the previous commit. First commit gets 0. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'abliteration'
|
|
17
|
+
|
|
18
|
+
instance = Abliteration::ReadmeDrift.new(
|
|
19
|
+
commit_sha: null,
|
|
20
|
+
commit_ts: null,
|
|
21
|
+
commit_message: null,
|
|
22
|
+
content_size: null,
|
|
23
|
+
size_delta: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|