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.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/README.md +55 -7
- data/Rakefile +10 -0
- data/abliteration.gemspec +38 -21
- data/docs/Author.md +26 -0
- data/docs/AuthorDetail.md +28 -0
- data/docs/AuthorsApi.md +153 -0
- data/docs/DaiPoint.md +22 -0
- data/docs/Dataset.md +38 -0
- data/docs/DatasetDetail.md +22 -0
- data/docs/DatasetsApi.md +159 -0
- data/docs/Envelope.md +32 -0
- data/docs/Error.md +26 -0
- data/docs/Event.md +30 -0
- data/docs/GetAuthor200Response.md +32 -0
- data/docs/GetDataset200Response.md +32 -0
- data/docs/GetIndex200Response.md +32 -0
- data/docs/GetMethod200Response.md +32 -0
- data/docs/GetModel200Response.md +32 -0
- data/docs/Index.md +36 -0
- data/docs/IndexDetail.md +38 -0
- data/docs/IndicesApi.md +144 -0
- data/docs/ListAuthors200Response.md +32 -0
- data/docs/ListDatasets200Response.md +32 -0
- data/docs/ListIndices200Response.md +32 -0
- data/docs/ListMethods200Response.md +32 -0
- data/docs/ListModels200Response.md +32 -0
- data/docs/ListTimeline200Response.md +32 -0
- data/docs/Method.md +28 -0
- data/docs/MethodDetail.md +34 -0
- data/docs/MethodDetailAllOfTopAuthors.md +20 -0
- data/docs/MethodsApi.md +144 -0
- data/docs/ModelDetail.md +28 -0
- data/docs/ModelSummary.md +42 -0
- data/docs/ModelsApi.md +169 -0
- data/docs/Passport.md +22 -0
- data/docs/TimelineApi.md +85 -0
- data/git_push.sh +54 -0
- data/lib/abliteration/api/authors_api.rb +167 -0
- data/lib/abliteration/api/datasets_api.rb +176 -0
- data/lib/abliteration/api/indices_api.rb +147 -0
- data/lib/abliteration/api/methods_api.rb +147 -0
- data/lib/abliteration/api/models_api.rb +191 -0
- data/lib/abliteration/api/timeline_api.rb +99 -0
- data/lib/abliteration/api_client.rb +397 -0
- data/lib/abliteration/api_error.rb +58 -0
- data/lib/abliteration/api_model_base.rb +88 -0
- data/lib/abliteration/configuration.rb +308 -0
- data/lib/abliteration/models/author.rb +184 -0
- data/lib/abliteration/models/author_detail.rb +201 -0
- data/lib/abliteration/models/dai_point.rb +165 -0
- data/lib/abliteration/models/dataset.rb +247 -0
- data/lib/abliteration/models/dataset_detail.rb +169 -0
- data/lib/abliteration/models/envelope.rb +364 -0
- data/lib/abliteration/models/error.rb +221 -0
- data/lib/abliteration/models/event.rb +207 -0
- data/lib/abliteration/models/get_author200_response.rb +384 -0
- data/lib/abliteration/models/get_dataset200_response.rb +384 -0
- data/lib/abliteration/models/get_index200_response.rb +384 -0
- data/lib/abliteration/models/get_method200_response.rb +384 -0
- data/lib/abliteration/models/get_model200_response.rb +384 -0
- data/lib/abliteration/models/index.rb +281 -0
- data/lib/abliteration/models/index_detail.rb +296 -0
- data/lib/abliteration/models/list_authors200_response.rb +386 -0
- data/lib/abliteration/models/list_datasets200_response.rb +386 -0
- data/lib/abliteration/models/list_indices200_response.rb +386 -0
- data/lib/abliteration/models/list_methods200_response.rb +386 -0
- data/lib/abliteration/models/list_models200_response.rb +386 -0
- data/lib/abliteration/models/list_timeline200_response.rb +386 -0
- data/lib/abliteration/models/method.rb +227 -0
- data/lib/abliteration/models/method_detail.rb +265 -0
- data/lib/abliteration/models/method_detail_all_of_top_authors.rb +156 -0
- data/lib/abliteration/models/model_detail.rb +196 -0
- data/lib/abliteration/models/model_summary.rb +265 -0
- data/lib/abliteration/models/passport.rb +165 -0
- data/lib/abliteration/version.rb +15 -0
- data/lib/abliteration.rb +69 -24
- data/openapi-generator-config.json +12 -0
- data/spec/api/authors_api_spec.rb +61 -0
- data/spec/api/datasets_api_spec.rb +64 -0
- data/spec/api/indices_api_spec.rb +58 -0
- data/spec/api/methods_api_spec.rb +58 -0
- data/spec/api/models_api_spec.rb +69 -0
- data/spec/api/timeline_api_spec.rb +50 -0
- data/spec/models/author_detail_spec.rb +66 -0
- data/spec/models/author_spec.rb +60 -0
- data/spec/models/dai_point_spec.rb +48 -0
- data/spec/models/dataset_detail_spec.rb +48 -0
- data/spec/models/dataset_spec.rb +96 -0
- data/spec/models/envelope_spec.rb +82 -0
- data/spec/models/error_spec.rb +60 -0
- data/spec/models/event_spec.rb +72 -0
- data/spec/models/get_author200_response_spec.rb +82 -0
- data/spec/models/get_dataset200_response_spec.rb +82 -0
- data/spec/models/get_index200_response_spec.rb +82 -0
- data/spec/models/get_method200_response_spec.rb +82 -0
- data/spec/models/get_model200_response_spec.rb +82 -0
- data/spec/models/index_detail_spec.rb +104 -0
- data/spec/models/index_spec.rb +98 -0
- data/spec/models/list_authors200_response_spec.rb +82 -0
- data/spec/models/list_datasets200_response_spec.rb +82 -0
- data/spec/models/list_indices200_response_spec.rb +82 -0
- data/spec/models/list_methods200_response_spec.rb +82 -0
- data/spec/models/list_models200_response_spec.rb +82 -0
- data/spec/models/list_timeline200_response_spec.rb +82 -0
- data/spec/models/method_detail_all_of_top_authors_spec.rb +42 -0
- data/spec/models/method_detail_spec.rb +88 -0
- data/spec/models/method_spec.rb +70 -0
- data/spec/models/model_detail_spec.rb +66 -0
- data/spec/models/model_summary_spec.rb +108 -0
- data/spec/models/passport_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +196 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 125b5d1033cb3b5e2d0c6da086a00dfae95d47033f9856c22bc5408e17d3061a
|
|
4
|
+
data.tar.gz: 313918f4f4d3961d98d544923972e21723391be8d7dde10d9c0b188d8fa170fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2430b73a8e7fd183ddfc2de02670bb09b7d04e1e3740894bf0870add4124fe83a2ed6ef400c3113efa087e3f5cf3dc7c9b3f5f3c01db62719c4a15677cd04b6c
|
|
7
|
+
data.tar.gz: 16b2290403b2231e95d0fbe322ebf3c884864548286a7b1c3d2fc2c9485bd82e2fa7e59ea4ba7a589fff5768d7e871b1a477e007a4b0a2e42b6e9439cb0272e6
|
data/Gemfile
ADDED
data/README.md
CHANGED
|
@@ -1,17 +1,65 @@
|
|
|
1
|
-
# abliteration
|
|
1
|
+
# abliteration (Ruby)
|
|
2
2
|
|
|
3
|
-
Ruby
|
|
3
|
+
Auto-generated Ruby client for the [abliteration.org](https://abliteration.org) catalog API. Covers every route on `/api/v1` with typed models.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
gem install abliteration
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or in your `Gemfile`:
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
gem 'abliteration', '~> 0.1'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Get a key
|
|
18
|
+
|
|
19
|
+
Generate a Bearer token at <https://abliteration.org/shop/account#api-keys>. Then either export it or configure the client explicitly.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
export ABLITERATION_API_KEY=abl_live_...
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
require 'abliteration'
|
|
29
|
+
|
|
30
|
+
Abliteration.configure do |c|
|
|
31
|
+
c.access_token = ENV['ABLITERATION_API_KEY']
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
api = Abliteration::ModelsApi.new
|
|
35
|
+
result = api.list_models(method: 'M4', limit: 5)
|
|
36
|
+
result.data.each do |m|
|
|
37
|
+
puts "#{m.id} - #{m.downloads}"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Envelope also carries billing/rate-limit metadata:
|
|
41
|
+
puts "spent: #{result.cost}, wallet: #{result.credits_remaining}"
|
|
11
42
|
```
|
|
12
43
|
|
|
13
44
|
Full API docs: <https://abliteration.org/api>
|
|
14
45
|
|
|
46
|
+
## Available APIs
|
|
47
|
+
|
|
48
|
+
- `ModelsApi` - list and detail
|
|
49
|
+
- `MethodsApi` - M1-M9 taxonomy
|
|
50
|
+
- `IndicesApi` - DAI, Freedom Velocity, Weaponization, F2W Latency
|
|
51
|
+
- `AuthorsApi`, `DatasetsApi`, `TimelineApi`
|
|
52
|
+
|
|
53
|
+
## Alternatives
|
|
54
|
+
|
|
55
|
+
- Python: `pip install abliteration`
|
|
56
|
+
- CLI (Node): `npm install -g @abliteration/cli`
|
|
57
|
+
- HTTP directly: any Ruby HTTP client + `Authorization: Bearer` header
|
|
58
|
+
|
|
15
59
|
## License
|
|
16
60
|
|
|
17
|
-
MIT
|
|
61
|
+
MIT.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
*This client is auto-generated from the OpenAPI spec at [/api/v1/openapi.json](https://abliteration.org/api/v1/openapi.json) using [openapi-generator](https://openapi-generator.tech).*
|
data/Rakefile
ADDED
data/abliteration.gemspec
CHANGED
|
@@ -1,22 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
=begin
|
|
4
|
+
#abliteration.org Public API
|
|
5
|
+
|
|
6
|
+
#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.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
|
|
10
|
+
Generated by: https://openapi-generator.tech
|
|
11
|
+
Generator version: 7.25.0
|
|
12
|
+
|
|
13
|
+
=end
|
|
14
|
+
|
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
+
require "abliteration/version"
|
|
17
|
+
|
|
18
|
+
Gem::Specification.new do |s|
|
|
19
|
+
s.name = "abliteration"
|
|
20
|
+
s.version = Abliteration::VERSION
|
|
21
|
+
s.platform = Gem::Platform::RUBY
|
|
22
|
+
s.authors = ["Catyonic OU"]
|
|
23
|
+
s.email = ["contact@catyonic.com"]
|
|
24
|
+
s.homepage = "https://abliteration.org/api"
|
|
25
|
+
s.summary = "Ruby client for the abliteration.org catalog API"
|
|
26
|
+
s.description = "Auto-generated Ruby client for the abliteration.org LLM catalog API. Covers every route on /api/v1 with typed models and error responses."
|
|
27
|
+
s.license = "MIT"
|
|
28
|
+
s.required_ruby_version = ">= 2.7"
|
|
29
|
+
s.metadata = {}
|
|
30
|
+
|
|
31
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
32
|
+
|
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
34
|
+
|
|
35
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
36
|
+
s.test_files = `find spec/*`.split("\n")
|
|
37
|
+
s.executables = []
|
|
38
|
+
s.require_paths = ["lib"]
|
|
22
39
|
end
|
data/docs/Author.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Abliteration::Author
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **author** | **String** | | [optional] |
|
|
8
|
+
| **total_models** | **Integer** | | [optional] |
|
|
9
|
+
| **total_downloads** | **Integer** | | [optional] |
|
|
10
|
+
| **total_likes** | **Integer** | | [optional] |
|
|
11
|
+
| **first_seen_at** | **String** | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'abliteration'
|
|
17
|
+
|
|
18
|
+
instance = Abliteration::Author.new(
|
|
19
|
+
author: null,
|
|
20
|
+
total_models: null,
|
|
21
|
+
total_downloads: null,
|
|
22
|
+
total_likes: null,
|
|
23
|
+
first_seen_at: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Abliteration::AuthorDetail
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **author** | **String** | | [optional] |
|
|
8
|
+
| **total_models** | **Integer** | | [optional] |
|
|
9
|
+
| **total_downloads** | **Integer** | | [optional] |
|
|
10
|
+
| **total_likes** | **Integer** | | [optional] |
|
|
11
|
+
| **first_seen_at** | **String** | | [optional] |
|
|
12
|
+
| **models** | [**Array<ModelSummary>**](ModelSummary.md) | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'abliteration'
|
|
18
|
+
|
|
19
|
+
instance = Abliteration::AuthorDetail.new(
|
|
20
|
+
author: null,
|
|
21
|
+
total_models: null,
|
|
22
|
+
total_downloads: null,
|
|
23
|
+
total_likes: null,
|
|
24
|
+
first_seen_at: null,
|
|
25
|
+
models: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/AuthorsApi.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Abliteration::AuthorsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://abliteration.org*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_author**](AuthorsApi.md#get_author) | **GET** /api/v1/authors/{id} | Get one author |
|
|
8
|
+
| [**list_authors**](AuthorsApi.md#list_authors) | **GET** /api/v1/authors | List authors |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## get_author
|
|
12
|
+
|
|
13
|
+
> <GetAuthor200Response> get_author(id)
|
|
14
|
+
|
|
15
|
+
Get one author
|
|
16
|
+
|
|
17
|
+
Cost: 1 credit.
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'time'
|
|
23
|
+
require 'abliteration'
|
|
24
|
+
# setup authorization
|
|
25
|
+
Abliteration.configure do |config|
|
|
26
|
+
# Configure Bearer authorization: bearerAuth
|
|
27
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
api_instance = Abliteration::AuthorsApi.new
|
|
31
|
+
id = 'mlabonne' # String |
|
|
32
|
+
|
|
33
|
+
begin
|
|
34
|
+
# Get one author
|
|
35
|
+
result = api_instance.get_author(id)
|
|
36
|
+
p result
|
|
37
|
+
rescue Abliteration::ApiError => e
|
|
38
|
+
puts "Error when calling AuthorsApi->get_author: #{e}"
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Using the get_author_with_http_info variant
|
|
43
|
+
|
|
44
|
+
This returns an Array which contains the response data, status code and headers.
|
|
45
|
+
|
|
46
|
+
> <Array(<GetAuthor200Response>, Integer, Hash)> get_author_with_http_info(id)
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
begin
|
|
50
|
+
# Get one author
|
|
51
|
+
data, status_code, headers = api_instance.get_author_with_http_info(id)
|
|
52
|
+
p status_code # => 2xx
|
|
53
|
+
p headers # => { ... }
|
|
54
|
+
p data # => <GetAuthor200Response>
|
|
55
|
+
rescue Abliteration::ApiError => e
|
|
56
|
+
puts "Error when calling AuthorsApi->get_author_with_http_info: #{e}"
|
|
57
|
+
end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Parameters
|
|
61
|
+
|
|
62
|
+
| Name | Type | Description | Notes |
|
|
63
|
+
| ---- | ---- | ----------- | ----- |
|
|
64
|
+
| **id** | **String** | | |
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
[**GetAuthor200Response**](GetAuthor200Response.md)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: Not defined
|
|
77
|
+
- **Accept**: application/json
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## list_authors
|
|
81
|
+
|
|
82
|
+
> <ListAuthors200Response> list_authors(opts)
|
|
83
|
+
|
|
84
|
+
List authors
|
|
85
|
+
|
|
86
|
+
Cost: 5-15 credits, by rows returned.
|
|
87
|
+
|
|
88
|
+
### Examples
|
|
89
|
+
|
|
90
|
+
```ruby
|
|
91
|
+
require 'time'
|
|
92
|
+
require 'abliteration'
|
|
93
|
+
# setup authorization
|
|
94
|
+
Abliteration.configure do |config|
|
|
95
|
+
# Configure Bearer authorization: bearerAuth
|
|
96
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
api_instance = Abliteration::AuthorsApi.new
|
|
100
|
+
opts = {
|
|
101
|
+
sort: 'total_downloads', # String |
|
|
102
|
+
limit: 56, # Integer | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
103
|
+
offset: 56 # Integer | Rows to skip. Negative and non-numeric values are treated as 0.
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
begin
|
|
107
|
+
# List authors
|
|
108
|
+
result = api_instance.list_authors(opts)
|
|
109
|
+
p result
|
|
110
|
+
rescue Abliteration::ApiError => e
|
|
111
|
+
puts "Error when calling AuthorsApi->list_authors: #{e}"
|
|
112
|
+
end
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### Using the list_authors_with_http_info variant
|
|
116
|
+
|
|
117
|
+
This returns an Array which contains the response data, status code and headers.
|
|
118
|
+
|
|
119
|
+
> <Array(<ListAuthors200Response>, Integer, Hash)> list_authors_with_http_info(opts)
|
|
120
|
+
|
|
121
|
+
```ruby
|
|
122
|
+
begin
|
|
123
|
+
# List authors
|
|
124
|
+
data, status_code, headers = api_instance.list_authors_with_http_info(opts)
|
|
125
|
+
p status_code # => 2xx
|
|
126
|
+
p headers # => { ... }
|
|
127
|
+
p data # => <ListAuthors200Response>
|
|
128
|
+
rescue Abliteration::ApiError => e
|
|
129
|
+
puts "Error when calling AuthorsApi->list_authors_with_http_info: #{e}"
|
|
130
|
+
end
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Parameters
|
|
134
|
+
|
|
135
|
+
| Name | Type | Description | Notes |
|
|
136
|
+
| ---- | ---- | ----------- | ----- |
|
|
137
|
+
| **sort** | **String** | | [optional][default to '-total_downloads'] |
|
|
138
|
+
| **limit** | **Integer** | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [optional][default to 50] |
|
|
139
|
+
| **offset** | **Integer** | Rows to skip. Negative and non-numeric values are treated as 0. | [optional][default to 0] |
|
|
140
|
+
|
|
141
|
+
### Return type
|
|
142
|
+
|
|
143
|
+
[**ListAuthors200Response**](ListAuthors200Response.md)
|
|
144
|
+
|
|
145
|
+
### Authorization
|
|
146
|
+
|
|
147
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
148
|
+
|
|
149
|
+
### HTTP request headers
|
|
150
|
+
|
|
151
|
+
- **Content-Type**: Not defined
|
|
152
|
+
- **Accept**: application/json
|
|
153
|
+
|
data/docs/DaiPoint.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Abliteration::DaiPoint
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **month** | **String** | | [optional] |
|
|
8
|
+
| **weighted_dai_pct** | **Float** | | [optional] |
|
|
9
|
+
| **bases_included** | **Integer** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'abliteration'
|
|
15
|
+
|
|
16
|
+
instance = Abliteration::DaiPoint.new(
|
|
17
|
+
month: 2026-09,
|
|
18
|
+
weighted_dai_pct: null,
|
|
19
|
+
bases_included: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/Dataset.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Abliteration::Dataset
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
8
|
+
| **author** | **String** | | [optional] |
|
|
9
|
+
| **slug** | **String** | | [optional] |
|
|
10
|
+
| **category** | **String** | | [optional] |
|
|
11
|
+
| **license** | **String** | | [optional] |
|
|
12
|
+
| **downloads** | **Integer** | | [optional] |
|
|
13
|
+
| **downloads_all** | **Integer** | | [optional] |
|
|
14
|
+
| **likes** | **Integer** | | [optional] |
|
|
15
|
+
| **gated** | **Integer** | | [optional] |
|
|
16
|
+
| **created_at** | **String** | | [optional] |
|
|
17
|
+
| **first_seen_at** | **String** | | [optional] |
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'abliteration'
|
|
23
|
+
|
|
24
|
+
instance = Abliteration::Dataset.new(
|
|
25
|
+
id: null,
|
|
26
|
+
author: null,
|
|
27
|
+
slug: null,
|
|
28
|
+
category: null,
|
|
29
|
+
license: null,
|
|
30
|
+
downloads: null,
|
|
31
|
+
downloads_all: null,
|
|
32
|
+
likes: null,
|
|
33
|
+
gated: null,
|
|
34
|
+
created_at: null,
|
|
35
|
+
first_seen_at: null
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Abliteration::DatasetDetail
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
8
|
+
| **files** | **Array<Object>** | | [optional] |
|
|
9
|
+
| **passport** | [**Passport**](Passport.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'abliteration'
|
|
15
|
+
|
|
16
|
+
instance = Abliteration::DatasetDetail.new(
|
|
17
|
+
id: null,
|
|
18
|
+
files: null,
|
|
19
|
+
passport: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/DatasetsApi.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Abliteration::DatasetsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://abliteration.org*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_dataset**](DatasetsApi.md#get_dataset) | **GET** /api/v1/datasets/{id} | Get one dataset |
|
|
8
|
+
| [**list_datasets**](DatasetsApi.md#list_datasets) | **GET** /api/v1/datasets | List datasets |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## get_dataset
|
|
12
|
+
|
|
13
|
+
> <GetDataset200Response> get_dataset(id)
|
|
14
|
+
|
|
15
|
+
Get one dataset
|
|
16
|
+
|
|
17
|
+
Cost: 1 credit. The passport is null for datasets that do not have one yet.
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'time'
|
|
23
|
+
require 'abliteration'
|
|
24
|
+
# setup authorization
|
|
25
|
+
Abliteration.configure do |config|
|
|
26
|
+
# Configure Bearer authorization: bearerAuth
|
|
27
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
api_instance = Abliteration::DatasetsApi.new
|
|
31
|
+
id = 'mlabonne/orpo-dpo-mix-40k' # String |
|
|
32
|
+
|
|
33
|
+
begin
|
|
34
|
+
# Get one dataset
|
|
35
|
+
result = api_instance.get_dataset(id)
|
|
36
|
+
p result
|
|
37
|
+
rescue Abliteration::ApiError => e
|
|
38
|
+
puts "Error when calling DatasetsApi->get_dataset: #{e}"
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Using the get_dataset_with_http_info variant
|
|
43
|
+
|
|
44
|
+
This returns an Array which contains the response data, status code and headers.
|
|
45
|
+
|
|
46
|
+
> <Array(<GetDataset200Response>, Integer, Hash)> get_dataset_with_http_info(id)
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
begin
|
|
50
|
+
# Get one dataset
|
|
51
|
+
data, status_code, headers = api_instance.get_dataset_with_http_info(id)
|
|
52
|
+
p status_code # => 2xx
|
|
53
|
+
p headers # => { ... }
|
|
54
|
+
p data # => <GetDataset200Response>
|
|
55
|
+
rescue Abliteration::ApiError => e
|
|
56
|
+
puts "Error when calling DatasetsApi->get_dataset_with_http_info: #{e}"
|
|
57
|
+
end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Parameters
|
|
61
|
+
|
|
62
|
+
| Name | Type | Description | Notes |
|
|
63
|
+
| ---- | ---- | ----------- | ----- |
|
|
64
|
+
| **id** | **String** | | |
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
[**GetDataset200Response**](GetDataset200Response.md)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: Not defined
|
|
77
|
+
- **Accept**: application/json
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## list_datasets
|
|
81
|
+
|
|
82
|
+
> <ListDatasets200Response> list_datasets(opts)
|
|
83
|
+
|
|
84
|
+
List datasets
|
|
85
|
+
|
|
86
|
+
Cost: 5-15 credits, by rows returned.
|
|
87
|
+
|
|
88
|
+
### Examples
|
|
89
|
+
|
|
90
|
+
```ruby
|
|
91
|
+
require 'time'
|
|
92
|
+
require 'abliteration'
|
|
93
|
+
# setup authorization
|
|
94
|
+
Abliteration.configure do |config|
|
|
95
|
+
# Configure Bearer authorization: bearerAuth
|
|
96
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
api_instance = Abliteration::DatasetsApi.new
|
|
100
|
+
opts = {
|
|
101
|
+
category: 'category_example', # String | Workflow stage, for example heal or extract.
|
|
102
|
+
author: 'author_example', # String | Publisher handle, case-insensitive.
|
|
103
|
+
license: 'license_example', # String | License string as published.
|
|
104
|
+
sort: 'downloads', # String |
|
|
105
|
+
limit: 56, # Integer | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
106
|
+
offset: 56 # Integer | Rows to skip. Negative and non-numeric values are treated as 0.
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
begin
|
|
110
|
+
# List datasets
|
|
111
|
+
result = api_instance.list_datasets(opts)
|
|
112
|
+
p result
|
|
113
|
+
rescue Abliteration::ApiError => e
|
|
114
|
+
puts "Error when calling DatasetsApi->list_datasets: #{e}"
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Using the list_datasets_with_http_info variant
|
|
119
|
+
|
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
|
121
|
+
|
|
122
|
+
> <Array(<ListDatasets200Response>, Integer, Hash)> list_datasets_with_http_info(opts)
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
begin
|
|
126
|
+
# List datasets
|
|
127
|
+
data, status_code, headers = api_instance.list_datasets_with_http_info(opts)
|
|
128
|
+
p status_code # => 2xx
|
|
129
|
+
p headers # => { ... }
|
|
130
|
+
p data # => <ListDatasets200Response>
|
|
131
|
+
rescue Abliteration::ApiError => e
|
|
132
|
+
puts "Error when calling DatasetsApi->list_datasets_with_http_info: #{e}"
|
|
133
|
+
end
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
|
140
|
+
| **category** | **String** | Workflow stage, for example heal or extract. | [optional] |
|
|
141
|
+
| **author** | **String** | Publisher handle, case-insensitive. | [optional] |
|
|
142
|
+
| **license** | **String** | License string as published. | [optional] |
|
|
143
|
+
| **sort** | **String** | | [optional][default to '-downloads'] |
|
|
144
|
+
| **limit** | **Integer** | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [optional][default to 50] |
|
|
145
|
+
| **offset** | **Integer** | Rows to skip. Negative and non-numeric values are treated as 0. | [optional][default to 0] |
|
|
146
|
+
|
|
147
|
+
### Return type
|
|
148
|
+
|
|
149
|
+
[**ListDatasets200Response**](ListDatasets200Response.md)
|
|
150
|
+
|
|
151
|
+
### Authorization
|
|
152
|
+
|
|
153
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
154
|
+
|
|
155
|
+
### HTTP request headers
|
|
156
|
+
|
|
157
|
+
- **Content-Type**: Not defined
|
|
158
|
+
- **Accept**: application/json
|
|
159
|
+
|
data/docs/Envelope.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Abliteration::Envelope
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | **Object** | The payload. An array on list routes, an object on single-entity routes. | |
|
|
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::Envelope.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/Error.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Abliteration::Error
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error** | **String** | Stable machine-readable slug. | |
|
|
8
|
+
| **message** | **String** | Human-readable detail. May be reworded at any time. | [optional] |
|
|
9
|
+
| **retry_after** | **Integer** | Seconds to wait. Present on 429. | [optional] |
|
|
10
|
+
| **credits_remaining** | **Integer** | Present on 402. | [optional] |
|
|
11
|
+
| **request_id** | **String** | | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'abliteration'
|
|
17
|
+
|
|
18
|
+
instance = Abliteration::Error.new(
|
|
19
|
+
error: null,
|
|
20
|
+
message: null,
|
|
21
|
+
retry_after: null,
|
|
22
|
+
credits_remaining: null,
|
|
23
|
+
request_id: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|