venice_client 1.0.5 → 1.0.7
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/.gitignore +2 -0
- data/.openapi-generator/FILES +18 -147
- data/Gemfile.lock +94 -0
- data/README.md +10 -11
- data/docs/APIKeysApi.md +70 -0
- data/docs/AssistantMessage.md +1 -1
- data/docs/BillingUsageResponse.md +2 -0
- data/docs/CharactersApi.md +70 -0
- data/docs/ChatCompletionRequestVeniceParameters.md +7 -5
- data/docs/CreateChatCompletion200ResponseVeniceParameters.md +2 -0
- data/docs/DetailedError.md +20 -0
- data/docs/EditImageRequest.md +1 -1
- data/docs/EditImageRequestImage.md +15 -0
- data/docs/GenerateImageRequest.md +3 -1
- data/docs/GetApiKeyById200Response.md +18 -0
- data/docs/GetApiKeyById200ResponseData.md +34 -0
- data/docs/GetApiKeyRateLimits200Response.md +2 -0
- data/docs/GetBillingUsage200Response.md +2 -0
- data/docs/GetCharacterBySlug200Response.md +20 -0
- data/docs/ImageApi.md +1 -1
- data/docs/ListCharacters200ResponseDataInner.md +5 -1
- data/docs/PreviewApi.md +70 -0
- data/docs/StandardError.md +18 -0
- data/docs/ToolCallFunction.md +3 -1
- data/lib/venice_client/api/api_keys_api.rb +64 -1
- data/lib/venice_client/api/audio_api.rb +1 -1
- data/lib/venice_client/api/billing_api.rb +1 -1
- data/lib/venice_client/api/characters_api.rb +64 -1
- data/lib/venice_client/api/chat_api.rb +1 -1
- data/lib/venice_client/api/embeddings_api.rb +1 -1
- data/lib/venice_client/api/image_api.rb +1 -1
- data/lib/venice_client/api/models_api.rb +1 -1
- data/lib/venice_client/api/preview_api.rb +64 -1
- data/lib/venice_client/api/speech_api.rb +1 -1
- data/lib/venice_client/api_client.rb +1 -1
- data/lib/venice_client/api_error.rb +1 -1
- data/lib/venice_client/configuration.rb +1 -1
- data/lib/venice_client/models/assistant_message.rb +3 -4
- data/lib/venice_client/models/assistant_message_content.rb +1 -1
- data/lib/venice_client/models/audio_model_pricing.rb +1 -1
- data/lib/venice_client/models/audio_model_pricing_input.rb +1 -1
- data/lib/venice_client/models/billing_usage_request.rb +1 -1
- data/lib/venice_client/models/billing_usage_response.rb +12 -2
- data/lib/venice_client/models/chat_completion_request.rb +1 -1
- data/lib/venice_client/models/chat_completion_request_messages_inner.rb +1 -1
- data/lib/venice_client/models/chat_completion_request_response_format.rb +1 -1
- data/lib/venice_client/models/chat_completion_request_stop.rb +1 -1
- data/lib/venice_client/models/chat_completion_request_stream_options.rb +1 -1
- data/lib/venice_client/models/chat_completion_request_tool_choice.rb +1 -1
- data/lib/venice_client/models/chat_completion_request_tool_choice_any_of.rb +1 -1
- data/lib/venice_client/models/chat_completion_request_tool_choice_any_of_function.rb +1 -1
- data/lib/venice_client/models/chat_completion_request_venice_parameters.rb +34 -21
- data/lib/venice_client/models/create_api_key200_response.rb +1 -1
- data/lib/venice_client/models/create_api_key200_response_data.rb +1 -1
- data/lib/venice_client/models/create_api_key_request.rb +2 -2
- data/lib/venice_client/models/create_api_key_request_expires_at.rb +1 -1
- data/lib/venice_client/models/create_chat_completion200_response.rb +1 -1
- data/lib/venice_client/models/create_chat_completion200_response_choices_inner.rb +1 -1
- data/lib/venice_client/models/create_chat_completion200_response_choices_inner_logprobs.rb +1 -1
- data/lib/venice_client/models/create_chat_completion200_response_choices_inner_logprobs_top_logprobs_inner.rb +1 -1
- data/lib/venice_client/models/create_chat_completion200_response_choices_inner_message.rb +1 -1
- data/lib/venice_client/models/create_chat_completion200_response_usage.rb +1 -1
- data/lib/venice_client/models/create_chat_completion200_response_venice_parameters.rb +54 -24
- data/lib/venice_client/models/create_chat_completion200_response_venice_parameters_web_search_citations_inner.rb +1 -1
- data/lib/venice_client/models/create_embedding200_response.rb +1 -1
- data/lib/venice_client/models/create_embedding200_response_data_inner.rb +1 -1
- data/lib/venice_client/models/create_embedding200_response_usage.rb +1 -1
- data/lib/venice_client/models/create_embedding_request_schema.rb +1 -1
- data/lib/venice_client/models/create_embedding_request_schema_input.rb +1 -1
- data/lib/venice_client/models/create_embedding_request_schema_model.rb +1 -1
- data/lib/venice_client/models/create_speech_request_schema.rb +1 -1
- data/lib/venice_client/models/delete_api_key200_response.rb +1 -1
- data/lib/venice_client/models/detailed_error.rb +248 -0
- data/lib/venice_client/models/edit_image_request.rb +2 -2
- data/lib/venice_client/models/edit_image_request_image.rb +104 -0
- data/lib/venice_client/models/generate_image200_response.rb +1 -1
- data/lib/venice_client/models/generate_image200_response_timing.rb +1 -1
- data/lib/venice_client/models/generate_image_request.rb +41 -3
- data/lib/venice_client/models/get_api_key_by_id200_response.rb +237 -0
- data/lib/venice_client/models/get_api_key_by_id200_response_data.rb +401 -0
- data/lib/venice_client/models/get_api_key_generate_web3_key200_response.rb +1 -1
- data/lib/venice_client/models/get_api_key_generate_web3_key200_response_data.rb +1 -1
- data/lib/venice_client/models/get_api_key_rate_limit_logs200_response.rb +1 -1
- data/lib/venice_client/models/get_api_key_rate_limit_logs200_response_data_inner.rb +1 -1
- data/lib/venice_client/models/get_api_key_rate_limits200_response.rb +12 -2
- data/lib/venice_client/models/get_api_key_rate_limits200_response_data.rb +1 -1
- data/lib/venice_client/models/get_api_key_rate_limits200_response_data_api_tier.rb +1 -1
- data/lib/venice_client/models/get_api_key_rate_limits200_response_data_balances.rb +1 -1
- data/lib/venice_client/models/get_api_key_rate_limits200_response_data_rate_limits_inner.rb +1 -1
- data/lib/venice_client/models/get_api_key_rate_limits200_response_data_rate_limits_inner_rate_limits_inner.rb +1 -1
- data/lib/venice_client/models/get_api_keys200_response.rb +1 -1
- data/lib/venice_client/models/get_api_keys200_response_data_inner.rb +1 -1
- data/lib/venice_client/models/get_api_keys200_response_data_inner_consumption_limits.rb +1 -1
- data/lib/venice_client/models/get_api_keys200_response_data_inner_usage.rb +1 -1
- data/lib/venice_client/models/get_api_keys200_response_data_inner_usage_trailing_seven_days.rb +1 -1
- data/lib/venice_client/models/get_billing_usage200_response.rb +12 -2
- data/lib/venice_client/models/get_billing_usage200_response_data_inner.rb +1 -1
- data/lib/venice_client/models/get_billing_usage200_response_data_inner_inference_details.rb +1 -1
- data/lib/venice_client/models/get_billing_usage200_response_pagination.rb +1 -1
- data/lib/venice_client/models/get_character_by_slug200_response.rb +287 -0
- data/lib/venice_client/models/image_model_constraints.rb +1 -1
- data/lib/venice_client/models/image_model_constraints_steps.rb +1 -1
- data/lib/venice_client/models/image_model_pricing.rb +1 -1
- data/lib/venice_client/models/image_model_pricing_generation.rb +1 -1
- data/lib/venice_client/models/image_model_pricing_upscale.rb +1 -1
- data/lib/venice_client/models/image_model_pricing_upscale2x.rb +1 -1
- data/lib/venice_client/models/image_model_pricing_upscale4x.rb +1 -1
- data/lib/venice_client/models/image_styles_get200_response.rb +1 -1
- data/lib/venice_client/models/image_url.rb +1 -1
- data/lib/venice_client/models/image_url_object.rb +1 -1
- data/lib/venice_client/models/json_object.rb +1 -1
- data/lib/venice_client/models/json_schema.rb +1 -1
- data/lib/venice_client/models/list_characters200_response.rb +1 -1
- data/lib/venice_client/models/list_characters200_response_data_inner.rb +45 -5
- data/lib/venice_client/models/list_characters200_response_data_inner_stats.rb +1 -1
- data/lib/venice_client/models/list_model_compatibility_mapping200_response.rb +1 -1
- data/lib/venice_client/models/list_model_traits200_response.rb +1 -1
- data/lib/venice_client/models/list_models200_response.rb +1 -1
- data/lib/venice_client/models/list_models200_response_type.rb +1 -1
- data/lib/venice_client/models/list_models_type_parameter.rb +1 -1
- data/lib/venice_client/models/llm_model_pricing.rb +1 -1
- data/lib/venice_client/models/llm_model_pricing_input.rb +1 -1
- data/lib/venice_client/models/llm_model_pricing_output.rb +1 -1
- data/lib/venice_client/models/model_response.rb +1 -1
- data/lib/venice_client/models/model_response_model_spec.rb +1 -1
- data/lib/venice_client/models/model_response_model_spec_capabilities.rb +3 -3
- data/lib/venice_client/models/model_response_model_spec_constraints.rb +1 -1
- data/lib/venice_client/models/model_response_model_spec_pricing.rb +1 -1
- data/lib/venice_client/models/objects_inner.rb +1 -1
- data/lib/venice_client/models/post_api_key_generate_web3_key_request.rb +1 -1
- data/lib/venice_client/models/simple_generate_image200_response.rb +1 -1
- data/lib/venice_client/models/simple_generate_image200_response_data_inner.rb +1 -1
- data/lib/venice_client/models/simple_generate_image200_response_data_inner_any_of.rb +1 -1
- data/lib/venice_client/models/simple_generate_image200_response_data_inner_any_of1.rb +1 -1
- data/lib/venice_client/models/simple_generate_image_request.rb +1 -1
- data/lib/venice_client/models/standard_error.rb +238 -0
- data/lib/venice_client/models/system_message.rb +1 -1
- data/lib/venice_client/models/system_message_content.rb +1 -1
- data/lib/venice_client/models/text.rb +1 -1
- data/lib/venice_client/models/text_model_constraints.rb +1 -1
- data/lib/venice_client/models/text_model_constraints_temperature.rb +1 -1
- data/lib/venice_client/models/text_model_constraints_top_p.rb +1 -1
- data/lib/venice_client/models/tool_call.rb +1 -1
- data/lib/venice_client/models/tool_call_function.rb +17 -5
- data/lib/venice_client/models/tool_message.rb +2 -1
- data/lib/venice_client/models/upscale_image_request.rb +1 -1
- data/lib/venice_client/models/upscale_image_request_enhance.rb +1 -1
- data/lib/venice_client/models/user_message.rb +1 -1
- data/lib/venice_client/models/user_message_content.rb +1 -1
- data/lib/venice_client/version.rb +2 -2
- data/lib/venice_client.rb +7 -11
- data/package-lock.json +2159 -0
- data/package.json +5 -0
- data/spec/models/detailed_error_spec.rb +42 -0
- data/spec/models/edit_image_request_image_spec.rb +21 -0
- data/spec/models/get_api_key_by_id200_response_data_spec.rb +88 -0
- data/spec/models/get_api_key_by_id200_response_spec.rb +36 -0
- data/spec/models/get_character_by_slug200_response_spec.rb +46 -0
- data/spec/models/standard_error_spec.rb +36 -0
- data/spec/spec_helper.rb +1 -1
- data/swagger.yaml +513 -714
- metadata +28 -1
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Venice.ai API
|
|
3
|
+
|
|
4
|
+
#The Venice.ai API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 20250918.173746
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module VeniceClient
|
|
17
|
+
# API key details
|
|
18
|
+
class GetApiKeyById200ResponseData
|
|
19
|
+
# API Key type
|
|
20
|
+
attr_accessor :api_key_type
|
|
21
|
+
|
|
22
|
+
attr_accessor :consumption_limits
|
|
23
|
+
|
|
24
|
+
# API Key creation date
|
|
25
|
+
attr_accessor :created_at
|
|
26
|
+
|
|
27
|
+
# API Key description
|
|
28
|
+
attr_accessor :description
|
|
29
|
+
|
|
30
|
+
# API Key expiration date
|
|
31
|
+
attr_accessor :expires_at
|
|
32
|
+
|
|
33
|
+
# API Key ID
|
|
34
|
+
attr_accessor :id
|
|
35
|
+
|
|
36
|
+
# Last 6 characters of the API Key
|
|
37
|
+
attr_accessor :last6_chars
|
|
38
|
+
|
|
39
|
+
# API Key last used date
|
|
40
|
+
attr_accessor :last_used_at
|
|
41
|
+
|
|
42
|
+
attr_accessor :usage
|
|
43
|
+
|
|
44
|
+
class EnumAttributeValidator
|
|
45
|
+
attr_reader :datatype
|
|
46
|
+
attr_reader :allowable_values
|
|
47
|
+
|
|
48
|
+
def initialize(datatype, allowable_values)
|
|
49
|
+
@allowable_values = allowable_values.map do |value|
|
|
50
|
+
case datatype.to_s
|
|
51
|
+
when /Integer/i
|
|
52
|
+
value.to_i
|
|
53
|
+
when /Float/i
|
|
54
|
+
value.to_f
|
|
55
|
+
else
|
|
56
|
+
value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def valid?(value)
|
|
62
|
+
!value || allowable_values.include?(value)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
67
|
+
def self.attribute_map
|
|
68
|
+
{
|
|
69
|
+
:'api_key_type' => :'apiKeyType',
|
|
70
|
+
:'consumption_limits' => :'consumptionLimits',
|
|
71
|
+
:'created_at' => :'createdAt',
|
|
72
|
+
:'description' => :'description',
|
|
73
|
+
:'expires_at' => :'expiresAt',
|
|
74
|
+
:'id' => :'id',
|
|
75
|
+
:'last6_chars' => :'last6Chars',
|
|
76
|
+
:'last_used_at' => :'lastUsedAt',
|
|
77
|
+
:'usage' => :'usage'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Returns attribute mapping this model knows about
|
|
82
|
+
def self.acceptable_attribute_map
|
|
83
|
+
attribute_map
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Returns all the JSON keys this model knows about
|
|
87
|
+
def self.acceptable_attributes
|
|
88
|
+
acceptable_attribute_map.values
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Attribute type mapping.
|
|
92
|
+
def self.openapi_types
|
|
93
|
+
{
|
|
94
|
+
:'api_key_type' => :'String',
|
|
95
|
+
:'consumption_limits' => :'GetApiKeys200ResponseDataInnerConsumptionLimits',
|
|
96
|
+
:'created_at' => :'String',
|
|
97
|
+
:'description' => :'String',
|
|
98
|
+
:'expires_at' => :'String',
|
|
99
|
+
:'id' => :'String',
|
|
100
|
+
:'last6_chars' => :'String',
|
|
101
|
+
:'last_used_at' => :'String',
|
|
102
|
+
:'usage' => :'GetApiKeys200ResponseDataInnerUsage'
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# List of attributes with nullable: true
|
|
107
|
+
def self.openapi_nullable
|
|
108
|
+
Set.new([
|
|
109
|
+
:'created_at',
|
|
110
|
+
:'expires_at',
|
|
111
|
+
:'last_used_at',
|
|
112
|
+
])
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Initializes the object
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
def initialize(attributes = {})
|
|
118
|
+
if (!attributes.is_a?(Hash))
|
|
119
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::GetApiKeyById200ResponseData` initialize method"
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
123
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
124
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
125
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
126
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::GetApiKeyById200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
127
|
+
end
|
|
128
|
+
h[k.to_sym] = v
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'api_key_type')
|
|
132
|
+
self.api_key_type = attributes[:'api_key_type']
|
|
133
|
+
else
|
|
134
|
+
self.api_key_type = nil
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'consumption_limits')
|
|
138
|
+
self.consumption_limits = attributes[:'consumption_limits']
|
|
139
|
+
else
|
|
140
|
+
self.consumption_limits = nil
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'created_at')
|
|
144
|
+
self.created_at = attributes[:'created_at']
|
|
145
|
+
else
|
|
146
|
+
self.created_at = nil
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'description')
|
|
150
|
+
self.description = attributes[:'description']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'expires_at')
|
|
154
|
+
self.expires_at = attributes[:'expires_at']
|
|
155
|
+
else
|
|
156
|
+
self.expires_at = nil
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'id')
|
|
160
|
+
self.id = attributes[:'id']
|
|
161
|
+
else
|
|
162
|
+
self.id = nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'last6_chars')
|
|
166
|
+
self.last6_chars = attributes[:'last6_chars']
|
|
167
|
+
else
|
|
168
|
+
self.last6_chars = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'last_used_at')
|
|
172
|
+
self.last_used_at = attributes[:'last_used_at']
|
|
173
|
+
else
|
|
174
|
+
self.last_used_at = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'usage')
|
|
178
|
+
self.usage = attributes[:'usage']
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
183
|
+
# @return Array for valid properties with the reasons
|
|
184
|
+
def list_invalid_properties
|
|
185
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
186
|
+
invalid_properties = Array.new
|
|
187
|
+
if @api_key_type.nil?
|
|
188
|
+
invalid_properties.push('invalid value for "api_key_type", api_key_type cannot be nil.')
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if @consumption_limits.nil?
|
|
192
|
+
invalid_properties.push('invalid value for "consumption_limits", consumption_limits cannot be nil.')
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if @id.nil?
|
|
196
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if @last6_chars.nil?
|
|
200
|
+
invalid_properties.push('invalid value for "last6_chars", last6_chars cannot be nil.')
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
invalid_properties
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Check to see if the all the properties in the model are valid
|
|
207
|
+
# @return true if the model is valid
|
|
208
|
+
def valid?
|
|
209
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
210
|
+
return false if @api_key_type.nil?
|
|
211
|
+
api_key_type_validator = EnumAttributeValidator.new('String', ["INFERENCE", "ADMIN"])
|
|
212
|
+
return false unless api_key_type_validator.valid?(@api_key_type)
|
|
213
|
+
return false if @consumption_limits.nil?
|
|
214
|
+
return false if @id.nil?
|
|
215
|
+
return false if @last6_chars.nil?
|
|
216
|
+
true
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
220
|
+
# @param [Object] api_key_type Object to be assigned
|
|
221
|
+
def api_key_type=(api_key_type)
|
|
222
|
+
validator = EnumAttributeValidator.new('String', ["INFERENCE", "ADMIN"])
|
|
223
|
+
unless validator.valid?(api_key_type)
|
|
224
|
+
fail ArgumentError, "invalid value for \"api_key_type\", must be one of #{validator.allowable_values}."
|
|
225
|
+
end
|
|
226
|
+
@api_key_type = api_key_type
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Custom attribute writer method with validation
|
|
230
|
+
# @param [Object] consumption_limits Value to be assigned
|
|
231
|
+
def consumption_limits=(consumption_limits)
|
|
232
|
+
if consumption_limits.nil?
|
|
233
|
+
fail ArgumentError, 'consumption_limits cannot be nil'
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
@consumption_limits = consumption_limits
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Custom attribute writer method with validation
|
|
240
|
+
# @param [Object] id Value to be assigned
|
|
241
|
+
def id=(id)
|
|
242
|
+
if id.nil?
|
|
243
|
+
fail ArgumentError, 'id cannot be nil'
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
@id = id
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Custom attribute writer method with validation
|
|
250
|
+
# @param [Object] last6_chars Value to be assigned
|
|
251
|
+
def last6_chars=(last6_chars)
|
|
252
|
+
if last6_chars.nil?
|
|
253
|
+
fail ArgumentError, 'last6_chars cannot be nil'
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
@last6_chars = last6_chars
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Checks equality by comparing each attribute.
|
|
260
|
+
# @param [Object] Object to be compared
|
|
261
|
+
def ==(o)
|
|
262
|
+
return true if self.equal?(o)
|
|
263
|
+
self.class == o.class &&
|
|
264
|
+
api_key_type == o.api_key_type &&
|
|
265
|
+
consumption_limits == o.consumption_limits &&
|
|
266
|
+
created_at == o.created_at &&
|
|
267
|
+
description == o.description &&
|
|
268
|
+
expires_at == o.expires_at &&
|
|
269
|
+
id == o.id &&
|
|
270
|
+
last6_chars == o.last6_chars &&
|
|
271
|
+
last_used_at == o.last_used_at &&
|
|
272
|
+
usage == o.usage
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# @see the `==` method
|
|
276
|
+
# @param [Object] Object to be compared
|
|
277
|
+
def eql?(o)
|
|
278
|
+
self == o
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Calculates hash code according to all attributes.
|
|
282
|
+
# @return [Integer] Hash code
|
|
283
|
+
def hash
|
|
284
|
+
[api_key_type, consumption_limits, created_at, description, expires_at, id, last6_chars, last_used_at, usage].hash
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Builds the object from hash
|
|
288
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
289
|
+
# @return [Object] Returns the model itself
|
|
290
|
+
def self.build_from_hash(attributes)
|
|
291
|
+
return nil unless attributes.is_a?(Hash)
|
|
292
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
293
|
+
transformed_hash = {}
|
|
294
|
+
openapi_types.each_pair do |key, type|
|
|
295
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
296
|
+
transformed_hash["#{key}"] = nil
|
|
297
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
298
|
+
# check to ensure the input is an array given that the attribute
|
|
299
|
+
# is documented as an array but the input is not
|
|
300
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
301
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
302
|
+
end
|
|
303
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
304
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
new(transformed_hash)
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Deserializes the data based on type
|
|
311
|
+
# @param string type Data type
|
|
312
|
+
# @param string value Value to be deserialized
|
|
313
|
+
# @return [Object] Deserialized data
|
|
314
|
+
def self._deserialize(type, value)
|
|
315
|
+
case type.to_sym
|
|
316
|
+
when :Time
|
|
317
|
+
Time.parse(value)
|
|
318
|
+
when :Date
|
|
319
|
+
Date.parse(value)
|
|
320
|
+
when :String
|
|
321
|
+
value.to_s
|
|
322
|
+
when :Integer
|
|
323
|
+
value.to_i
|
|
324
|
+
when :Float
|
|
325
|
+
value.to_f
|
|
326
|
+
when :Boolean
|
|
327
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
328
|
+
true
|
|
329
|
+
else
|
|
330
|
+
false
|
|
331
|
+
end
|
|
332
|
+
when :Object
|
|
333
|
+
# generic object (usually a Hash), return directly
|
|
334
|
+
value
|
|
335
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
336
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
337
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
338
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
339
|
+
k_type = Regexp.last_match[:k_type]
|
|
340
|
+
v_type = Regexp.last_match[:v_type]
|
|
341
|
+
{}.tap do |hash|
|
|
342
|
+
value.each do |k, v|
|
|
343
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
344
|
+
end
|
|
345
|
+
end
|
|
346
|
+
else # model
|
|
347
|
+
# models (e.g. Pet) or oneOf
|
|
348
|
+
klass = VeniceClient.const_get(type)
|
|
349
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Returns the string representation of the object
|
|
354
|
+
# @return [String] String presentation of the object
|
|
355
|
+
def to_s
|
|
356
|
+
to_hash.to_s
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
360
|
+
# @return [Hash] Returns the object in the form of hash
|
|
361
|
+
def to_body
|
|
362
|
+
to_hash
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Returns the object in the form of hash
|
|
366
|
+
# @return [Hash] Returns the object in the form of hash
|
|
367
|
+
def to_hash
|
|
368
|
+
hash = {}
|
|
369
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
370
|
+
value = self.send(attr)
|
|
371
|
+
if value.nil?
|
|
372
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
373
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
hash[param] = _to_hash(value)
|
|
377
|
+
end
|
|
378
|
+
hash
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# Outputs non-array value in the form of hash
|
|
382
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
383
|
+
# @param [Object] value Any valid value
|
|
384
|
+
# @return [Hash] Returns the value in the form of hash
|
|
385
|
+
def _to_hash(value)
|
|
386
|
+
if value.is_a?(Array)
|
|
387
|
+
value.compact.map { |v| _to_hash(v) }
|
|
388
|
+
elsif value.is_a?(Hash)
|
|
389
|
+
{}.tap do |hash|
|
|
390
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
391
|
+
end
|
|
392
|
+
elsif value.respond_to? :to_hash
|
|
393
|
+
value.to_hash
|
|
394
|
+
else
|
|
395
|
+
value
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The Venice.ai API.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 20250918.173746
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.14.0
|
|
@@ -15,11 +15,15 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module VeniceClient
|
|
17
17
|
class GetApiKeyRateLimits200Response
|
|
18
|
+
# A warning message to disambiguate staked DIEM balance from legacy DIEM (formerly VCU) balance
|
|
19
|
+
attr_accessor :warning_message
|
|
20
|
+
|
|
18
21
|
attr_accessor :data
|
|
19
22
|
|
|
20
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
24
|
def self.attribute_map
|
|
22
25
|
{
|
|
26
|
+
:'warning_message' => :'warningMessage',
|
|
23
27
|
:'data' => :'data'
|
|
24
28
|
}
|
|
25
29
|
end
|
|
@@ -37,6 +41,7 @@ module VeniceClient
|
|
|
37
41
|
# Attribute type mapping.
|
|
38
42
|
def self.openapi_types
|
|
39
43
|
{
|
|
44
|
+
:'warning_message' => :'String',
|
|
40
45
|
:'data' => :'GetApiKeyRateLimits200ResponseData'
|
|
41
46
|
}
|
|
42
47
|
end
|
|
@@ -63,6 +68,10 @@ module VeniceClient
|
|
|
63
68
|
h[k.to_sym] = v
|
|
64
69
|
}
|
|
65
70
|
|
|
71
|
+
if attributes.key?(:'warning_message')
|
|
72
|
+
self.warning_message = attributes[:'warning_message']
|
|
73
|
+
end
|
|
74
|
+
|
|
66
75
|
if attributes.key?(:'data')
|
|
67
76
|
self.data = attributes[:'data']
|
|
68
77
|
else
|
|
@@ -105,6 +114,7 @@ module VeniceClient
|
|
|
105
114
|
def ==(o)
|
|
106
115
|
return true if self.equal?(o)
|
|
107
116
|
self.class == o.class &&
|
|
117
|
+
warning_message == o.warning_message &&
|
|
108
118
|
data == o.data
|
|
109
119
|
end
|
|
110
120
|
|
|
@@ -117,7 +127,7 @@ module VeniceClient
|
|
|
117
127
|
# Calculates hash code according to all attributes.
|
|
118
128
|
# @return [Integer] Hash code
|
|
119
129
|
def hash
|
|
120
|
-
[data].hash
|
|
130
|
+
[warning_message, data].hash
|
|
121
131
|
end
|
|
122
132
|
|
|
123
133
|
# Builds the object from hash
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The Venice.ai API.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 20250918.173746
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.14.0
|
|
@@ -16,6 +16,9 @@ require 'time'
|
|
|
16
16
|
module VeniceClient
|
|
17
17
|
# The response schema for the billing usage endpoint
|
|
18
18
|
class GetBillingUsage200Response
|
|
19
|
+
# A warning message to disambiguate DIEM usage from legacy DIEM (formerly VCU) usage
|
|
20
|
+
attr_accessor :warning_message
|
|
21
|
+
|
|
19
22
|
attr_accessor :data
|
|
20
23
|
|
|
21
24
|
attr_accessor :pagination
|
|
@@ -23,6 +26,7 @@ module VeniceClient
|
|
|
23
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
27
|
def self.attribute_map
|
|
25
28
|
{
|
|
29
|
+
:'warning_message' => :'warningMessage',
|
|
26
30
|
:'data' => :'data',
|
|
27
31
|
:'pagination' => :'pagination'
|
|
28
32
|
}
|
|
@@ -41,6 +45,7 @@ module VeniceClient
|
|
|
41
45
|
# Attribute type mapping.
|
|
42
46
|
def self.openapi_types
|
|
43
47
|
{
|
|
48
|
+
:'warning_message' => :'String',
|
|
44
49
|
:'data' => :'Array<GetBillingUsage200ResponseDataInner>',
|
|
45
50
|
:'pagination' => :'GetBillingUsage200ResponsePagination'
|
|
46
51
|
}
|
|
@@ -68,6 +73,10 @@ module VeniceClient
|
|
|
68
73
|
h[k.to_sym] = v
|
|
69
74
|
}
|
|
70
75
|
|
|
76
|
+
if attributes.key?(:'warning_message')
|
|
77
|
+
self.warning_message = attributes[:'warning_message']
|
|
78
|
+
end
|
|
79
|
+
|
|
71
80
|
if attributes.key?(:'data')
|
|
72
81
|
if (value = attributes[:'data']).is_a?(Array)
|
|
73
82
|
self.data = value
|
|
@@ -133,6 +142,7 @@ module VeniceClient
|
|
|
133
142
|
def ==(o)
|
|
134
143
|
return true if self.equal?(o)
|
|
135
144
|
self.class == o.class &&
|
|
145
|
+
warning_message == o.warning_message &&
|
|
136
146
|
data == o.data &&
|
|
137
147
|
pagination == o.pagination
|
|
138
148
|
end
|
|
@@ -146,7 +156,7 @@ module VeniceClient
|
|
|
146
156
|
# Calculates hash code according to all attributes.
|
|
147
157
|
# @return [Integer] Hash code
|
|
148
158
|
def hash
|
|
149
|
-
[data, pagination].hash
|
|
159
|
+
[warning_message, data, pagination].hash
|
|
150
160
|
end
|
|
151
161
|
|
|
152
162
|
# Builds the object from hash
|