venice_client 1.0.23 → 1.0.25

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 (175) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -1
  3. data/docs/AssistantMessage.md +2 -0
  4. data/docs/AssistantMessageReasoningDetailsInner.md +28 -0
  5. data/docs/ChatApi.md +1 -1
  6. data/docs/ChatCompletionContentPartInputAudio.md +22 -0
  7. data/docs/ChatCompletionContentPartVideoUrl.md +22 -0
  8. data/docs/ChatCompletionRequestMessagesInner.md +4 -2
  9. data/docs/CreateChatCompletion200Response.md +1 -1
  10. data/docs/CreateChatCompletion200ResponseChoicesInnerMessage.md +2 -0
  11. data/docs/GenerateImageRequest.md +2 -2
  12. data/docs/InputAudio.md +22 -0
  13. data/docs/InputAudioObject.md +20 -0
  14. data/docs/ObjectsInner.md +5 -1
  15. data/docs/UserMessage.md +2 -0
  16. data/docs/VideoURLObject.md +18 -0
  17. data/docs/VideoUrl.md +22 -0
  18. data/lib/venice_client/api/api_keys_api.rb +1 -1
  19. data/lib/venice_client/api/audio_api.rb +1 -1
  20. data/lib/venice_client/api/billing_api.rb +1 -1
  21. data/lib/venice_client/api/characters_api.rb +1 -1
  22. data/lib/venice_client/api/chat_api.rb +3 -3
  23. data/lib/venice_client/api/embeddings_api.rb +1 -1
  24. data/lib/venice_client/api/image_api.rb +1 -1
  25. data/lib/venice_client/api/models_api.rb +1 -1
  26. data/lib/venice_client/api/preview_api.rb +1 -1
  27. data/lib/venice_client/api/speech_api.rb +1 -1
  28. data/lib/venice_client/api/video_api.rb +1 -1
  29. data/lib/venice_client/api_client.rb +1 -1
  30. data/lib/venice_client/api_error.rb +1 -1
  31. data/lib/venice_client/configuration.rb +1 -1
  32. data/lib/venice_client/models/assistant_message.rb +15 -2
  33. data/lib/venice_client/models/assistant_message_content.rb +1 -1
  34. data/lib/venice_client/models/assistant_message_reasoning_details_inner.rb +282 -0
  35. data/lib/venice_client/models/audio_model_pricing.rb +1 -1
  36. data/lib/venice_client/models/audio_model_pricing_input.rb +1 -1
  37. data/lib/venice_client/models/billing_usage_request.rb +1 -1
  38. data/lib/venice_client/models/billing_usage_response.rb +1 -1
  39. data/lib/venice_client/models/cache_control.rb +1 -1
  40. data/lib/venice_client/models/chat_completion_content_part_input_audio.rb +297 -0
  41. data/lib/venice_client/models/chat_completion_content_part_video_url.rb +297 -0
  42. data/lib/venice_client/models/chat_completion_request.rb +1 -1
  43. data/lib/venice_client/models/chat_completion_request_messages_inner.rb +1 -1
  44. data/lib/venice_client/models/chat_completion_request_reasoning.rb +1 -1
  45. data/lib/venice_client/models/chat_completion_request_response_format.rb +1 -1
  46. data/lib/venice_client/models/chat_completion_request_stop.rb +1 -1
  47. data/lib/venice_client/models/chat_completion_request_stream_options.rb +1 -1
  48. data/lib/venice_client/models/chat_completion_request_tool_choice.rb +1 -1
  49. data/lib/venice_client/models/chat_completion_request_tool_choice_any_of.rb +1 -1
  50. data/lib/venice_client/models/chat_completion_request_tool_choice_any_of_function.rb +1 -1
  51. data/lib/venice_client/models/chat_completion_request_venice_parameters.rb +1 -1
  52. data/lib/venice_client/models/complete_video200_response.rb +1 -1
  53. data/lib/venice_client/models/complete_video_request.rb +1 -1
  54. data/lib/venice_client/models/create_api_key200_response.rb +1 -1
  55. data/lib/venice_client/models/create_api_key200_response_data.rb +1 -1
  56. data/lib/venice_client/models/create_api_key_request.rb +1 -1
  57. data/lib/venice_client/models/create_api_key_request_expires_at.rb +1 -1
  58. data/lib/venice_client/models/create_chat_completion200_response.rb +2 -19
  59. data/lib/venice_client/models/create_chat_completion200_response_choices_inner.rb +1 -1
  60. data/lib/venice_client/models/create_chat_completion200_response_choices_inner_logprobs.rb +1 -1
  61. data/lib/venice_client/models/create_chat_completion200_response_choices_inner_logprobs_top_logprobs_inner.rb +1 -1
  62. data/lib/venice_client/models/create_chat_completion200_response_choices_inner_message.rb +4 -2
  63. data/lib/venice_client/models/create_chat_completion200_response_usage.rb +1 -1
  64. data/lib/venice_client/models/create_chat_completion200_response_venice_parameters.rb +1 -1
  65. data/lib/venice_client/models/create_chat_completion200_response_venice_parameters_web_search_citations_inner.rb +1 -1
  66. data/lib/venice_client/models/create_embedding200_response.rb +1 -1
  67. data/lib/venice_client/models/create_embedding200_response_data_inner.rb +1 -1
  68. data/lib/venice_client/models/create_embedding200_response_usage.rb +1 -1
  69. data/lib/venice_client/models/create_embedding_request_schema.rb +1 -1
  70. data/lib/venice_client/models/create_embedding_request_schema_input.rb +1 -1
  71. data/lib/venice_client/models/create_embedding_request_schema_model.rb +1 -1
  72. data/lib/venice_client/models/create_speech_request_schema.rb +1 -1
  73. data/lib/venice_client/models/delete_api_key200_response.rb +1 -1
  74. data/lib/venice_client/models/detailed_error.rb +1 -1
  75. data/lib/venice_client/models/edit_image_request.rb +1 -1
  76. data/lib/venice_client/models/edit_image_request_image.rb +1 -1
  77. data/lib/venice_client/models/generate_image200_response.rb +1 -1
  78. data/lib/venice_client/models/generate_image200_response_timing.rb +1 -1
  79. data/lib/venice_client/models/generate_image_request.rb +2 -2
  80. data/lib/venice_client/models/get_api_key_by_id200_response.rb +1 -1
  81. data/lib/venice_client/models/get_api_key_by_id200_response_data.rb +1 -1
  82. data/lib/venice_client/models/get_api_key_generate_web3_key200_response.rb +1 -1
  83. data/lib/venice_client/models/get_api_key_generate_web3_key200_response_data.rb +1 -1
  84. data/lib/venice_client/models/get_api_key_rate_limit_logs200_response.rb +1 -1
  85. data/lib/venice_client/models/get_api_key_rate_limit_logs200_response_data_inner.rb +1 -1
  86. data/lib/venice_client/models/get_api_key_rate_limits200_response.rb +1 -1
  87. data/lib/venice_client/models/get_api_key_rate_limits200_response_data.rb +1 -1
  88. data/lib/venice_client/models/get_api_key_rate_limits200_response_data_api_tier.rb +1 -1
  89. data/lib/venice_client/models/get_api_key_rate_limits200_response_data_balances.rb +1 -1
  90. data/lib/venice_client/models/get_api_key_rate_limits200_response_data_rate_limits_inner.rb +1 -1
  91. data/lib/venice_client/models/get_api_key_rate_limits200_response_data_rate_limits_inner_rate_limits_inner.rb +1 -1
  92. data/lib/venice_client/models/get_api_keys200_response.rb +1 -1
  93. data/lib/venice_client/models/get_api_keys200_response_data_inner.rb +1 -1
  94. data/lib/venice_client/models/get_api_keys200_response_data_inner_consumption_limits.rb +1 -1
  95. data/lib/venice_client/models/get_api_keys200_response_data_inner_usage.rb +1 -1
  96. data/lib/venice_client/models/get_api_keys200_response_data_inner_usage_trailing_seven_days.rb +1 -1
  97. data/lib/venice_client/models/get_billing_usage200_response.rb +1 -1
  98. data/lib/venice_client/models/get_billing_usage200_response_data_inner.rb +1 -1
  99. data/lib/venice_client/models/get_billing_usage200_response_data_inner_inference_details.rb +1 -1
  100. data/lib/venice_client/models/get_billing_usage200_response_pagination.rb +1 -1
  101. data/lib/venice_client/models/get_character_by_slug200_response.rb +1 -1
  102. data/lib/venice_client/models/image_model_constraints.rb +1 -1
  103. data/lib/venice_client/models/image_model_constraints_steps.rb +1 -1
  104. data/lib/venice_client/models/image_model_pricing.rb +1 -1
  105. data/lib/venice_client/models/image_model_pricing_generation.rb +1 -1
  106. data/lib/venice_client/models/image_model_pricing_upscale.rb +1 -1
  107. data/lib/venice_client/models/image_model_pricing_upscale2x.rb +1 -1
  108. data/lib/venice_client/models/image_model_pricing_upscale4x.rb +1 -1
  109. data/lib/venice_client/models/image_styles_get200_response.rb +1 -1
  110. data/lib/venice_client/models/image_url.rb +1 -1
  111. data/lib/venice_client/models/image_url_object.rb +1 -1
  112. data/lib/venice_client/models/input_audio.rb +297 -0
  113. data/lib/venice_client/models/input_audio_object.rb +285 -0
  114. data/lib/venice_client/models/json_object.rb +1 -1
  115. data/lib/venice_client/models/json_schema.rb +1 -1
  116. data/lib/venice_client/models/list_characters200_response.rb +1 -1
  117. data/lib/venice_client/models/list_characters200_response_data_inner.rb +1 -1
  118. data/lib/venice_client/models/list_characters200_response_data_inner_stats.rb +1 -1
  119. data/lib/venice_client/models/list_model_compatibility_mapping200_response.rb +1 -1
  120. data/lib/venice_client/models/list_model_traits200_response.rb +1 -1
  121. data/lib/venice_client/models/list_models200_response.rb +1 -1
  122. data/lib/venice_client/models/list_models200_response_type.rb +1 -1
  123. data/lib/venice_client/models/list_models_type_parameter.rb +1 -1
  124. data/lib/venice_client/models/llm_model_pricing.rb +1 -1
  125. data/lib/venice_client/models/llm_model_pricing_input.rb +1 -1
  126. data/lib/venice_client/models/llm_model_pricing_output.rb +1 -1
  127. data/lib/venice_client/models/model_response.rb +1 -1
  128. data/lib/venice_client/models/model_response_model_spec.rb +1 -1
  129. data/lib/venice_client/models/model_response_model_spec_capabilities.rb +1 -1
  130. data/lib/venice_client/models/model_response_model_spec_constraints.rb +1 -1
  131. data/lib/venice_client/models/model_response_model_spec_pricing.rb +1 -1
  132. data/lib/venice_client/models/objects_inner.rb +4 -2
  133. data/lib/venice_client/models/post_api_key_generate_web3_key_request.rb +1 -1
  134. data/lib/venice_client/models/queue_video200_response.rb +1 -1
  135. data/lib/venice_client/models/queue_video_request.rb +1 -1
  136. data/lib/venice_client/models/quote_video200_response.rb +1 -1
  137. data/lib/venice_client/models/retrieve_video200_response.rb +1 -1
  138. data/lib/venice_client/models/retrieve_video_request.rb +1 -1
  139. data/lib/venice_client/models/simple_generate_image200_response.rb +1 -1
  140. data/lib/venice_client/models/simple_generate_image200_response_data_inner.rb +1 -1
  141. data/lib/venice_client/models/simple_generate_image200_response_data_inner_any_of.rb +1 -1
  142. data/lib/venice_client/models/simple_generate_image200_response_data_inner_any_of1.rb +1 -1
  143. data/lib/venice_client/models/simple_generate_image_request.rb +1 -1
  144. data/lib/venice_client/models/standard_error.rb +1 -1
  145. data/lib/venice_client/models/system_message.rb +2 -1
  146. data/lib/venice_client/models/system_message_content.rb +1 -1
  147. data/lib/venice_client/models/text.rb +1 -1
  148. data/lib/venice_client/models/text_model_constraints.rb +1 -1
  149. data/lib/venice_client/models/text_model_constraints_temperature.rb +1 -1
  150. data/lib/venice_client/models/text_model_constraints_top_p.rb +1 -1
  151. data/lib/venice_client/models/tool_call.rb +1 -1
  152. data/lib/venice_client/models/tool_call_function.rb +1 -1
  153. data/lib/venice_client/models/tool_message.rb +2 -1
  154. data/lib/venice_client/models/upscale_image_request.rb +1 -1
  155. data/lib/venice_client/models/upscale_image_request_enhance.rb +1 -1
  156. data/lib/venice_client/models/user_message.rb +12 -2
  157. data/lib/venice_client/models/user_message_content.rb +1 -1
  158. data/lib/venice_client/models/video_model_constraints.rb +1 -1
  159. data/lib/venice_client/models/video_url.rb +297 -0
  160. data/lib/venice_client/models/video_url_object.rb +239 -0
  161. data/lib/venice_client/version.rb +2 -2
  162. data/lib/venice_client.rb +8 -1
  163. data/spec/models/assistant_message_reasoning_details_inner_spec.rb +66 -0
  164. data/spec/models/chat_completion_content_part_input_audio_spec.rb +52 -0
  165. data/spec/models/chat_completion_content_part_video_url_spec.rb +52 -0
  166. data/spec/models/create_chat_completion200_response_choices_inner_message_spec.rb +17 -0
  167. data/spec/models/input_audio_object_spec.rb +46 -0
  168. data/spec/models/input_audio_spec.rb +52 -0
  169. data/spec/models/video_url_object_spec.rb +36 -0
  170. data/spec/models/video_url_spec.rb +52 -0
  171. data/spec/spec_helper.rb +1 -1
  172. data/swagger.yaml +307 -15
  173. data/update.sh +10 -0
  174. data/venice_client.gemspec +1 -1
  175. metadata +29 -1
@@ -0,0 +1,297 @@
1
+ =begin
2
+ #Venice.ai API
3
+
4
+ #The Venice.ai API.
5
+
6
+ The version of the OpenAPI document: 20251218.042551
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
+ # Video URL message type for models that support video analysis. Supports both direct URLs and base64-encoded data URLs.
18
+ class VideoUrl
19
+ attr_accessor :cache_control
20
+
21
+ attr_accessor :type
22
+
23
+ attr_accessor :video_url
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'cache_control' => :'cache_control',
51
+ :'type' => :'type',
52
+ :'video_url' => :'video_url'
53
+ }
54
+ end
55
+
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ acceptable_attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'cache_control' => :'CacheControl',
70
+ :'type' => :'String',
71
+ :'video_url' => :'VideoURLObject'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::VideoUrl` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::VideoUrl`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'cache_control')
98
+ self.cache_control = attributes[:'cache_control']
99
+ end
100
+
101
+ if attributes.key?(:'type')
102
+ self.type = attributes[:'type']
103
+ else
104
+ self.type = nil
105
+ end
106
+
107
+ if attributes.key?(:'video_url')
108
+ self.video_url = attributes[:'video_url']
109
+ else
110
+ self.video_url = nil
111
+ end
112
+ end
113
+
114
+ # Show invalid properties with the reasons. Usually used together with valid?
115
+ # @return Array for valid properties with the reasons
116
+ def list_invalid_properties
117
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
118
+ invalid_properties = Array.new
119
+ if @type.nil?
120
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
121
+ end
122
+
123
+ if @video_url.nil?
124
+ invalid_properties.push('invalid value for "video_url", video_url cannot be nil.')
125
+ end
126
+
127
+ invalid_properties
128
+ end
129
+
130
+ # Check to see if the all the properties in the model are valid
131
+ # @return true if the model is valid
132
+ def valid?
133
+ warn '[DEPRECATED] the `valid?` method is obsolete'
134
+ return false if @type.nil?
135
+ type_validator = EnumAttributeValidator.new('String', ["video_url"])
136
+ return false unless type_validator.valid?(@type)
137
+ return false if @video_url.nil?
138
+ true
139
+ end
140
+
141
+ # Custom attribute writer method checking allowed values (enum).
142
+ # @param [Object] type Object to be assigned
143
+ def type=(type)
144
+ validator = EnumAttributeValidator.new('String', ["video_url"])
145
+ unless validator.valid?(type)
146
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
147
+ end
148
+ @type = type
149
+ end
150
+
151
+ # Custom attribute writer method with validation
152
+ # @param [Object] video_url Value to be assigned
153
+ def video_url=(video_url)
154
+ if video_url.nil?
155
+ fail ArgumentError, 'video_url cannot be nil'
156
+ end
157
+
158
+ @video_url = video_url
159
+ end
160
+
161
+ # Checks equality by comparing each attribute.
162
+ # @param [Object] Object to be compared
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ cache_control == o.cache_control &&
167
+ type == o.type &&
168
+ video_url == o.video_url
169
+ end
170
+
171
+ # @see the `==` method
172
+ # @param [Object] Object to be compared
173
+ def eql?(o)
174
+ self == o
175
+ end
176
+
177
+ # Calculates hash code according to all attributes.
178
+ # @return [Integer] Hash code
179
+ def hash
180
+ [cache_control, type, video_url].hash
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def self.build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ attributes = attributes.transform_keys(&:to_sym)
189
+ transformed_hash = {}
190
+ openapi_types.each_pair do |key, type|
191
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
192
+ transformed_hash["#{key}"] = nil
193
+ elsif type =~ /\AArray<(.*)>/i
194
+ # check to ensure the input is an array given that the attribute
195
+ # is documented as an array but the input is not
196
+ if attributes[attribute_map[key]].is_a?(Array)
197
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
198
+ end
199
+ elsif !attributes[attribute_map[key]].nil?
200
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
201
+ end
202
+ end
203
+ new(transformed_hash)
204
+ end
205
+
206
+ # Deserializes the data based on type
207
+ # @param string type Data type
208
+ # @param string value Value to be deserialized
209
+ # @return [Object] Deserialized data
210
+ def self._deserialize(type, value)
211
+ case type.to_sym
212
+ when :Time
213
+ Time.parse(value)
214
+ when :Date
215
+ Date.parse(value)
216
+ when :String
217
+ value.to_s
218
+ when :Integer
219
+ value.to_i
220
+ when :Float
221
+ value.to_f
222
+ when :Boolean
223
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
224
+ true
225
+ else
226
+ false
227
+ end
228
+ when :Object
229
+ # generic object (usually a Hash), return directly
230
+ value
231
+ when /\AArray<(?<inner_type>.+)>\z/
232
+ inner_type = Regexp.last_match[:inner_type]
233
+ value.map { |v| _deserialize(inner_type, v) }
234
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
235
+ k_type = Regexp.last_match[:k_type]
236
+ v_type = Regexp.last_match[:v_type]
237
+ {}.tap do |hash|
238
+ value.each do |k, v|
239
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
240
+ end
241
+ end
242
+ else # model
243
+ # models (e.g. Pet) or oneOf
244
+ klass = VeniceClient.const_get(type)
245
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
246
+ end
247
+ end
248
+
249
+ # Returns the string representation of the object
250
+ # @return [String] String presentation of the object
251
+ def to_s
252
+ to_hash.to_s
253
+ end
254
+
255
+ # to_body is an alias to to_hash (backward compatibility)
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_body
258
+ to_hash
259
+ end
260
+
261
+ # Returns the object in the form of hash
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_hash
264
+ hash = {}
265
+ self.class.attribute_map.each_pair do |attr, param|
266
+ value = self.send(attr)
267
+ if value.nil?
268
+ is_nullable = self.class.openapi_nullable.include?(attr)
269
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
270
+ end
271
+
272
+ hash[param] = _to_hash(value)
273
+ end
274
+ hash
275
+ end
276
+
277
+ # Outputs non-array value in the form of hash
278
+ # For object, use to_hash. Otherwise, just return the value
279
+ # @param [Object] value Any valid value
280
+ # @return [Hash] Returns the value in the form of hash
281
+ def _to_hash(value)
282
+ if value.is_a?(Array)
283
+ value.compact.map { |v| _to_hash(v) }
284
+ elsif value.is_a?(Hash)
285
+ {}.tap do |hash|
286
+ value.each { |k, v| hash[k] = _to_hash(v) }
287
+ end
288
+ elsif value.respond_to? :to_hash
289
+ value.to_hash
290
+ else
291
+ value
292
+ end
293
+ end
294
+
295
+ end
296
+
297
+ end
@@ -0,0 +1,239 @@
1
+ =begin
2
+ #Venice.ai API
3
+
4
+ #The Venice.ai API.
5
+
6
+ The version of the OpenAPI document: 20251218.042551
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
+ # Object containing the video URL information
18
+ class VideoURLObject
19
+ # The URL of the video. Can be a direct URL (including YouTube links for some providers), or a base64-encoded data URL (e.g., data:video/mp4;base64,...). Supported formats: mp4, mpeg, mov, webm.
20
+ attr_accessor :url
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'url' => :'url'
26
+ }
27
+ end
28
+
29
+ # Returns attribute mapping this model knows about
30
+ def self.acceptable_attribute_map
31
+ attribute_map
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ acceptable_attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'url' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::VideoURLObject` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::VideoURLObject`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'url')
69
+ self.url = attributes[:'url']
70
+ else
71
+ self.url = nil
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ if @url.nil?
81
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ return false if @url.nil?
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param [Object] url Value to be assigned
97
+ def url=(url)
98
+ if url.nil?
99
+ fail ArgumentError, 'url cannot be nil'
100
+ end
101
+
102
+ @url = url
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ url == o.url
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [url].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def self._deserialize(type, value)
153
+ case type.to_sym
154
+ when :Time
155
+ Time.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :Boolean
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
+ end
183
+ end
184
+ else # model
185
+ # models (e.g. Pet) or oneOf
186
+ klass = VeniceClient.const_get(type)
187
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+
239
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20251209.153516
6
+ The version of the OpenAPI document: 20251218.042551
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -11,5 +11,5 @@ Generator version: 7.14.0
11
11
  =end
12
12
 
13
13
  module VeniceClient
14
- VERSION = '1.0.23'
14
+ VERSION = '1.0.25'
15
15
  end
data/lib/venice_client.rb CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20251209.153516
6
+ The version of the OpenAPI document: 20251218.042551
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -19,11 +19,14 @@ require 'venice_client/configuration'
19
19
  # Models
20
20
  require 'venice_client/models/assistant_message'
21
21
  require 'venice_client/models/assistant_message_content'
22
+ require 'venice_client/models/assistant_message_reasoning_details_inner'
22
23
  require 'venice_client/models/audio_model_pricing'
23
24
  require 'venice_client/models/audio_model_pricing_input'
24
25
  require 'venice_client/models/billing_usage_request'
25
26
  require 'venice_client/models/billing_usage_response'
26
27
  require 'venice_client/models/cache_control'
28
+ require 'venice_client/models/chat_completion_content_part_input_audio'
29
+ require 'venice_client/models/chat_completion_content_part_video_url'
27
30
  require 'venice_client/models/chat_completion_request'
28
31
  require 'venice_client/models/chat_completion_request_messages_inner'
29
32
  require 'venice_client/models/chat_completion_request_reasoning'
@@ -94,6 +97,8 @@ require 'venice_client/models/image_model_pricing_upscale4x'
94
97
  require 'venice_client/models/image_styles_get200_response'
95
98
  require 'venice_client/models/image_url_object'
96
99
  require 'venice_client/models/image_url'
100
+ require 'venice_client/models/input_audio'
101
+ require 'venice_client/models/input_audio_object'
97
102
  require 'venice_client/models/json_object'
98
103
  require 'venice_client/models/json_schema'
99
104
  require 'venice_client/models/llm_model_pricing'
@@ -139,6 +144,8 @@ require 'venice_client/models/upscale_image_request_enhance'
139
144
  require 'venice_client/models/user_message'
140
145
  require 'venice_client/models/user_message_content'
141
146
  require 'venice_client/models/video_model_constraints'
147
+ require 'venice_client/models/video_url_object'
148
+ require 'venice_client/models/video_url'
142
149
 
143
150
  # APIs
144
151
  require 'venice_client/api/api_keys_api'
@@ -0,0 +1,66 @@
1
+ =begin
2
+ #Venice.ai API
3
+
4
+ #The Venice.ai API.
5
+
6
+ The version of the OpenAPI document: 20251218.042551
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for VeniceClient::AssistantMessageReasoningDetailsInner
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe VeniceClient::AssistantMessageReasoningDetailsInner do
21
+ let(:instance) { VeniceClient::AssistantMessageReasoningDetailsInner.new }
22
+
23
+ describe 'test an instance of AssistantMessageReasoningDetailsInner' do
24
+ it 'should create an instance of AssistantMessageReasoningDetailsInner' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(VeniceClient::AssistantMessageReasoningDetailsInner)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "data"' 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 "format"' 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 "id"' 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 "index"' 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 "text"' 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 "type"' 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
+ end