abliteration 0.1.5 → 0.1.6
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 +3 -0
- data/docs/DelistedModel.md +30 -0
- data/docs/ListDelistedModels200Response.md +32 -0
- data/docs/ModelDetail.md +4 -0
- data/docs/ModelSummary.md +5 -1
- data/docs/ModelsApi.md +82 -2
- data/lib/abliteration/api/models_api.rb +96 -4
- data/lib/abliteration/models/delisted_model.rb +206 -0
- data/lib/abliteration/models/list_delisted_models200_response.rb +386 -0
- data/lib/abliteration/models/model_detail.rb +23 -1
- data/lib/abliteration/models/model_summary.rb +27 -5
- data/lib/abliteration/version.rb +1 -1
- data/lib/abliteration.rb +2 -0
- data/spec/models/delisted_model_spec.rb +72 -0
- data/spec/models/list_delisted_models200_response_spec.rb +82 -0
- metadata +10 -2
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#abliteration.org Public API
|
|
3
|
+
|
|
4
|
+
#Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Abliteration
|
|
17
|
+
class ListDelistedModels200Response < ApiModelBase
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
# Credits this call costs.
|
|
21
|
+
attr_accessor :cost
|
|
22
|
+
|
|
23
|
+
# Wallet balance after the call. Unchanged while metering is preview.
|
|
24
|
+
attr_accessor :credits_remaining
|
|
25
|
+
|
|
26
|
+
# Ceiling for the current window. Also returned as X-RateLimit-Limit.
|
|
27
|
+
attr_accessor :rate_limit_limit
|
|
28
|
+
|
|
29
|
+
# Calls left in the current window for this key. Also returned as X-RateLimit-Remaining.
|
|
30
|
+
attr_accessor :rate_limit_remaining
|
|
31
|
+
|
|
32
|
+
# Unix seconds at which the window resets to full ceiling. Also returned as X-RateLimit-Reset.
|
|
33
|
+
attr_accessor :rate_limit_reset
|
|
34
|
+
|
|
35
|
+
# Whether cost was actually deducted.
|
|
36
|
+
attr_accessor :metering
|
|
37
|
+
|
|
38
|
+
# Also returned in the x-request-id header.
|
|
39
|
+
attr_accessor :request_id
|
|
40
|
+
|
|
41
|
+
class EnumAttributeValidator
|
|
42
|
+
attr_reader :datatype
|
|
43
|
+
attr_reader :allowable_values
|
|
44
|
+
|
|
45
|
+
def initialize(datatype, allowable_values)
|
|
46
|
+
@allowable_values = allowable_values.map do |value|
|
|
47
|
+
case datatype.to_s
|
|
48
|
+
when /Integer/i
|
|
49
|
+
value.to_i
|
|
50
|
+
when /Float/i
|
|
51
|
+
value.to_f
|
|
52
|
+
else
|
|
53
|
+
value
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def valid?(value)
|
|
59
|
+
!value || allowable_values.include?(value)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
64
|
+
def self.attribute_map
|
|
65
|
+
{
|
|
66
|
+
:'data' => :'data',
|
|
67
|
+
:'cost' => :'cost',
|
|
68
|
+
:'credits_remaining' => :'credits_remaining',
|
|
69
|
+
:'rate_limit_limit' => :'rate_limit_limit',
|
|
70
|
+
:'rate_limit_remaining' => :'rate_limit_remaining',
|
|
71
|
+
:'rate_limit_reset' => :'rate_limit_reset',
|
|
72
|
+
:'metering' => :'metering',
|
|
73
|
+
:'request_id' => :'request_id'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns attribute mapping this model knows about
|
|
78
|
+
def self.acceptable_attribute_map
|
|
79
|
+
attribute_map
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Returns all the JSON keys this model knows about
|
|
83
|
+
def self.acceptable_attributes
|
|
84
|
+
acceptable_attribute_map.values
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Attribute type mapping.
|
|
88
|
+
def self.openapi_types
|
|
89
|
+
{
|
|
90
|
+
:'data' => :'Array<DelistedModel>',
|
|
91
|
+
:'cost' => :'Integer',
|
|
92
|
+
:'credits_remaining' => :'Integer',
|
|
93
|
+
:'rate_limit_limit' => :'Integer',
|
|
94
|
+
:'rate_limit_remaining' => :'Integer',
|
|
95
|
+
:'rate_limit_reset' => :'Integer',
|
|
96
|
+
:'metering' => :'String',
|
|
97
|
+
:'request_id' => :'String'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List of attributes with nullable: true
|
|
102
|
+
def self.openapi_nullable
|
|
103
|
+
Set.new([
|
|
104
|
+
])
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
108
|
+
def self.openapi_all_of
|
|
109
|
+
[
|
|
110
|
+
:'Envelope'
|
|
111
|
+
]
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Initializes the object
|
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
+
def initialize(attributes = {})
|
|
117
|
+
if (!attributes.is_a?(Hash))
|
|
118
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Abliteration::ListDelistedModels200Response` initialize method"
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
122
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
123
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
124
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
125
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Abliteration::ListDelistedModels200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
126
|
+
end
|
|
127
|
+
h[k.to_sym] = v
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'data')
|
|
131
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
132
|
+
self.data = value
|
|
133
|
+
end
|
|
134
|
+
else
|
|
135
|
+
self.data = nil
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'cost')
|
|
139
|
+
self.cost = attributes[:'cost']
|
|
140
|
+
else
|
|
141
|
+
self.cost = nil
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'credits_remaining')
|
|
145
|
+
self.credits_remaining = attributes[:'credits_remaining']
|
|
146
|
+
else
|
|
147
|
+
self.credits_remaining = nil
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'rate_limit_limit')
|
|
151
|
+
self.rate_limit_limit = attributes[:'rate_limit_limit']
|
|
152
|
+
else
|
|
153
|
+
self.rate_limit_limit = nil
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'rate_limit_remaining')
|
|
157
|
+
self.rate_limit_remaining = attributes[:'rate_limit_remaining']
|
|
158
|
+
else
|
|
159
|
+
self.rate_limit_remaining = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'rate_limit_reset')
|
|
163
|
+
self.rate_limit_reset = attributes[:'rate_limit_reset']
|
|
164
|
+
else
|
|
165
|
+
self.rate_limit_reset = nil
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'metering')
|
|
169
|
+
self.metering = attributes[:'metering']
|
|
170
|
+
else
|
|
171
|
+
self.metering = nil
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'request_id')
|
|
175
|
+
self.request_id = attributes[:'request_id']
|
|
176
|
+
else
|
|
177
|
+
self.request_id = nil
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
182
|
+
# @return Array for valid properties with the reasons
|
|
183
|
+
def list_invalid_properties
|
|
184
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
185
|
+
invalid_properties = Array.new
|
|
186
|
+
if @data.nil?
|
|
187
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if @cost.nil?
|
|
191
|
+
invalid_properties.push('invalid value for "cost", cost cannot be nil.')
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if @credits_remaining.nil?
|
|
195
|
+
invalid_properties.push('invalid value for "credits_remaining", credits_remaining cannot be nil.')
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if @rate_limit_limit.nil?
|
|
199
|
+
invalid_properties.push('invalid value for "rate_limit_limit", rate_limit_limit cannot be nil.')
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if @rate_limit_remaining.nil?
|
|
203
|
+
invalid_properties.push('invalid value for "rate_limit_remaining", rate_limit_remaining cannot be nil.')
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if @rate_limit_reset.nil?
|
|
207
|
+
invalid_properties.push('invalid value for "rate_limit_reset", rate_limit_reset cannot be nil.')
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if @metering.nil?
|
|
211
|
+
invalid_properties.push('invalid value for "metering", metering cannot be nil.')
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if @request_id.nil?
|
|
215
|
+
invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
invalid_properties
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Check to see if the all the properties in the model are valid
|
|
222
|
+
# @return true if the model is valid
|
|
223
|
+
def valid?
|
|
224
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
225
|
+
return false if @data.nil?
|
|
226
|
+
return false if @cost.nil?
|
|
227
|
+
return false if @credits_remaining.nil?
|
|
228
|
+
return false if @rate_limit_limit.nil?
|
|
229
|
+
return false if @rate_limit_remaining.nil?
|
|
230
|
+
return false if @rate_limit_reset.nil?
|
|
231
|
+
return false if @metering.nil?
|
|
232
|
+
metering_validator = EnumAttributeValidator.new('String', ["preview", "billed"])
|
|
233
|
+
return false unless metering_validator.valid?(@metering)
|
|
234
|
+
return false if @request_id.nil?
|
|
235
|
+
true
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Custom attribute writer method with validation
|
|
239
|
+
# @param [Object] data Value to be assigned
|
|
240
|
+
def data=(data)
|
|
241
|
+
if data.nil?
|
|
242
|
+
fail ArgumentError, 'data cannot be nil'
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
@data = data
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Custom attribute writer method with validation
|
|
249
|
+
# @param [Object] cost Value to be assigned
|
|
250
|
+
def cost=(cost)
|
|
251
|
+
if cost.nil?
|
|
252
|
+
fail ArgumentError, 'cost cannot be nil'
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
@cost = cost
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Custom attribute writer method with validation
|
|
259
|
+
# @param [Object] credits_remaining Value to be assigned
|
|
260
|
+
def credits_remaining=(credits_remaining)
|
|
261
|
+
if credits_remaining.nil?
|
|
262
|
+
fail ArgumentError, 'credits_remaining cannot be nil'
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
@credits_remaining = credits_remaining
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Custom attribute writer method with validation
|
|
269
|
+
# @param [Object] rate_limit_limit Value to be assigned
|
|
270
|
+
def rate_limit_limit=(rate_limit_limit)
|
|
271
|
+
if rate_limit_limit.nil?
|
|
272
|
+
fail ArgumentError, 'rate_limit_limit cannot be nil'
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
@rate_limit_limit = rate_limit_limit
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Custom attribute writer method with validation
|
|
279
|
+
# @param [Object] rate_limit_remaining Value to be assigned
|
|
280
|
+
def rate_limit_remaining=(rate_limit_remaining)
|
|
281
|
+
if rate_limit_remaining.nil?
|
|
282
|
+
fail ArgumentError, 'rate_limit_remaining cannot be nil'
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
@rate_limit_remaining = rate_limit_remaining
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Custom attribute writer method with validation
|
|
289
|
+
# @param [Object] rate_limit_reset Value to be assigned
|
|
290
|
+
def rate_limit_reset=(rate_limit_reset)
|
|
291
|
+
if rate_limit_reset.nil?
|
|
292
|
+
fail ArgumentError, 'rate_limit_reset cannot be nil'
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
@rate_limit_reset = rate_limit_reset
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
299
|
+
# @param [Object] metering Object to be assigned
|
|
300
|
+
def metering=(metering)
|
|
301
|
+
validator = EnumAttributeValidator.new('String', ["preview", "billed"])
|
|
302
|
+
unless validator.valid?(metering)
|
|
303
|
+
fail ArgumentError, "invalid value for \"metering\", must be one of #{validator.allowable_values}."
|
|
304
|
+
end
|
|
305
|
+
@metering = metering
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Custom attribute writer method with validation
|
|
309
|
+
# @param [Object] request_id Value to be assigned
|
|
310
|
+
def request_id=(request_id)
|
|
311
|
+
if request_id.nil?
|
|
312
|
+
fail ArgumentError, 'request_id cannot be nil'
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
@request_id = request_id
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
# Checks equality by comparing each attribute.
|
|
319
|
+
# @param [Object] Object to be compared
|
|
320
|
+
def ==(o)
|
|
321
|
+
return true if self.equal?(o)
|
|
322
|
+
self.class == o.class &&
|
|
323
|
+
data == o.data &&
|
|
324
|
+
cost == o.cost &&
|
|
325
|
+
credits_remaining == o.credits_remaining &&
|
|
326
|
+
rate_limit_limit == o.rate_limit_limit &&
|
|
327
|
+
rate_limit_remaining == o.rate_limit_remaining &&
|
|
328
|
+
rate_limit_reset == o.rate_limit_reset &&
|
|
329
|
+
metering == o.metering &&
|
|
330
|
+
request_id == o.request_id
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# @see the `==` method
|
|
334
|
+
# @param [Object] Object to be compared
|
|
335
|
+
def eql?(o)
|
|
336
|
+
self == o
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Calculates hash code according to all attributes.
|
|
340
|
+
# @return [Integer] Hash code
|
|
341
|
+
def hash
|
|
342
|
+
[data, cost, credits_remaining, rate_limit_limit, rate_limit_remaining, rate_limit_reset, metering, request_id].hash
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# Builds the object from hash
|
|
346
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
347
|
+
# @return [Object] Returns the model itself
|
|
348
|
+
def self.build_from_hash(attributes)
|
|
349
|
+
return nil unless attributes.is_a?(Hash)
|
|
350
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
351
|
+
transformed_hash = {}
|
|
352
|
+
openapi_types.each_pair do |key, type|
|
|
353
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
354
|
+
transformed_hash["#{key}"] = nil
|
|
355
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
356
|
+
# check to ensure the input is an array given that the attribute
|
|
357
|
+
# is documented as an array but the input is not
|
|
358
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
359
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
360
|
+
end
|
|
361
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
362
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
new(transformed_hash)
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# Returns the object in the form of hash
|
|
369
|
+
# @return [Hash] Returns the object in the form of hash
|
|
370
|
+
def to_hash
|
|
371
|
+
hash = {}
|
|
372
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
373
|
+
value = self.send(attr)
|
|
374
|
+
if value.nil?
|
|
375
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
376
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
hash[param] = _to_hash(value)
|
|
380
|
+
end
|
|
381
|
+
hash
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
end
|
|
@@ -62,6 +62,12 @@ module Abliteration
|
|
|
62
62
|
|
|
63
63
|
attr_accessor :last_seen_at
|
|
64
64
|
|
|
65
|
+
# 0/1 flag. `1` means HF no longer serves this model — the response is the last state we recorded.
|
|
66
|
+
attr_accessor :is_delisted
|
|
67
|
+
|
|
68
|
+
# Whole days between last_seen_at and now. `null` unless is_delisted=1.
|
|
69
|
+
attr_accessor :days_since_gone
|
|
70
|
+
|
|
65
71
|
attr_accessor :readme_text
|
|
66
72
|
|
|
67
73
|
attr_accessor :readme_status
|
|
@@ -145,6 +151,8 @@ module Abliteration
|
|
|
145
151
|
:'last_modified' => :'last_modified',
|
|
146
152
|
:'first_seen_at' => :'first_seen_at',
|
|
147
153
|
:'last_seen_at' => :'last_seen_at',
|
|
154
|
+
:'is_delisted' => :'is_delisted',
|
|
155
|
+
:'days_since_gone' => :'days_since_gone',
|
|
148
156
|
:'readme_text' => :'readme_text',
|
|
149
157
|
:'readme_status' => :'readme_status',
|
|
150
158
|
:'tags' => :'tags',
|
|
@@ -210,6 +218,8 @@ module Abliteration
|
|
|
210
218
|
:'last_modified' => :'String',
|
|
211
219
|
:'first_seen_at' => :'String',
|
|
212
220
|
:'last_seen_at' => :'String',
|
|
221
|
+
:'is_delisted' => :'Integer',
|
|
222
|
+
:'days_since_gone' => :'Integer',
|
|
213
223
|
:'readme_text' => :'String',
|
|
214
224
|
:'readme_status' => :'String',
|
|
215
225
|
:'tags' => :'String',
|
|
@@ -262,6 +272,8 @@ module Abliteration
|
|
|
262
272
|
:'last_modified',
|
|
263
273
|
:'first_seen_at',
|
|
264
274
|
:'last_seen_at',
|
|
275
|
+
:'is_delisted',
|
|
276
|
+
:'days_since_gone',
|
|
265
277
|
:'readme_text',
|
|
266
278
|
:'readme_status',
|
|
267
279
|
:'tags',
|
|
@@ -394,6 +406,14 @@ module Abliteration
|
|
|
394
406
|
self.last_seen_at = attributes[:'last_seen_at']
|
|
395
407
|
end
|
|
396
408
|
|
|
409
|
+
if attributes.key?(:'is_delisted')
|
|
410
|
+
self.is_delisted = attributes[:'is_delisted']
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
if attributes.key?(:'days_since_gone')
|
|
414
|
+
self.days_since_gone = attributes[:'days_since_gone']
|
|
415
|
+
end
|
|
416
|
+
|
|
397
417
|
if attributes.key?(:'readme_text')
|
|
398
418
|
self.readme_text = attributes[:'readme_text']
|
|
399
419
|
end
|
|
@@ -547,6 +567,8 @@ module Abliteration
|
|
|
547
567
|
last_modified == o.last_modified &&
|
|
548
568
|
first_seen_at == o.first_seen_at &&
|
|
549
569
|
last_seen_at == o.last_seen_at &&
|
|
570
|
+
is_delisted == o.is_delisted &&
|
|
571
|
+
days_since_gone == o.days_since_gone &&
|
|
550
572
|
readme_text == o.readme_text &&
|
|
551
573
|
readme_status == o.readme_status &&
|
|
552
574
|
tags == o.tags &&
|
|
@@ -585,7 +607,7 @@ module Abliteration
|
|
|
585
607
|
# Calculates hash code according to all attributes.
|
|
586
608
|
# @return [Integer] Hash code
|
|
587
609
|
def hash
|
|
588
|
-
[id, author, name, primary_method, secondary_methods, confidence, classification_evidence, classifier_version, classified_at, family, params_b, is_gguf, is_moe, is_multimodal, is_image_gen, is_second_order, downloads, likes, created_at, last_modified, first_seen_at, last_seen_at, readme_text, readme_status, tags, pipeline_tag, library_name, yaml_base_model, yaml_language, yaml_datasets, yaml_license, yaml_tags, files_count, total_size_bytes, largest_file_bytes, smallest_model_bytes, quantizations, has_mmproj, hub_downloads_all_time, hub_trending_score, hub_real_params_m, hub_context_length, hub_siblings_count, hub_provider_count, hub_provider_names, hub_enriched_at, files, benchmarks, author_summary].hash
|
|
610
|
+
[id, author, name, primary_method, secondary_methods, confidence, classification_evidence, classifier_version, classified_at, family, params_b, is_gguf, is_moe, is_multimodal, is_image_gen, is_second_order, downloads, likes, created_at, last_modified, first_seen_at, last_seen_at, is_delisted, days_since_gone, readme_text, readme_status, tags, pipeline_tag, library_name, yaml_base_model, yaml_language, yaml_datasets, yaml_license, yaml_tags, files_count, total_size_bytes, largest_file_bytes, smallest_model_bytes, quantizations, has_mmproj, hub_downloads_all_time, hub_trending_score, hub_real_params_m, hub_context_length, hub_siblings_count, hub_provider_count, hub_provider_names, hub_enriched_at, files, benchmarks, author_summary].hash
|
|
589
611
|
end
|
|
590
612
|
|
|
591
613
|
# Builds the object from hash
|
|
@@ -41,6 +41,12 @@ module Abliteration
|
|
|
41
41
|
|
|
42
42
|
attr_accessor :first_seen_at
|
|
43
43
|
|
|
44
|
+
# 0/1 flag, present in every response row. `1` means the model is no longer on the Hub.
|
|
45
|
+
attr_accessor :is_delisted
|
|
46
|
+
|
|
47
|
+
# ISO-8601 timestamp of the last successful Hub observation. Non-null on delisted rows.
|
|
48
|
+
attr_accessor :last_seen_at
|
|
49
|
+
|
|
44
50
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
51
|
def self.attribute_map
|
|
46
52
|
{
|
|
@@ -56,7 +62,9 @@ module Abliteration
|
|
|
56
62
|
:'likes' => :'likes',
|
|
57
63
|
:'is_gguf' => :'is_gguf',
|
|
58
64
|
:'created_at' => :'created_at',
|
|
59
|
-
:'first_seen_at' => :'first_seen_at'
|
|
65
|
+
:'first_seen_at' => :'first_seen_at',
|
|
66
|
+
:'is_delisted' => :'is_delisted',
|
|
67
|
+
:'last_seen_at' => :'last_seen_at'
|
|
60
68
|
}
|
|
61
69
|
end
|
|
62
70
|
|
|
@@ -85,7 +93,9 @@ module Abliteration
|
|
|
85
93
|
:'likes' => :'Integer',
|
|
86
94
|
:'is_gguf' => :'Integer',
|
|
87
95
|
:'created_at' => :'String',
|
|
88
|
-
:'first_seen_at' => :'String'
|
|
96
|
+
:'first_seen_at' => :'String',
|
|
97
|
+
:'is_delisted' => :'Integer',
|
|
98
|
+
:'last_seen_at' => :'String'
|
|
89
99
|
}
|
|
90
100
|
end
|
|
91
101
|
|
|
@@ -101,7 +111,9 @@ module Abliteration
|
|
|
101
111
|
:'likes',
|
|
102
112
|
:'is_gguf',
|
|
103
113
|
:'created_at',
|
|
104
|
-
:'first_seen_at'
|
|
114
|
+
:'first_seen_at',
|
|
115
|
+
:'is_delisted',
|
|
116
|
+
:'last_seen_at'
|
|
105
117
|
])
|
|
106
118
|
end
|
|
107
119
|
|
|
@@ -172,6 +184,14 @@ module Abliteration
|
|
|
172
184
|
if attributes.key?(:'first_seen_at')
|
|
173
185
|
self.first_seen_at = attributes[:'first_seen_at']
|
|
174
186
|
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'is_delisted')
|
|
189
|
+
self.is_delisted = attributes[:'is_delisted']
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'last_seen_at')
|
|
193
|
+
self.last_seen_at = attributes[:'last_seen_at']
|
|
194
|
+
end
|
|
175
195
|
end
|
|
176
196
|
|
|
177
197
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -206,7 +226,9 @@ module Abliteration
|
|
|
206
226
|
likes == o.likes &&
|
|
207
227
|
is_gguf == o.is_gguf &&
|
|
208
228
|
created_at == o.created_at &&
|
|
209
|
-
first_seen_at == o.first_seen_at
|
|
229
|
+
first_seen_at == o.first_seen_at &&
|
|
230
|
+
is_delisted == o.is_delisted &&
|
|
231
|
+
last_seen_at == o.last_seen_at
|
|
210
232
|
end
|
|
211
233
|
|
|
212
234
|
# @see the `==` method
|
|
@@ -218,7 +240,7 @@ module Abliteration
|
|
|
218
240
|
# Calculates hash code according to all attributes.
|
|
219
241
|
# @return [Integer] Hash code
|
|
220
242
|
def hash
|
|
221
|
-
[id, author, name, method, confidence, family, params_b, license, downloads, likes, is_gguf, created_at, first_seen_at].hash
|
|
243
|
+
[id, author, name, method, confidence, family, params_b, license, downloads, likes, is_gguf, created_at, first_seen_at, is_delisted, last_seen_at].hash
|
|
222
244
|
end
|
|
223
245
|
|
|
224
246
|
# Builds the object from hash
|
data/lib/abliteration/version.rb
CHANGED
data/lib/abliteration.rb
CHANGED
|
@@ -23,6 +23,7 @@ require 'abliteration/models/author_detail'
|
|
|
23
23
|
require 'abliteration/models/dai_point'
|
|
24
24
|
require 'abliteration/models/dataset'
|
|
25
25
|
require 'abliteration/models/dataset_detail'
|
|
26
|
+
require 'abliteration/models/delisted_model'
|
|
26
27
|
require 'abliteration/models/envelope'
|
|
27
28
|
require 'abliteration/models/error'
|
|
28
29
|
require 'abliteration/models/event'
|
|
@@ -35,6 +36,7 @@ require 'abliteration/models/index'
|
|
|
35
36
|
require 'abliteration/models/index_detail'
|
|
36
37
|
require 'abliteration/models/list_authors200_response'
|
|
37
38
|
require 'abliteration/models/list_datasets200_response'
|
|
39
|
+
require 'abliteration/models/list_delisted_models200_response'
|
|
38
40
|
require 'abliteration/models/list_indices200_response'
|
|
39
41
|
require 'abliteration/models/list_methods200_response'
|
|
40
42
|
require 'abliteration/models/list_models200_response'
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#abliteration.org Public API
|
|
3
|
+
|
|
4
|
+
#Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Abliteration::DelistedModel
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Abliteration::DelistedModel do
|
|
21
|
+
#let(:instance) { Abliteration::DelistedModel.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of DelistedModel' do
|
|
24
|
+
it 'should create an instance of DelistedModel' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Abliteration::DelistedModel)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "author"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "family"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "params_b"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "downloads"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "last_seen_at"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
describe 'test attribute "days_since_gone"' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
end
|