tensors-ruby 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 +7 -0
- data/Gemfile +9 -0
- data/README.md +154 -0
- data/lib/tensors-ruby/api/auth_api.rb +387 -0
- data/lib/tensors-ruby/api/civit_ai_api.rb +85 -0
- data/lib/tensors-ruby/api/comfy_uiapi_api.rb +582 -0
- data/lib/tensors-ruby/api/database_api.rb +655 -0
- data/lib/tensors-ruby/api/default_api.rb +77 -0
- data/lib/tensors-ruby/api/download_api.rb +210 -0
- data/lib/tensors-ruby/api/gallery_api.rb +416 -0
- data/lib/tensors-ruby/api/search_api.rb +129 -0
- data/lib/tensors-ruby/api_client.rb +441 -0
- data/lib/tensors-ruby/api_error.rb +58 -0
- data/lib/tensors-ruby/api_model_base.rb +88 -0
- data/lib/tensors-ruby/configuration.rb +399 -0
- data/lib/tensors-ruby/models/cache_request.rb +165 -0
- data/lib/tensors-ruby/models/download_request.rb +179 -0
- data/lib/tensors-ruby/models/generate_request.rb +444 -0
- data/lib/tensors-ruby/models/generate_response.rb +213 -0
- data/lib/tensors-ruby/models/http_validation_error.rb +149 -0
- data/lib/tensors-ruby/models/location_inner.rb +103 -0
- data/lib/tensors-ruby/models/metadata_update.rb +181 -0
- data/lib/tensors-ruby/models/models_response.rb +205 -0
- data/lib/tensors-ruby/models/provider.rb +41 -0
- data/lib/tensors-ruby/models/queue_status_response.rb +161 -0
- data/lib/tensors-ruby/models/scan_request.rb +165 -0
- data/lib/tensors-ruby/models/sort_order.rb +41 -0
- data/lib/tensors-ruby/models/system_stats_response.rb +161 -0
- data/lib/tensors-ruby/models/validation_error.rb +237 -0
- data/lib/tensors-ruby/models/workflow_request.rb +168 -0
- data/lib/tensors-ruby/models/workflow_response.rb +222 -0
- data/lib/tensors-ruby/version.rb +15 -0
- data/lib/tensors-ruby.rb +64 -0
- data/spec/api/auth_api_spec.rb +109 -0
- data/spec/api/civit_ai_api_spec.rb +47 -0
- data/spec/api/comfy_uiapi_api_spec.rb +141 -0
- data/spec/api/database_api_spec.rb +155 -0
- data/spec/api/default_api_spec.rb +45 -0
- data/spec/api/download_api_spec.rb +70 -0
- data/spec/api/gallery_api_spec.rb +109 -0
- data/spec/api/search_api_spec.rb +60 -0
- data/spec/models/cache_request_spec.rb +36 -0
- data/spec/models/download_request_spec.rb +54 -0
- data/spec/models/generate_request_spec.rb +108 -0
- data/spec/models/generate_response_spec.rb +54 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/location_inner_spec.rb +21 -0
- data/spec/models/metadata_update_spec.rb +54 -0
- data/spec/models/models_response_spec.rb +66 -0
- data/spec/models/provider_spec.rb +30 -0
- data/spec/models/queue_status_response_spec.rb +42 -0
- data/spec/models/scan_request_spec.rb +36 -0
- data/spec/models/sort_order_spec.rb +30 -0
- data/spec/models/system_stats_response_spec.rb +42 -0
- data/spec/models/validation_error_spec.rb +60 -0
- data/spec/models/workflow_request_spec.rb +36 -0
- data/spec/models/workflow_response_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- data/tensors-ruby.gemspec +41 -0
- metadata +194 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#tensors
|
|
3
|
+
|
|
4
|
+
#API for CivitAI model management and image gallery
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.18
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for TensorsApi::DatabaseApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'DatabaseApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = TensorsApi::DatabaseApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of DatabaseApi' do
|
|
30
|
+
it 'should create an instance of DatabaseApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(TensorsApi::DatabaseApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for cache_model_api_db_cache_post
|
|
36
|
+
# Cache Model
|
|
37
|
+
# Fetch and cache full CivitAI model data.
|
|
38
|
+
# @param cache_request
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [Hash<String, Object>]
|
|
41
|
+
describe 'cache_model_api_db_cache_post 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 get_file_api_db_files_file_id_get
|
|
48
|
+
# Get File
|
|
49
|
+
# Get local file by ID.
|
|
50
|
+
# @param file_id
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @return [Hash<String, Object>]
|
|
53
|
+
describe 'get_file_api_db_files_file_id_get test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# unit tests for get_model_api_db_models_civitai_id_get
|
|
60
|
+
# Get Model
|
|
61
|
+
# Get cached model by CivitAI ID.
|
|
62
|
+
# @param civitai_id
|
|
63
|
+
# @param [Hash] opts the optional parameters
|
|
64
|
+
# @return [Hash<String, Object>]
|
|
65
|
+
describe 'get_model_api_db_models_civitai_id_get test' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# unit tests for get_stats_api_db_stats_get
|
|
72
|
+
# Get Stats
|
|
73
|
+
# Get database statistics.
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @return [Hash<String, Object>]
|
|
76
|
+
describe 'get_stats_api_db_stats_get test' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# unit tests for get_triggers_by_path_api_db_triggers_get
|
|
83
|
+
# Get Triggers By Path
|
|
84
|
+
# Get trigger words for a local file by path.
|
|
85
|
+
# @param file_path Path to safetensor file
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [Array<String>]
|
|
88
|
+
describe 'get_triggers_by_path_api_db_triggers_get test' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# unit tests for get_triggers_by_version_api_db_triggers_version_id_get
|
|
95
|
+
# Get Triggers By Version
|
|
96
|
+
# Get trigger words for a version by CivitAI version ID.
|
|
97
|
+
# @param version_id
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @return [Array<String>]
|
|
100
|
+
describe 'get_triggers_by_version_api_db_triggers_version_id_get test' do
|
|
101
|
+
it 'should work' do
|
|
102
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# unit tests for link_files_api_db_link_post
|
|
107
|
+
# Link Files
|
|
108
|
+
# Link unlinked local files to CivitAI by hash lookup.
|
|
109
|
+
# @param [Hash] opts the optional parameters
|
|
110
|
+
# @return [Hash<String, Object>]
|
|
111
|
+
describe 'link_files_api_db_link_post test' do
|
|
112
|
+
it 'should work' do
|
|
113
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# unit tests for list_files_api_db_files_get
|
|
118
|
+
# List Files
|
|
119
|
+
# List all local files with CivitAI info.
|
|
120
|
+
# @param [Hash] opts the optional parameters
|
|
121
|
+
# @return [Array<Hash<String, Object>>]
|
|
122
|
+
describe 'list_files_api_db_files_get test' do
|
|
123
|
+
it 'should work' do
|
|
124
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# unit tests for scan_directory_api_db_scan_post
|
|
129
|
+
# Scan Directory
|
|
130
|
+
# Scan directory for safetensor files and add to database.
|
|
131
|
+
# @param scan_request
|
|
132
|
+
# @param [Hash] opts the optional parameters
|
|
133
|
+
# @return [Hash<String, Object>]
|
|
134
|
+
describe 'scan_directory_api_db_scan_post test' do
|
|
135
|
+
it 'should work' do
|
|
136
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# unit tests for search_models_api_db_models_get
|
|
141
|
+
# Search Models
|
|
142
|
+
# Search cached models offline.
|
|
143
|
+
# @param [Hash] opts the optional parameters
|
|
144
|
+
# @option opts [String] :query Search query
|
|
145
|
+
# @option opts [String] :type Model type filter
|
|
146
|
+
# @option opts [String] :base Base model filter
|
|
147
|
+
# @option opts [Integer] :limit Max results
|
|
148
|
+
# @return [Array<Hash<String, Object>>]
|
|
149
|
+
describe 'search_models_api_db_models_get test' do
|
|
150
|
+
it 'should work' do
|
|
151
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#tensors
|
|
3
|
+
|
|
4
|
+
#API for CivitAI model management and image gallery
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.18
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for TensorsApi::DefaultApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'DefaultApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = TensorsApi::DefaultApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of DefaultApi' do
|
|
30
|
+
it 'should create an instance of DefaultApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(TensorsApi::DefaultApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for status_status_get
|
|
36
|
+
# Status
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Hash<String, String>]
|
|
39
|
+
describe 'status_status_get test' do
|
|
40
|
+
it 'should work' do
|
|
41
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#tensors
|
|
3
|
+
|
|
4
|
+
#API for CivitAI model management and image gallery
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.18
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for TensorsApi::DownloadApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'DownloadApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = TensorsApi::DownloadApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of DownloadApi' do
|
|
30
|
+
it 'should create an instance of DownloadApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(TensorsApi::DownloadApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_download_status_api_download_status_download_id_get
|
|
36
|
+
# Get Download Status
|
|
37
|
+
# Get status of a download.
|
|
38
|
+
# @param download_id
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [Hash<String, Object>]
|
|
41
|
+
describe 'get_download_status_api_download_status_download_id_get 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_active_downloads_api_download_active_get
|
|
48
|
+
# List Active Downloads
|
|
49
|
+
# List all active/recent downloads.
|
|
50
|
+
# @param [Hash] opts the optional parameters
|
|
51
|
+
# @return [Hash<String, Object>]
|
|
52
|
+
describe 'list_active_downloads_api_download_active_get test' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# unit tests for start_download_api_download_post
|
|
59
|
+
# Start Download
|
|
60
|
+
# Start a model download (async with progress tracking).
|
|
61
|
+
# @param download_request
|
|
62
|
+
# @param [Hash] opts the optional parameters
|
|
63
|
+
# @return [Hash<String, Object>]
|
|
64
|
+
describe 'start_download_api_download_post test' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
end
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#tensors
|
|
3
|
+
|
|
4
|
+
#API for CivitAI model management and image gallery
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.18
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for TensorsApi::GalleryApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'GalleryApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = TensorsApi::GalleryApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of GalleryApi' do
|
|
30
|
+
it 'should create an instance of GalleryApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(TensorsApi::GalleryApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for delete_image_api_images_image_id_delete
|
|
36
|
+
# Delete Image
|
|
37
|
+
# Delete an image and its metadata.
|
|
38
|
+
# @param image_id
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [Hash<String, Object>]
|
|
41
|
+
describe 'delete_image_api_images_image_id_delete 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 edit_image_metadata_api_images_image_id_edit_post
|
|
48
|
+
# Edit Image Metadata
|
|
49
|
+
# Update metadata for an image.
|
|
50
|
+
# @param image_id
|
|
51
|
+
# @param metadata_update
|
|
52
|
+
# @param [Hash] opts the optional parameters
|
|
53
|
+
# @return [Hash<String, Object>]
|
|
54
|
+
describe 'edit_image_metadata_api_images_image_id_edit_post test' 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
|
+
# unit tests for gallery_stats_api_images_stats_summary_get
|
|
61
|
+
# Gallery Stats
|
|
62
|
+
# Get gallery statistics.
|
|
63
|
+
# @param [Hash] opts the optional parameters
|
|
64
|
+
# @return [Hash<String, Object>]
|
|
65
|
+
describe 'gallery_stats_api_images_stats_summary_get test' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# unit tests for get_image_api_images_image_id_get
|
|
72
|
+
# Get Image
|
|
73
|
+
# Get an image file by ID.
|
|
74
|
+
# @param image_id
|
|
75
|
+
# @param [Hash] opts the optional parameters
|
|
76
|
+
# @return [Object]
|
|
77
|
+
describe 'get_image_api_images_image_id_get test' do
|
|
78
|
+
it 'should work' do
|
|
79
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# unit tests for get_image_metadata_api_images_image_id_meta_get
|
|
84
|
+
# Get Image Metadata
|
|
85
|
+
# Get metadata for an image.
|
|
86
|
+
# @param image_id
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @return [Hash<String, Object>]
|
|
89
|
+
describe 'get_image_metadata_api_images_image_id_meta_get test' do
|
|
90
|
+
it 'should work' do
|
|
91
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# unit tests for list_images_api_images_get
|
|
96
|
+
# List Images
|
|
97
|
+
# List images in the gallery, paginated.
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @option opts [Integer] :limit Max images to return
|
|
100
|
+
# @option opts [Integer] :offset Offset for pagination
|
|
101
|
+
# @option opts [Boolean] :newest_first Sort newest first
|
|
102
|
+
# @return [Hash<String, Object>]
|
|
103
|
+
describe 'list_images_api_images_get test' do
|
|
104
|
+
it 'should work' do
|
|
105
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#tensors
|
|
3
|
+
|
|
4
|
+
#API for CivitAI model management and image gallery
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.18
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for TensorsApi::SearchApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'SearchApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = TensorsApi::SearchApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of SearchApi' do
|
|
30
|
+
it 'should create an instance of SearchApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(TensorsApi::SearchApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for search_models_api_search_get
|
|
36
|
+
# Search Models
|
|
37
|
+
# Search models across CivitAI and/or Hugging Face. Returns results from selected provider(s). When provider=all, returns results from both CivitAI and Hugging Face in separate keys.
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :query Search query
|
|
40
|
+
# @option opts [Provider] :provider Search provider (civitai, hf, or all)
|
|
41
|
+
# @option opts [String] :types Model type - CivitAI (Checkpoint, LORA, etc.)
|
|
42
|
+
# @option opts [String] :base_models Base model - CivitAI
|
|
43
|
+
# @option opts [String] :period Time period - CivitAI (AllTime, Year, Month, Week, Day)
|
|
44
|
+
# @option opts [String] :nsfw NSFW level - CivitAI (None, Soft, Mature, X)
|
|
45
|
+
# @option opts [Boolean] :sfw Exclude NSFW - CivitAI
|
|
46
|
+
# @option opts [String] :commercial Commercial use - CivitAI (None, Image, Rent, Sell)
|
|
47
|
+
# @option opts [Integer] :page Page number - CivitAI
|
|
48
|
+
# @option opts [String] :pipeline Pipeline tag - HuggingFace (text-to-image, etc.)
|
|
49
|
+
# @option opts [SortOrder] :sort Sort order
|
|
50
|
+
# @option opts [Integer] :limit Max results per provider
|
|
51
|
+
# @option opts [String] :tag Filter by tag
|
|
52
|
+
# @option opts [String] :author Filter by author/creator
|
|
53
|
+
# @return [Hash<String, Object>]
|
|
54
|
+
describe 'search_models_api_search_get test' 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
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#tensors
|
|
3
|
+
|
|
4
|
+
#API for CivitAI model management and image gallery
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.18
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for TensorsApi::CacheRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe TensorsApi::CacheRequest do
|
|
21
|
+
#let(:instance) { TensorsApi::CacheRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CacheRequest' do
|
|
24
|
+
it 'should create an instance of CacheRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(TensorsApi::CacheRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "model_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
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#tensors
|
|
3
|
+
|
|
4
|
+
#API for CivitAI model management and image gallery
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.18
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for TensorsApi::DownloadRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe TensorsApi::DownloadRequest do
|
|
21
|
+
#let(:instance) { TensorsApi::DownloadRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of DownloadRequest' do
|
|
24
|
+
it 'should create an instance of DownloadRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(TensorsApi::DownloadRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "version_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 "model_id"' 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 "hash"' 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 "output_dir"' 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
|
+
end
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#tensors
|
|
3
|
+
|
|
4
|
+
#API for CivitAI model management and image gallery
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.18
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for TensorsApi::GenerateRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe TensorsApi::GenerateRequest do
|
|
21
|
+
#let(:instance) { TensorsApi::GenerateRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of GenerateRequest' do
|
|
24
|
+
it 'should create an instance of GenerateRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(TensorsApi::GenerateRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "prompt"' 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 "negative_prompt"' 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 "model"' 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 "width"' 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 "height"' 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 "steps"' 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 "cfg"' 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
|
+
describe 'test attribute "seed"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
describe 'test attribute "sampler"' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
describe 'test attribute "scheduler"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
describe 'test attribute "vae"' do
|
|
91
|
+
it 'should work' do
|
|
92
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
describe 'test attribute "lora_name"' do
|
|
97
|
+
it 'should work' do
|
|
98
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
describe 'test attribute "lora_strength"' do
|
|
103
|
+
it 'should work' do
|
|
104
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#tensors
|
|
3
|
+
|
|
4
|
+
#API for CivitAI model management and image gallery
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.18
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for TensorsApi::GenerateResponse
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe TensorsApi::GenerateResponse do
|
|
21
|
+
#let(:instance) { TensorsApi::GenerateResponse.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of GenerateResponse' do
|
|
24
|
+
it 'should create an instance of GenerateResponse' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(TensorsApi::GenerateResponse)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "success"' 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 "prompt_id"' 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 "images"' 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 "errors"' 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
|
+
end
|