abliteration 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/README.md +55 -7
  4. data/Rakefile +10 -0
  5. data/abliteration.gemspec +38 -21
  6. data/docs/Author.md +26 -0
  7. data/docs/AuthorDetail.md +28 -0
  8. data/docs/AuthorsApi.md +153 -0
  9. data/docs/DaiPoint.md +22 -0
  10. data/docs/Dataset.md +38 -0
  11. data/docs/DatasetDetail.md +22 -0
  12. data/docs/DatasetsApi.md +159 -0
  13. data/docs/Envelope.md +32 -0
  14. data/docs/Error.md +26 -0
  15. data/docs/Event.md +30 -0
  16. data/docs/GetAuthor200Response.md +32 -0
  17. data/docs/GetDataset200Response.md +32 -0
  18. data/docs/GetIndex200Response.md +32 -0
  19. data/docs/GetMethod200Response.md +32 -0
  20. data/docs/GetModel200Response.md +32 -0
  21. data/docs/Index.md +36 -0
  22. data/docs/IndexDetail.md +38 -0
  23. data/docs/IndicesApi.md +144 -0
  24. data/docs/ListAuthors200Response.md +32 -0
  25. data/docs/ListDatasets200Response.md +32 -0
  26. data/docs/ListIndices200Response.md +32 -0
  27. data/docs/ListMethods200Response.md +32 -0
  28. data/docs/ListModels200Response.md +32 -0
  29. data/docs/ListTimeline200Response.md +32 -0
  30. data/docs/Method.md +28 -0
  31. data/docs/MethodDetail.md +34 -0
  32. data/docs/MethodDetailAllOfTopAuthors.md +20 -0
  33. data/docs/MethodsApi.md +144 -0
  34. data/docs/ModelDetail.md +28 -0
  35. data/docs/ModelSummary.md +42 -0
  36. data/docs/ModelsApi.md +169 -0
  37. data/docs/Passport.md +22 -0
  38. data/docs/TimelineApi.md +85 -0
  39. data/git_push.sh +54 -0
  40. data/lib/abliteration/api/authors_api.rb +167 -0
  41. data/lib/abliteration/api/datasets_api.rb +176 -0
  42. data/lib/abliteration/api/indices_api.rb +147 -0
  43. data/lib/abliteration/api/methods_api.rb +147 -0
  44. data/lib/abliteration/api/models_api.rb +191 -0
  45. data/lib/abliteration/api/timeline_api.rb +99 -0
  46. data/lib/abliteration/api_client.rb +397 -0
  47. data/lib/abliteration/api_error.rb +58 -0
  48. data/lib/abliteration/api_model_base.rb +88 -0
  49. data/lib/abliteration/configuration.rb +308 -0
  50. data/lib/abliteration/models/author.rb +184 -0
  51. data/lib/abliteration/models/author_detail.rb +201 -0
  52. data/lib/abliteration/models/dai_point.rb +165 -0
  53. data/lib/abliteration/models/dataset.rb +247 -0
  54. data/lib/abliteration/models/dataset_detail.rb +169 -0
  55. data/lib/abliteration/models/envelope.rb +364 -0
  56. data/lib/abliteration/models/error.rb +221 -0
  57. data/lib/abliteration/models/event.rb +207 -0
  58. data/lib/abliteration/models/get_author200_response.rb +384 -0
  59. data/lib/abliteration/models/get_dataset200_response.rb +384 -0
  60. data/lib/abliteration/models/get_index200_response.rb +384 -0
  61. data/lib/abliteration/models/get_method200_response.rb +384 -0
  62. data/lib/abliteration/models/get_model200_response.rb +384 -0
  63. data/lib/abliteration/models/index.rb +281 -0
  64. data/lib/abliteration/models/index_detail.rb +296 -0
  65. data/lib/abliteration/models/list_authors200_response.rb +386 -0
  66. data/lib/abliteration/models/list_datasets200_response.rb +386 -0
  67. data/lib/abliteration/models/list_indices200_response.rb +386 -0
  68. data/lib/abliteration/models/list_methods200_response.rb +386 -0
  69. data/lib/abliteration/models/list_models200_response.rb +386 -0
  70. data/lib/abliteration/models/list_timeline200_response.rb +386 -0
  71. data/lib/abliteration/models/method.rb +227 -0
  72. data/lib/abliteration/models/method_detail.rb +265 -0
  73. data/lib/abliteration/models/method_detail_all_of_top_authors.rb +156 -0
  74. data/lib/abliteration/models/model_detail.rb +196 -0
  75. data/lib/abliteration/models/model_summary.rb +265 -0
  76. data/lib/abliteration/models/passport.rb +165 -0
  77. data/lib/abliteration/version.rb +15 -0
  78. data/lib/abliteration.rb +69 -24
  79. data/openapi-generator-config.json +12 -0
  80. data/spec/api/authors_api_spec.rb +61 -0
  81. data/spec/api/datasets_api_spec.rb +64 -0
  82. data/spec/api/indices_api_spec.rb +58 -0
  83. data/spec/api/methods_api_spec.rb +58 -0
  84. data/spec/api/models_api_spec.rb +69 -0
  85. data/spec/api/timeline_api_spec.rb +50 -0
  86. data/spec/models/author_detail_spec.rb +66 -0
  87. data/spec/models/author_spec.rb +60 -0
  88. data/spec/models/dai_point_spec.rb +48 -0
  89. data/spec/models/dataset_detail_spec.rb +48 -0
  90. data/spec/models/dataset_spec.rb +96 -0
  91. data/spec/models/envelope_spec.rb +82 -0
  92. data/spec/models/error_spec.rb +60 -0
  93. data/spec/models/event_spec.rb +72 -0
  94. data/spec/models/get_author200_response_spec.rb +82 -0
  95. data/spec/models/get_dataset200_response_spec.rb +82 -0
  96. data/spec/models/get_index200_response_spec.rb +82 -0
  97. data/spec/models/get_method200_response_spec.rb +82 -0
  98. data/spec/models/get_model200_response_spec.rb +82 -0
  99. data/spec/models/index_detail_spec.rb +104 -0
  100. data/spec/models/index_spec.rb +98 -0
  101. data/spec/models/list_authors200_response_spec.rb +82 -0
  102. data/spec/models/list_datasets200_response_spec.rb +82 -0
  103. data/spec/models/list_indices200_response_spec.rb +82 -0
  104. data/spec/models/list_methods200_response_spec.rb +82 -0
  105. data/spec/models/list_models200_response_spec.rb +82 -0
  106. data/spec/models/list_timeline200_response_spec.rb +82 -0
  107. data/spec/models/method_detail_all_of_top_authors_spec.rb +42 -0
  108. data/spec/models/method_detail_spec.rb +88 -0
  109. data/spec/models/method_spec.rb +70 -0
  110. data/spec/models/model_detail_spec.rb +66 -0
  111. data/spec/models/model_summary_spec.rb +108 -0
  112. data/spec/models/passport_spec.rb +48 -0
  113. data/spec/spec_helper.rb +111 -0
  114. metadata +196 -16
@@ -0,0 +1,265 @@
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 ModelSummary < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :author
21
+
22
+ attr_accessor :name
23
+
24
+ attr_accessor :method
25
+
26
+ attr_accessor :confidence
27
+
28
+ attr_accessor :family
29
+
30
+ attr_accessor :params_b
31
+
32
+ attr_accessor :license
33
+
34
+ attr_accessor :downloads
35
+
36
+ attr_accessor :likes
37
+
38
+ attr_accessor :is_gguf
39
+
40
+ attr_accessor :created_at
41
+
42
+ attr_accessor :first_seen_at
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'id' => :'id',
48
+ :'author' => :'author',
49
+ :'name' => :'name',
50
+ :'method' => :'method',
51
+ :'confidence' => :'confidence',
52
+ :'family' => :'family',
53
+ :'params_b' => :'params_b',
54
+ :'license' => :'license',
55
+ :'downloads' => :'downloads',
56
+ :'likes' => :'likes',
57
+ :'is_gguf' => :'is_gguf',
58
+ :'created_at' => :'created_at',
59
+ :'first_seen_at' => :'first_seen_at'
60
+ }
61
+ end
62
+
63
+ # Returns attribute mapping this model knows about
64
+ def self.acceptable_attribute_map
65
+ attribute_map
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ acceptable_attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'id' => :'String',
77
+ :'author' => :'String',
78
+ :'name' => :'String',
79
+ :'method' => :'String',
80
+ :'confidence' => :'String',
81
+ :'family' => :'String',
82
+ :'params_b' => :'Float',
83
+ :'license' => :'String',
84
+ :'downloads' => :'Integer',
85
+ :'likes' => :'Integer',
86
+ :'is_gguf' => :'Integer',
87
+ :'created_at' => :'String',
88
+ :'first_seen_at' => :'String'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ :'method',
96
+ :'confidence',
97
+ :'family',
98
+ :'params_b',
99
+ :'license',
100
+ :'downloads',
101
+ :'likes',
102
+ :'is_gguf',
103
+ :'created_at',
104
+ :'first_seen_at'
105
+ ])
106
+ end
107
+
108
+ # Initializes the object
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ def initialize(attributes = {})
111
+ if (!attributes.is_a?(Hash))
112
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Abliteration::ModelSummary` initialize method"
113
+ end
114
+
115
+ # check to see if the attribute exists and convert string to symbol for hash key
116
+ acceptable_attribute_map = self.class.acceptable_attribute_map
117
+ attributes = attributes.each_with_object({}) { |(k, v), h|
118
+ if (!acceptable_attribute_map.key?(k.to_sym))
119
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Abliteration::ModelSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
120
+ end
121
+ h[k.to_sym] = v
122
+ }
123
+
124
+ if attributes.key?(:'id')
125
+ self.id = attributes[:'id']
126
+ end
127
+
128
+ if attributes.key?(:'author')
129
+ self.author = attributes[:'author']
130
+ end
131
+
132
+ if attributes.key?(:'name')
133
+ self.name = attributes[:'name']
134
+ end
135
+
136
+ if attributes.key?(:'method')
137
+ self.method = attributes[:'method']
138
+ end
139
+
140
+ if attributes.key?(:'confidence')
141
+ self.confidence = attributes[:'confidence']
142
+ end
143
+
144
+ if attributes.key?(:'family')
145
+ self.family = attributes[:'family']
146
+ end
147
+
148
+ if attributes.key?(:'params_b')
149
+ self.params_b = attributes[:'params_b']
150
+ end
151
+
152
+ if attributes.key?(:'license')
153
+ self.license = attributes[:'license']
154
+ end
155
+
156
+ if attributes.key?(:'downloads')
157
+ self.downloads = attributes[:'downloads']
158
+ end
159
+
160
+ if attributes.key?(:'likes')
161
+ self.likes = attributes[:'likes']
162
+ end
163
+
164
+ if attributes.key?(:'is_gguf')
165
+ self.is_gguf = attributes[:'is_gguf']
166
+ end
167
+
168
+ if attributes.key?(:'created_at')
169
+ self.created_at = attributes[:'created_at']
170
+ end
171
+
172
+ if attributes.key?(:'first_seen_at')
173
+ self.first_seen_at = attributes[:'first_seen_at']
174
+ end
175
+ end
176
+
177
+ # Show invalid properties with the reasons. Usually used together with valid?
178
+ # @return Array for valid properties with the reasons
179
+ def list_invalid_properties
180
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
181
+ invalid_properties = Array.new
182
+ invalid_properties
183
+ end
184
+
185
+ # Check to see if the all the properties in the model are valid
186
+ # @return true if the model is valid
187
+ def valid?
188
+ warn '[DEPRECATED] the `valid?` method is obsolete'
189
+ true
190
+ end
191
+
192
+ # Checks equality by comparing each attribute.
193
+ # @param [Object] Object to be compared
194
+ def ==(o)
195
+ return true if self.equal?(o)
196
+ self.class == o.class &&
197
+ id == o.id &&
198
+ author == o.author &&
199
+ name == o.name &&
200
+ method == o.method &&
201
+ confidence == o.confidence &&
202
+ family == o.family &&
203
+ params_b == o.params_b &&
204
+ license == o.license &&
205
+ downloads == o.downloads &&
206
+ likes == o.likes &&
207
+ is_gguf == o.is_gguf &&
208
+ created_at == o.created_at &&
209
+ first_seen_at == o.first_seen_at
210
+ end
211
+
212
+ # @see the `==` method
213
+ # @param [Object] Object to be compared
214
+ def eql?(o)
215
+ self == o
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Integer] Hash code
220
+ def hash
221
+ [id, author, name, method, confidence, family, params_b, license, downloads, likes, is_gguf, created_at, first_seen_at].hash
222
+ end
223
+
224
+ # Builds the object from hash
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ # @return [Object] Returns the model itself
227
+ def self.build_from_hash(attributes)
228
+ return nil unless attributes.is_a?(Hash)
229
+ attributes = attributes.transform_keys(&:to_sym)
230
+ transformed_hash = {}
231
+ openapi_types.each_pair do |key, type|
232
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
233
+ transformed_hash["#{key}"] = nil
234
+ elsif type =~ /\AArray<(.*)>/i
235
+ # check to ensure the input is an array given that the attribute
236
+ # is documented as an array but the input is not
237
+ if attributes[attribute_map[key]].is_a?(Array)
238
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
239
+ end
240
+ elsif !attributes[attribute_map[key]].nil?
241
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
242
+ end
243
+ end
244
+ new(transformed_hash)
245
+ end
246
+
247
+ # Returns the object in the form of hash
248
+ # @return [Hash] Returns the object in the form of hash
249
+ def to_hash
250
+ hash = {}
251
+ self.class.attribute_map.each_pair do |attr, param|
252
+ value = self.send(attr)
253
+ if value.nil?
254
+ is_nullable = self.class.openapi_nullable.include?(attr)
255
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
256
+ end
257
+
258
+ hash[param] = _to_hash(value)
259
+ end
260
+ hash
261
+ end
262
+
263
+ end
264
+
265
+ end
@@ -0,0 +1,165 @@
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 Passport < ApiModelBase
18
+ attr_accessor :one_liner
19
+
20
+ attr_accessor :practitioner
21
+
22
+ attr_accessor :research
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'one_liner' => :'one_liner',
28
+ :'practitioner' => :'practitioner',
29
+ :'research' => :'research'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'one_liner' => :'String',
47
+ :'practitioner' => :'String',
48
+ :'research' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Abliteration::Passport` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Abliteration::Passport`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'one_liner')
75
+ self.one_liner = attributes[:'one_liner']
76
+ end
77
+
78
+ if attributes.key?(:'practitioner')
79
+ self.practitioner = attributes[:'practitioner']
80
+ end
81
+
82
+ if attributes.key?(:'research')
83
+ self.research = attributes[:'research']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ one_liner == o.one_liner &&
108
+ practitioner == o.practitioner &&
109
+ research == o.research
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [one_liner, practitioner, research].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -0,0 +1,15 @@
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
+ module Abliteration
14
+ VERSION = '0.1.0'
15
+ end
data/lib/abliteration.rb CHANGED
@@ -1,28 +1,73 @@
1
- # frozen_string_literal: true
2
-
3
- # abliteration - Ruby wrapper for abliteration.org catalog API
4
- #
5
- # This is a namespace-reservation release. A real Ruby client is planned;
6
- # for now use the HTTP API directly or the Node.js CLI:
7
- #
8
- # npm install -g @abliteration/cli
9
- # abl login
10
- # abl models --method M4 --limit 5
11
- #
12
- # The HTTP API is documented at https://abliteration.org/api and requires
13
- # no client: a Bearer token in the Authorization header is all it needs.
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
+ # Common files
14
+ require 'abliteration/api_client'
15
+ require 'abliteration/api_error'
16
+ require 'abliteration/api_model_base'
17
+ require 'abliteration/version'
18
+ require 'abliteration/configuration'
19
+
20
+ # Models
21
+ require 'abliteration/models/author'
22
+ require 'abliteration/models/author_detail'
23
+ require 'abliteration/models/dai_point'
24
+ require 'abliteration/models/dataset'
25
+ require 'abliteration/models/dataset_detail'
26
+ require 'abliteration/models/envelope'
27
+ require 'abliteration/models/error'
28
+ require 'abliteration/models/event'
29
+ require 'abliteration/models/get_author200_response'
30
+ require 'abliteration/models/get_dataset200_response'
31
+ require 'abliteration/models/get_index200_response'
32
+ require 'abliteration/models/get_method200_response'
33
+ require 'abliteration/models/get_model200_response'
34
+ require 'abliteration/models/index'
35
+ require 'abliteration/models/index_detail'
36
+ require 'abliteration/models/list_authors200_response'
37
+ require 'abliteration/models/list_datasets200_response'
38
+ require 'abliteration/models/list_indices200_response'
39
+ require 'abliteration/models/list_methods200_response'
40
+ require 'abliteration/models/list_models200_response'
41
+ require 'abliteration/models/list_timeline200_response'
42
+ require 'abliteration/models/method'
43
+ require 'abliteration/models/method_detail'
44
+ require 'abliteration/models/method_detail_all_of_top_authors'
45
+ require 'abliteration/models/model_detail'
46
+ require 'abliteration/models/model_summary'
47
+ require 'abliteration/models/passport'
48
+
49
+ # APIs
50
+ require 'abliteration/api/authors_api'
51
+ require 'abliteration/api/datasets_api'
52
+ require 'abliteration/api/indices_api'
53
+ require 'abliteration/api/methods_api'
54
+ require 'abliteration/api/models_api'
55
+ require 'abliteration/api/timeline_api'
14
56
 
15
57
  module Abliteration
16
- VERSION = '0.0.1'
17
-
18
- # Placeholder module. See https://abliteration.org/api for the current
19
- # API surface. A Ruby client will land in a future minor release.
20
- def self.info
21
- {
22
- version: VERSION,
23
- status: 'namespace-reserved',
24
- docs: 'https://abliteration.org/api',
25
- cli: 'npm install -g @abliteration/cli'
26
- }
58
+ class << self
59
+ # Customize default settings for the SDK using block.
60
+ # Abliteration.configure do |config|
61
+ # config.username = "xxx"
62
+ # config.password = "xxx"
63
+ # end
64
+ # If no block given, return the default Configuration object.
65
+ def configure
66
+ if block_given?
67
+ yield(Configuration.default)
68
+ else
69
+ Configuration.default
70
+ end
71
+ end
27
72
  end
28
73
  end
@@ -0,0 +1,12 @@
1
+ {
2
+ "gemName": "abliteration",
3
+ "moduleName": "Abliteration",
4
+ "gemVersion": "0.1.0",
5
+ "gemAuthor": "Catyonic OU",
6
+ "gemAuthorEmail": "contact@catyonic.com",
7
+ "gemHomepage": "https://abliteration.org/api",
8
+ "gemSummary": "Ruby client for the abliteration.org catalog API",
9
+ "gemDescription": "Auto-generated Ruby client for the abliteration.org LLM catalog API. Covers every route on /api/v1 with typed models and error responses.",
10
+ "gemLicense": "MIT",
11
+ "library": "typhoeus"
12
+ }
@@ -0,0 +1,61 @@
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
+
16
+ # Unit tests for Abliteration::AuthorsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'AuthorsApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = Abliteration::AuthorsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of AuthorsApi' do
30
+ it 'should create an instance of AuthorsApi' do
31
+ expect(@api_instance).to be_instance_of(Abliteration::AuthorsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_author
36
+ # Get one author
37
+ # Cost: 1 credit.
38
+ # @param id
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [GetAuthor200Response]
41
+ describe 'get_author test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
+ end
45
+ end
46
+
47
+ # unit tests for list_authors
48
+ # List authors
49
+ # Cost: 5-15 credits, by rows returned.
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [String] :sort
52
+ # @option opts [Integer] :limit Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
53
+ # @option opts [Integer] :offset Rows to skip. Negative and non-numeric values are treated as 0.
54
+ # @return [ListAuthors200Response]
55
+ describe 'list_authors test' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
58
+ end
59
+ end
60
+
61
+ end
@@ -0,0 +1,64 @@
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
+
16
+ # Unit tests for Abliteration::DatasetsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'DatasetsApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = Abliteration::DatasetsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of DatasetsApi' do
30
+ it 'should create an instance of DatasetsApi' do
31
+ expect(@api_instance).to be_instance_of(Abliteration::DatasetsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_dataset
36
+ # Get one dataset
37
+ # Cost: 1 credit. The passport is null for datasets that do not have one yet.
38
+ # @param id
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [GetDataset200Response]
41
+ describe 'get_dataset test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
+ end
45
+ end
46
+
47
+ # unit tests for list_datasets
48
+ # List datasets
49
+ # Cost: 5-15 credits, by rows returned.
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [String] :category Workflow stage, for example heal or extract.
52
+ # @option opts [String] :author Publisher handle, case-insensitive.
53
+ # @option opts [String] :license License string as published.
54
+ # @option opts [String] :sort
55
+ # @option opts [Integer] :limit Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
56
+ # @option opts [Integer] :offset Rows to skip. Negative and non-numeric values are treated as 0.
57
+ # @return [ListDatasets200Response]
58
+ describe 'list_datasets test' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
61
+ end
62
+ end
63
+
64
+ end