abliteration 0.1.7 → 0.1.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22dcd3b342509cdc83410548a8f7d6aa975cd5ff6ea8dd7752cdff63a57c15ae
4
- data.tar.gz: '083faff3655e6a1721c87f23c92a80f28b3c4565c33f06ba1313af85417345ca'
3
+ metadata.gz: 9f5e7a1545d6ef3e7437901aecc3151135560cbac829cd581e7cbc7d8249e05a
4
+ data.tar.gz: 62e496c73943df8111fd7bbc9e76181414d147f813e9644b317efd7690db4113
5
5
  SHA512:
6
- metadata.gz: 67056fce0457a1e0dc6b5ad116b24a9c222622646a205926308af85342d5f5faa15514fd6e66100914add28fc414996a343139e0ad19c50afe8182420a8f7ba1
7
- data.tar.gz: 5c1b5586a094f530eaaac3ba39a8af5a5fb156d53871b4a87ca6f1830d23731454775029d6208107bf731cbc5b9ca8591838d422b124ff4c2a93eb4da0b19d67
6
+ metadata.gz: 8a8489069ee2886e5eade18511c30747070f610ea60baa91af41a0ceb5291674b746b340563c6bf1103f8a54ad83c8eb00b2640b543dd3914c26135348978588
7
+ data.tar.gz: baa7e9bccc443655d3ac515029cd896dfe65f257b1bafa2e4f846cbe47da4651164e9bd867da0b5c85864ba882a8e8b214af06a969a0eafbf3a9156f55477ae4
data/README.md CHANGED
@@ -99,8 +99,10 @@ 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_readme_at**](docs/ModelsApi.md#get_model_readme_at) | **GET** /api/v1/models/{id}/readme-at/{commit} | README content at one commit (wayback)
102
103
  *Abliteration::ModelsApi* | [**list_delisted_models**](docs/ModelsApi.md#list_delisted_models) | **GET** /api/v1/models/delisted | List delisted models (change stream)
103
104
  *Abliteration::ModelsApi* | [**list_historical_deletions**](docs/ModelsApi.md#list_historical_deletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list
105
+ *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
106
  *Abliteration::ModelsApi* | [**list_models**](docs/ModelsApi.md#list_models) | **GET** /api/v1/models | List models
105
107
  *Abliteration::TimelineApi* | [**list_timeline**](docs/TimelineApi.md#list_timeline) | **GET** /api/v1/timeline | Curated field events
106
108
 
@@ -125,6 +127,7 @@ Class | Method | HTTP request | Description
125
127
  - [Abliteration::GetIndex200Response](docs/GetIndex200Response.md)
126
128
  - [Abliteration::GetMethod200Response](docs/GetMethod200Response.md)
127
129
  - [Abliteration::GetModel200Response](docs/GetModel200Response.md)
130
+ - [Abliteration::GetModelReadmeAt200Response](docs/GetModelReadmeAt200Response.md)
128
131
  - [Abliteration::HistoricalDeletion](docs/HistoricalDeletion.md)
129
132
  - [Abliteration::Index](docs/Index.md)
130
133
  - [Abliteration::IndexDetail](docs/IndexDetail.md)
@@ -134,6 +137,7 @@ Class | Method | HTTP request | Description
134
137
  - [Abliteration::ListHistoricalDeletions200Response](docs/ListHistoricalDeletions200Response.md)
135
138
  - [Abliteration::ListIndices200Response](docs/ListIndices200Response.md)
136
139
  - [Abliteration::ListMethods200Response](docs/ListMethods200Response.md)
140
+ - [Abliteration::ListModelReadmeDrifts200Response](docs/ListModelReadmeDrifts200Response.md)
137
141
  - [Abliteration::ListModels200Response](docs/ListModels200Response.md)
138
142
  - [Abliteration::ListTimeline200Response](docs/ListTimeline200Response.md)
139
143
  - [Abliteration::Method](docs/Method.md)
@@ -142,6 +146,8 @@ Class | Method | HTTP request | Description
142
146
  - [Abliteration::ModelDetail](docs/ModelDetail.md)
143
147
  - [Abliteration::ModelSummary](docs/ModelSummary.md)
144
148
  - [Abliteration::Passport](docs/Passport.md)
149
+ - [Abliteration::ReadmeAt](docs/ReadmeAt.md)
150
+ - [Abliteration::ReadmeDrift](docs/ReadmeDrift.md)
145
151
 
146
152
 
147
153
  ## Documentation for Authorization
@@ -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::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,10 @@ 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_readme_at**](ModelsApi.md#get_model_readme_at) | **GET** /api/v1/models/{id}/readme-at/{commit} | README content at one commit (wayback) |
9
10
  | [**list_delisted_models**](ModelsApi.md#list_delisted_models) | **GET** /api/v1/models/delisted | List delisted models (change stream) |
10
11
  | [**list_historical_deletions**](ModelsApi.md#list_historical_deletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list |
12
+ | [**list_model_readme_drifts**](ModelsApi.md#list_model_readme_drifts) | **GET** /api/v1/models/{id}/drifts | README drift stream for one model |
11
13
  | [**list_models**](ModelsApi.md#list_models) | **GET** /api/v1/models | List models |
12
14
 
13
15
 
@@ -146,6 +148,77 @@ end
146
148
  - **Accept**: application/json
147
149
 
148
150
 
151
+ ## get_model_readme_at
152
+
153
+ > <GetModelReadmeAt200Response> get_model_readme_at(id, commit)
154
+
155
+ README content at one commit (wayback)
156
+
157
+ 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.
158
+
159
+ ### Examples
160
+
161
+ ```ruby
162
+ require 'time'
163
+ require 'abliteration'
164
+ # setup authorization
165
+ Abliteration.configure do |config|
166
+ # Configure Bearer authorization: bearerAuth
167
+ config.access_token = 'YOUR_BEARER_TOKEN'
168
+ end
169
+
170
+ api_instance = Abliteration::ModelsApi.new
171
+ id = 'id_example' # String |
172
+ commit = 'commit_example' # String | HF commit sha for the README, from /drifts.
173
+
174
+ begin
175
+ # README content at one commit (wayback)
176
+ result = api_instance.get_model_readme_at(id, commit)
177
+ p result
178
+ rescue Abliteration::ApiError => e
179
+ puts "Error when calling ModelsApi->get_model_readme_at: #{e}"
180
+ end
181
+ ```
182
+
183
+ #### Using the get_model_readme_at_with_http_info variant
184
+
185
+ This returns an Array which contains the response data, status code and headers.
186
+
187
+ > <Array(<GetModelReadmeAt200Response>, Integer, Hash)> get_model_readme_at_with_http_info(id, commit)
188
+
189
+ ```ruby
190
+ begin
191
+ # README content at one commit (wayback)
192
+ data, status_code, headers = api_instance.get_model_readme_at_with_http_info(id, commit)
193
+ p status_code # => 2xx
194
+ p headers # => { ... }
195
+ p data # => <GetModelReadmeAt200Response>
196
+ rescue Abliteration::ApiError => e
197
+ puts "Error when calling ModelsApi->get_model_readme_at_with_http_info: #{e}"
198
+ end
199
+ ```
200
+
201
+ ### Parameters
202
+
203
+ | Name | Type | Description | Notes |
204
+ | ---- | ---- | ----------- | ----- |
205
+ | **id** | **String** | | |
206
+ | **commit** | **String** | HF commit sha for the README, from /drifts. | |
207
+
208
+ ### Return type
209
+
210
+ [**GetModelReadmeAt200Response**](GetModelReadmeAt200Response.md)
211
+
212
+ ### Authorization
213
+
214
+ [bearerAuth](../README.md#bearerAuth)
215
+
216
+ ### HTTP request headers
217
+
218
+ - **Content-Type**: Not defined
219
+ - **Accept**: application/json
220
+
221
+
149
222
  ## list_delisted_models
150
223
 
151
224
  > <ListDelistedModels200Response> list_delisted_models(opts)
@@ -302,6 +375,83 @@ end
302
375
  - **Accept**: application/json
303
376
 
304
377
 
378
+ ## list_model_readme_drifts
379
+
380
+ > <ListModelReadmeDrifts200Response> list_model_readme_drifts(id, opts)
381
+
382
+ README drift stream for one model
383
+
384
+ 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.
385
+
386
+ ### Examples
387
+
388
+ ```ruby
389
+ require 'time'
390
+ require 'abliteration'
391
+ # setup authorization
392
+ Abliteration.configure do |config|
393
+ # Configure Bearer authorization: bearerAuth
394
+ config.access_token = 'YOUR_BEARER_TOKEN'
395
+ end
396
+
397
+ api_instance = Abliteration::ModelsApi.new
398
+ id = 'mlabonne/Qwen3-30B-A3B-abliterated' # String |
399
+ opts = {
400
+ since_ts: 789, # Integer | Unix epoch seconds. Rows with commit_ts >= it only.
401
+ limit: 56, # Integer | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
402
+ offset: 56 # Integer | Rows to skip. Negative and non-numeric values are treated as 0.
403
+ }
404
+
405
+ begin
406
+ # README drift stream for one model
407
+ result = api_instance.list_model_readme_drifts(id, opts)
408
+ p result
409
+ rescue Abliteration::ApiError => e
410
+ puts "Error when calling ModelsApi->list_model_readme_drifts: #{e}"
411
+ end
412
+ ```
413
+
414
+ #### Using the list_model_readme_drifts_with_http_info variant
415
+
416
+ This returns an Array which contains the response data, status code and headers.
417
+
418
+ > <Array(<ListModelReadmeDrifts200Response>, Integer, Hash)> list_model_readme_drifts_with_http_info(id, opts)
419
+
420
+ ```ruby
421
+ begin
422
+ # README drift stream for one model
423
+ data, status_code, headers = api_instance.list_model_readme_drifts_with_http_info(id, opts)
424
+ p status_code # => 2xx
425
+ p headers # => { ... }
426
+ p data # => <ListModelReadmeDrifts200Response>
427
+ rescue Abliteration::ApiError => e
428
+ puts "Error when calling ModelsApi->list_model_readme_drifts_with_http_info: #{e}"
429
+ end
430
+ ```
431
+
432
+ ### Parameters
433
+
434
+ | Name | Type | Description | Notes |
435
+ | ---- | ---- | ----------- | ----- |
436
+ | **id** | **String** | | |
437
+ | **since_ts** | **Integer** | Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only. | [optional] |
438
+ | **limit** | **Integer** | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [optional][default to 50] |
439
+ | **offset** | **Integer** | Rows to skip. Negative and non-numeric values are treated as 0. | [optional][default to 0] |
440
+
441
+ ### Return type
442
+
443
+ [**ListModelReadmeDrifts200Response**](ListModelReadmeDrifts200Response.md)
444
+
445
+ ### Authorization
446
+
447
+ [bearerAuth](../README.md#bearerAuth)
448
+
449
+ ### HTTP request headers
450
+
451
+ - **Content-Type**: Not defined
452
+ - **Accept**: application/json
453
+
454
+
305
455
  ## list_models
306
456
 
307
457
  > <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
+
@@ -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
+
@@ -139,6 +139,75 @@ module Abliteration
139
139
  return data, status_code, headers
140
140
  end
141
141
 
142
+ # README content at one commit (wayback)
143
+ # 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.
144
+ # @param id [String]
145
+ # @param commit [String] HF commit sha for the README, from /drifts.
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [GetModelReadmeAt200Response]
148
+ def get_model_readme_at(id, commit, opts = {})
149
+ data, _status_code, _headers = get_model_readme_at_with_http_info(id, commit, opts)
150
+ data
151
+ end
152
+
153
+ # README content at one commit (wayback)
154
+ # 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.
155
+ # @param id [String]
156
+ # @param commit [String] HF commit sha for the README, from /drifts.
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [Array<(GetModelReadmeAt200Response, Integer, Hash)>] GetModelReadmeAt200Response data, response status code and response headers
159
+ def get_model_readme_at_with_http_info(id, commit, opts = {})
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug 'Calling API: ModelsApi.get_model_readme_at ...'
162
+ end
163
+ # verify the required parameter 'id' is set
164
+ if @api_client.config.client_side_validation && id.nil?
165
+ fail ArgumentError, "Missing the required parameter 'id' when calling ModelsApi.get_model_readme_at"
166
+ end
167
+ # verify the required parameter 'commit' is set
168
+ if @api_client.config.client_side_validation && commit.nil?
169
+ fail ArgumentError, "Missing the required parameter 'commit' when calling ModelsApi.get_model_readme_at"
170
+ end
171
+ # resource path
172
+ local_var_path = '/api/v1/models/{id}/readme-at/{commit}'.sub('{id}', CGI.escape(id.to_s)).sub('{commit}', CGI.escape(commit.to_s))
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+
177
+ # header parameters
178
+ header_params = opts[:header_params] || {}
179
+ # HTTP header 'Accept' (if needed)
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
181
+
182
+ # form parameters
183
+ form_params = opts[:form_params] || {}
184
+
185
+ # http body (model)
186
+ post_body = opts[:debug_body]
187
+
188
+ # return_type
189
+ return_type = opts[:debug_return_type] || 'GetModelReadmeAt200Response'
190
+
191
+ # auth_names
192
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
193
+
194
+ new_options = opts.merge(
195
+ :operation => :"ModelsApi.get_model_readme_at",
196
+ :header_params => header_params,
197
+ :query_params => query_params,
198
+ :form_params => form_params,
199
+ :body => post_body,
200
+ :auth_names => auth_names,
201
+ :return_type => return_type
202
+ )
203
+
204
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
205
+ if @api_client.config.debugging
206
+ @api_client.config.logger.debug "API called: ModelsApi#get_model_readme_at\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
+ end
208
+ return data, status_code, headers
209
+ end
210
+
142
211
  # List delisted models (change stream)
143
212
  # Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
144
213
  # @param [Hash] opts the optional parameters
@@ -316,6 +385,90 @@ module Abliteration
316
385
  return data, status_code, headers
317
386
  end
318
387
 
388
+ # README drift stream for one model
389
+ # 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.
390
+ # @param id [String]
391
+ # @param [Hash] opts the optional parameters
392
+ # @option opts [Integer] :since_ts Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
393
+ # @option opts [Integer] :limit Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (default to 50)
394
+ # @option opts [Integer] :offset Rows to skip. Negative and non-numeric values are treated as 0. (default to 0)
395
+ # @return [ListModelReadmeDrifts200Response]
396
+ def list_model_readme_drifts(id, opts = {})
397
+ data, _status_code, _headers = list_model_readme_drifts_with_http_info(id, opts)
398
+ data
399
+ end
400
+
401
+ # README drift stream for one model
402
+ # Cost: 5 credits, flat. Every commit that changed the model&#39;s README on HF, with &#x60;size_delta&#x60; between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with &#x60;since_ts&#x3D;&lt;max commit_ts of your previous run&gt;&#x60; for an incremental drift feed.
403
+ # @param id [String]
404
+ # @param [Hash] opts the optional parameters
405
+ # @option opts [Integer] :since_ts Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
406
+ # @option opts [Integer] :limit Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (default to 50)
407
+ # @option opts [Integer] :offset Rows to skip. Negative and non-numeric values are treated as 0. (default to 0)
408
+ # @return [Array<(ListModelReadmeDrifts200Response, Integer, Hash)>] ListModelReadmeDrifts200Response data, response status code and response headers
409
+ def list_model_readme_drifts_with_http_info(id, opts = {})
410
+ if @api_client.config.debugging
411
+ @api_client.config.logger.debug 'Calling API: ModelsApi.list_model_readme_drifts ...'
412
+ end
413
+ # verify the required parameter 'id' is set
414
+ if @api_client.config.client_side_validation && id.nil?
415
+ fail ArgumentError, "Missing the required parameter 'id' when calling ModelsApi.list_model_readme_drifts"
416
+ end
417
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
418
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ModelsApi.list_model_readme_drifts, must be smaller than or equal to 1000.'
419
+ end
420
+
421
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
422
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ModelsApi.list_model_readme_drifts, must be greater than or equal to 1.'
423
+ end
424
+
425
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
426
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ModelsApi.list_model_readme_drifts, must be greater than or equal to 0.'
427
+ end
428
+
429
+ # resource path
430
+ local_var_path = '/api/v1/models/{id}/drifts'.sub('{id}', CGI.escape(id.to_s))
431
+
432
+ # query parameters
433
+ query_params = opts[:query_params] || {}
434
+ query_params[:'since_ts'] = opts[:'since_ts'] if !opts[:'since_ts'].nil?
435
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
436
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
437
+
438
+ # header parameters
439
+ header_params = opts[:header_params] || {}
440
+ # HTTP header 'Accept' (if needed)
441
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
442
+
443
+ # form parameters
444
+ form_params = opts[:form_params] || {}
445
+
446
+ # http body (model)
447
+ post_body = opts[:debug_body]
448
+
449
+ # return_type
450
+ return_type = opts[:debug_return_type] || 'ListModelReadmeDrifts200Response'
451
+
452
+ # auth_names
453
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
454
+
455
+ new_options = opts.merge(
456
+ :operation => :"ModelsApi.list_model_readme_drifts",
457
+ :header_params => header_params,
458
+ :query_params => query_params,
459
+ :form_params => form_params,
460
+ :body => post_body,
461
+ :auth_names => auth_names,
462
+ :return_type => return_type
463
+ )
464
+
465
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
466
+ if @api_client.config.debugging
467
+ @api_client.config.logger.debug "API called: ModelsApi#list_model_readme_drifts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
468
+ end
469
+ return data, status_code, headers
470
+ end
471
+
319
472
  # List models
320
473
  # Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
321
474
  # @param [Hash] opts the optional parameters