venice_client 1.0.19 → 1.0.21

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 (189) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -1
  3. data/docs/AudioModelPricingInput.md +0 -2
  4. data/docs/CacheControl.md +20 -0
  5. data/docs/ChatApi.md +1 -1
  6. data/docs/ChatCompletionRequest.md +7 -1
  7. data/docs/ChatCompletionRequestReasoning.md +18 -0
  8. data/docs/ChatCompletionRequestVeniceParameters.md +3 -1
  9. data/docs/CompleteVideo200Response.md +18 -0
  10. data/docs/CompleteVideoRequest.md +20 -0
  11. data/docs/CreateChatCompletion200Response.md +1 -1
  12. data/docs/CreateChatCompletion200ResponseVeniceParameters.md +2 -0
  13. data/docs/GenerateImageRequest.md +9 -3
  14. data/docs/GetApiKeyRateLimitLogs200ResponseDataInner.md +1 -1
  15. data/docs/GetApiKeyRateLimits200Response.md +0 -2
  16. data/docs/GetApiKeyRateLimits200ResponseDataBalances.md +0 -2
  17. data/docs/GetApiKeyRateLimits200ResponseDataRateLimitsInner.md +1 -1
  18. data/docs/ImageApi.md +1 -1
  19. data/docs/ImageModelPricingGeneration.md +0 -2
  20. data/docs/ImageModelPricingUpscale2x.md +0 -2
  21. data/docs/ImageModelPricingUpscale4x.md +0 -2
  22. data/docs/ImageUrl.md +2 -0
  23. data/docs/LLMModelPricingInput.md +0 -2
  24. data/docs/LLMModelPricingOutput.md +0 -2
  25. data/docs/ModelResponseModelSpec.md +2 -0
  26. data/docs/ModelResponseModelSpecConstraints.md +13 -1
  27. data/docs/ModelsApi.md +2 -2
  28. data/docs/QueueVideo200Response.md +20 -0
  29. data/docs/QueueVideoRequest.md +32 -0
  30. data/docs/QuoteVideo200Response.md +18 -0
  31. data/docs/RetrieveVideo200Response.md +22 -0
  32. data/docs/RetrieveVideoRequest.md +22 -0
  33. data/docs/SimpleGenerateImageRequest.md +1 -1
  34. data/docs/Text.md +2 -0
  35. data/docs/VideoApi.md +295 -0
  36. data/docs/VideoModelConstraints.md +28 -0
  37. data/lib/venice_client/api/api_keys_api.rb +1 -1
  38. data/lib/venice_client/api/audio_api.rb +1 -1
  39. data/lib/venice_client/api/billing_api.rb +1 -1
  40. data/lib/venice_client/api/characters_api.rb +1 -1
  41. data/lib/venice_client/api/chat_api.rb +1 -1
  42. data/lib/venice_client/api/embeddings_api.rb +1 -1
  43. data/lib/venice_client/api/image_api.rb +1 -1
  44. data/lib/venice_client/api/models_api.rb +3 -3
  45. data/lib/venice_client/api/preview_api.rb +1 -1
  46. data/lib/venice_client/api/speech_api.rb +1 -1
  47. data/lib/venice_client/api/video_api.rb +278 -0
  48. data/lib/venice_client/api_client.rb +1 -1
  49. data/lib/venice_client/api_error.rb +1 -1
  50. data/lib/venice_client/configuration.rb +1 -1
  51. data/lib/venice_client/models/assistant_message.rb +8 -8
  52. data/lib/venice_client/models/assistant_message_content.rb +1 -1
  53. data/lib/venice_client/models/audio_model_pricing.rb +1 -1
  54. data/lib/venice_client/models/audio_model_pricing_input.rb +2 -29
  55. data/lib/venice_client/models/billing_usage_request.rb +1 -1
  56. data/lib/venice_client/models/billing_usage_response.rb +1 -1
  57. data/lib/venice_client/models/cache_control.rb +273 -0
  58. data/lib/venice_client/models/chat_completion_request.rb +65 -2
  59. data/lib/venice_client/models/chat_completion_request_messages_inner.rb +2 -2
  60. data/lib/venice_client/models/chat_completion_request_reasoning.rb +256 -0
  61. data/lib/venice_client/models/chat_completion_request_response_format.rb +1 -1
  62. data/lib/venice_client/models/chat_completion_request_stop.rb +1 -1
  63. data/lib/venice_client/models/chat_completion_request_stream_options.rb +1 -1
  64. data/lib/venice_client/models/chat_completion_request_tool_choice.rb +1 -1
  65. data/lib/venice_client/models/chat_completion_request_tool_choice_any_of.rb +1 -1
  66. data/lib/venice_client/models/chat_completion_request_tool_choice_any_of_function.rb +1 -1
  67. data/lib/venice_client/models/chat_completion_request_venice_parameters.rb +15 -3
  68. data/lib/venice_client/models/complete_video200_response.rb +238 -0
  69. data/lib/venice_client/models/complete_video_request.rb +265 -0
  70. data/lib/venice_client/models/create_api_key200_response.rb +1 -1
  71. data/lib/venice_client/models/create_api_key200_response_data.rb +1 -1
  72. data/lib/venice_client/models/create_api_key_request.rb +1 -1
  73. data/lib/venice_client/models/create_api_key_request_expires_at.rb +1 -1
  74. data/lib/venice_client/models/create_chat_completion200_response.rb +11 -19
  75. data/lib/venice_client/models/create_chat_completion200_response_choices_inner.rb +7 -7
  76. data/lib/venice_client/models/create_chat_completion200_response_choices_inner_logprobs.rb +1 -1
  77. data/lib/venice_client/models/create_chat_completion200_response_choices_inner_logprobs_top_logprobs_inner.rb +1 -1
  78. data/lib/venice_client/models/create_chat_completion200_response_choices_inner_message.rb +2 -2
  79. data/lib/venice_client/models/create_chat_completion200_response_usage.rb +1 -1
  80. data/lib/venice_client/models/create_chat_completion200_response_venice_parameters.rb +29 -2
  81. data/lib/venice_client/models/create_chat_completion200_response_venice_parameters_web_search_citations_inner.rb +1 -1
  82. data/lib/venice_client/models/create_embedding200_response.rb +1 -1
  83. data/lib/venice_client/models/create_embedding200_response_data_inner.rb +1 -1
  84. data/lib/venice_client/models/create_embedding200_response_usage.rb +1 -1
  85. data/lib/venice_client/models/create_embedding_request_schema.rb +1 -1
  86. data/lib/venice_client/models/create_embedding_request_schema_input.rb +1 -1
  87. data/lib/venice_client/models/create_embedding_request_schema_model.rb +1 -1
  88. data/lib/venice_client/models/create_speech_request_schema.rb +1 -1
  89. data/lib/venice_client/models/delete_api_key200_response.rb +1 -1
  90. data/lib/venice_client/models/detailed_error.rb +1 -1
  91. data/lib/venice_client/models/edit_image_request.rb +1 -1
  92. data/lib/venice_client/models/edit_image_request_image.rb +1 -1
  93. data/lib/venice_client/models/generate_image200_response.rb +1 -1
  94. data/lib/venice_client/models/generate_image200_response_timing.rb +1 -1
  95. data/lib/venice_client/models/generate_image_request.rb +44 -42
  96. data/lib/venice_client/models/get_api_key_by_id200_response.rb +1 -1
  97. data/lib/venice_client/models/get_api_key_by_id200_response_data.rb +1 -1
  98. data/lib/venice_client/models/get_api_key_generate_web3_key200_response.rb +1 -1
  99. data/lib/venice_client/models/get_api_key_generate_web3_key200_response_data.rb +1 -1
  100. data/lib/venice_client/models/get_api_key_rate_limit_logs200_response.rb +1 -1
  101. data/lib/venice_client/models/get_api_key_rate_limit_logs200_response_data_inner.rb +2 -2
  102. data/lib/venice_client/models/get_api_key_rate_limits200_response.rb +2 -12
  103. data/lib/venice_client/models/get_api_key_rate_limits200_response_data.rb +1 -1
  104. data/lib/venice_client/models/get_api_key_rate_limits200_response_data_api_tier.rb +1 -1
  105. data/lib/venice_client/models/get_api_key_rate_limits200_response_data_balances.rb +2 -12
  106. data/lib/venice_client/models/get_api_key_rate_limits200_response_data_rate_limits_inner.rb +1 -1
  107. data/lib/venice_client/models/get_api_key_rate_limits200_response_data_rate_limits_inner_rate_limits_inner.rb +1 -1
  108. data/lib/venice_client/models/get_api_keys200_response.rb +1 -1
  109. data/lib/venice_client/models/get_api_keys200_response_data_inner.rb +1 -1
  110. data/lib/venice_client/models/get_api_keys200_response_data_inner_consumption_limits.rb +1 -1
  111. data/lib/venice_client/models/get_api_keys200_response_data_inner_usage.rb +1 -1
  112. data/lib/venice_client/models/get_api_keys200_response_data_inner_usage_trailing_seven_days.rb +1 -1
  113. data/lib/venice_client/models/get_billing_usage200_response.rb +1 -1
  114. data/lib/venice_client/models/get_billing_usage200_response_data_inner.rb +1 -1
  115. data/lib/venice_client/models/get_billing_usage200_response_data_inner_inference_details.rb +1 -1
  116. data/lib/venice_client/models/get_billing_usage200_response_pagination.rb +1 -1
  117. data/lib/venice_client/models/get_character_by_slug200_response.rb +1 -1
  118. data/lib/venice_client/models/image_model_constraints.rb +1 -1
  119. data/lib/venice_client/models/image_model_constraints_steps.rb +1 -1
  120. data/lib/venice_client/models/image_model_pricing.rb +1 -1
  121. data/lib/venice_client/models/image_model_pricing_generation.rb +2 -29
  122. data/lib/venice_client/models/image_model_pricing_upscale.rb +1 -1
  123. data/lib/venice_client/models/image_model_pricing_upscale2x.rb +2 -29
  124. data/lib/venice_client/models/image_model_pricing_upscale4x.rb +2 -29
  125. data/lib/venice_client/models/image_styles_get200_response.rb +1 -1
  126. data/lib/venice_client/models/image_url.rb +12 -3
  127. data/lib/venice_client/models/image_url_object.rb +1 -1
  128. data/lib/venice_client/models/json_object.rb +1 -1
  129. data/lib/venice_client/models/json_schema.rb +1 -1
  130. data/lib/venice_client/models/list_characters200_response.rb +1 -1
  131. data/lib/venice_client/models/list_characters200_response_data_inner.rb +1 -1
  132. data/lib/venice_client/models/list_characters200_response_data_inner_stats.rb +1 -1
  133. data/lib/venice_client/models/list_model_compatibility_mapping200_response.rb +1 -1
  134. data/lib/venice_client/models/list_model_traits200_response.rb +1 -1
  135. data/lib/venice_client/models/list_models200_response.rb +1 -1
  136. data/lib/venice_client/models/list_models200_response_type.rb +1 -1
  137. data/lib/venice_client/models/list_models_type_parameter.rb +1 -1
  138. data/lib/venice_client/models/llm_model_pricing.rb +1 -1
  139. data/lib/venice_client/models/llm_model_pricing_input.rb +2 -29
  140. data/lib/venice_client/models/llm_model_pricing_output.rb +2 -29
  141. data/lib/venice_client/models/model_response.rb +3 -3
  142. data/lib/venice_client/models/model_response_model_spec.rb +46 -2
  143. data/lib/venice_client/models/model_response_model_spec_capabilities.rb +3 -3
  144. data/lib/venice_client/models/model_response_model_spec_constraints.rb +3 -2
  145. data/lib/venice_client/models/model_response_model_spec_pricing.rb +1 -1
  146. data/lib/venice_client/models/objects_inner.rb +1 -1
  147. data/lib/venice_client/models/post_api_key_generate_web3_key_request.rb +1 -1
  148. data/lib/venice_client/models/queue_video200_response.rb +265 -0
  149. data/lib/venice_client/models/queue_video_request.rb +438 -0
  150. data/lib/venice_client/models/quote_video200_response.rb +237 -0
  151. data/lib/venice_client/models/retrieve_video200_response.rb +316 -0
  152. data/lib/venice_client/models/retrieve_video_request.rb +277 -0
  153. data/lib/venice_client/models/simple_generate_image200_response.rb +1 -1
  154. data/lib/venice_client/models/simple_generate_image200_response_data_inner.rb +1 -1
  155. data/lib/venice_client/models/simple_generate_image200_response_data_inner_any_of.rb +1 -1
  156. data/lib/venice_client/models/simple_generate_image200_response_data_inner_any_of1.rb +1 -1
  157. data/lib/venice_client/models/simple_generate_image_request.rb +1 -1
  158. data/lib/venice_client/models/standard_error.rb +1 -1
  159. data/lib/venice_client/models/system_message.rb +8 -8
  160. data/lib/venice_client/models/system_message_content.rb +1 -1
  161. data/lib/venice_client/models/text.rb +12 -3
  162. data/lib/venice_client/models/text_model_constraints.rb +1 -1
  163. data/lib/venice_client/models/text_model_constraints_temperature.rb +1 -1
  164. data/lib/venice_client/models/text_model_constraints_top_p.rb +1 -1
  165. data/lib/venice_client/models/tool_call.rb +1 -1
  166. data/lib/venice_client/models/tool_call_function.rb +1 -1
  167. data/lib/venice_client/models/tool_message.rb +8 -8
  168. data/lib/venice_client/models/upscale_image_request.rb +1 -1
  169. data/lib/venice_client/models/upscale_image_request_enhance.rb +1 -1
  170. data/lib/venice_client/models/user_message.rb +8 -8
  171. data/lib/venice_client/models/user_message_content.rb +1 -1
  172. data/lib/venice_client/models/video_model_constraints.rb +404 -0
  173. data/lib/venice_client/version.rb +2 -2
  174. data/lib/venice_client.rb +12 -1
  175. data/spec/api/video_api_spec.rb +83 -0
  176. data/spec/models/cache_control_spec.rb +46 -0
  177. data/spec/models/chat_completion_request_reasoning_spec.rb +40 -0
  178. data/spec/models/complete_video200_response_spec.rb +36 -0
  179. data/spec/models/complete_video_request_spec.rb +42 -0
  180. data/spec/models/queue_video200_response_spec.rb +42 -0
  181. data/spec/models/queue_video_request_spec.rb +86 -0
  182. data/spec/models/quote_video200_response_spec.rb +36 -0
  183. data/spec/models/retrieve_video200_response_spec.rb +52 -0
  184. data/spec/models/retrieve_video_request_spec.rb +48 -0
  185. data/spec/models/video_model_constraints_spec.rb +70 -0
  186. data/spec/spec_helper.rb +1 -1
  187. data/swagger.yaml +587 -76
  188. data/venice_client.gemspec +1 -1
  189. metadata +46 -2
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -28,7 +28,10 @@ module VeniceClient
28
28
  # Enable web search for this request. Defaults to off. On will force web search on the request. Auto will enable it based on the model's discretion. Citations will be returned either in the first chunk of a streaming result, or in the non streaming response.
29
29
  attr_accessor :enable_web_search
30
30
 
31
- # When web search is enabled, this will request that the LLM cite its sources using a [REF]0[/REF] format. Defaults to false.
31
+ # Enable Venice web scraping of URLs in the latest user message using Firecrawl. Off by default.
32
+ attr_accessor :enable_web_scraping
33
+
34
+ # When web search is enabled, this will request that the LLM cite its sources using a ^index^ or ^i,j^ superscript format (e.g., ^1^). Defaults to false.
32
35
  attr_accessor :enable_web_citations
33
36
 
34
37
  # Experimental feature - When set to true, the LLM will include search results in the stream as the first emitted chunk. Defaults to false.
@@ -69,6 +72,7 @@ module VeniceClient
69
72
  :'strip_thinking_response' => :'strip_thinking_response',
70
73
  :'disable_thinking' => :'disable_thinking',
71
74
  :'enable_web_search' => :'enable_web_search',
75
+ :'enable_web_scraping' => :'enable_web_scraping',
72
76
  :'enable_web_citations' => :'enable_web_citations',
73
77
  :'include_search_results_in_stream' => :'include_search_results_in_stream',
74
78
  :'return_search_results_as_documents' => :'return_search_results_as_documents',
@@ -93,6 +97,7 @@ module VeniceClient
93
97
  :'strip_thinking_response' => :'Boolean',
94
98
  :'disable_thinking' => :'Boolean',
95
99
  :'enable_web_search' => :'String',
100
+ :'enable_web_scraping' => :'Boolean',
96
101
  :'enable_web_citations' => :'Boolean',
97
102
  :'include_search_results_in_stream' => :'Boolean',
98
103
  :'return_search_results_as_documents' => :'Boolean',
@@ -144,6 +149,12 @@ module VeniceClient
144
149
  self.enable_web_search = 'off'
145
150
  end
146
151
 
152
+ if attributes.key?(:'enable_web_scraping')
153
+ self.enable_web_scraping = attributes[:'enable_web_scraping']
154
+ else
155
+ self.enable_web_scraping = false
156
+ end
157
+
147
158
  if attributes.key?(:'enable_web_citations')
148
159
  self.enable_web_citations = attributes[:'enable_web_citations']
149
160
  else
@@ -203,6 +214,7 @@ module VeniceClient
203
214
  strip_thinking_response == o.strip_thinking_response &&
204
215
  disable_thinking == o.disable_thinking &&
205
216
  enable_web_search == o.enable_web_search &&
217
+ enable_web_scraping == o.enable_web_scraping &&
206
218
  enable_web_citations == o.enable_web_citations &&
207
219
  include_search_results_in_stream == o.include_search_results_in_stream &&
208
220
  return_search_results_as_documents == o.return_search_results_as_documents &&
@@ -218,7 +230,7 @@ module VeniceClient
218
230
  # Calculates hash code according to all attributes.
219
231
  # @return [Integer] Hash code
220
232
  def hash
221
- [character_slug, strip_thinking_response, disable_thinking, enable_web_search, enable_web_citations, include_search_results_in_stream, return_search_results_as_documents, include_venice_system_prompt].hash
233
+ [character_slug, strip_thinking_response, disable_thinking, enable_web_search, enable_web_scraping, enable_web_citations, include_search_results_in_stream, return_search_results_as_documents, include_venice_system_prompt].hash
222
234
  end
223
235
 
224
236
  # Builds the object from hash
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #Venice.ai API
3
+
4
+ #The Venice.ai API.
5
+
6
+ The version of the OpenAPI document: 20251209.153516
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
+ class CompleteVideo200Response
18
+ # Indicates whether the video cleanup was successful.
19
+ attr_accessor :success
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'success' => :'success'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'success' => :'Boolean'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::CompleteVideo200Response` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::CompleteVideo200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'success')
68
+ self.success = attributes[:'success']
69
+ else
70
+ self.success = nil
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @success.nil?
80
+ invalid_properties.push('invalid value for "success", success cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @success.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] success Value to be assigned
96
+ def success=(success)
97
+ if success.nil?
98
+ fail ArgumentError, 'success cannot be nil'
99
+ end
100
+
101
+ @success = success
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ success == o.success
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [success].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def self._deserialize(type, value)
152
+ case type.to_sym
153
+ when :Time
154
+ Time.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :Boolean
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ # models (e.g. Pet) or oneOf
185
+ klass = VeniceClient.const_get(type)
186
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end
@@ -0,0 +1,265 @@
1
+ =begin
2
+ #Venice.ai API
3
+
4
+ #The Venice.ai API.
5
+
6
+ The version of the OpenAPI document: 20251209.153516
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
+ class CompleteVideoRequest
18
+ # The ID of the model used for video generation.
19
+ attr_accessor :model
20
+
21
+ # The ID of the video generation request.
22
+ attr_accessor :queue_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'model' => :'model',
28
+ :'queue_id' => :'queue_id'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'model' => :'String',
46
+ :'queue_id' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::CompleteVideoRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::CompleteVideoRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'model')
73
+ self.model = attributes[:'model']
74
+ else
75
+ self.model = nil
76
+ end
77
+
78
+ if attributes.key?(:'queue_id')
79
+ self.queue_id = attributes[:'queue_id']
80
+ else
81
+ self.queue_id = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @model.nil?
91
+ invalid_properties.push('invalid value for "model", model cannot be nil.')
92
+ end
93
+
94
+ if @queue_id.nil?
95
+ invalid_properties.push('invalid value for "queue_id", queue_id cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @model.nil?
106
+ return false if @queue_id.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param [Object] model Value to be assigned
112
+ def model=(model)
113
+ if model.nil?
114
+ fail ArgumentError, 'model cannot be nil'
115
+ end
116
+
117
+ @model = model
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] queue_id Value to be assigned
122
+ def queue_id=(queue_id)
123
+ if queue_id.nil?
124
+ fail ArgumentError, 'queue_id cannot be nil'
125
+ end
126
+
127
+ @queue_id = queue_id
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ model == o.model &&
136
+ queue_id == o.queue_id
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [model, queue_id].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Deserializes the data based on type
175
+ # @param string type Data type
176
+ # @param string value Value to be deserialized
177
+ # @return [Object] Deserialized data
178
+ def self._deserialize(type, value)
179
+ case type.to_sym
180
+ when :Time
181
+ Time.parse(value)
182
+ when :Date
183
+ Date.parse(value)
184
+ when :String
185
+ value.to_s
186
+ when :Integer
187
+ value.to_i
188
+ when :Float
189
+ value.to_f
190
+ when :Boolean
191
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
+ true
193
+ else
194
+ false
195
+ end
196
+ when :Object
197
+ # generic object (usually a Hash), return directly
198
+ value
199
+ when /\AArray<(?<inner_type>.+)>\z/
200
+ inner_type = Regexp.last_match[:inner_type]
201
+ value.map { |v| _deserialize(inner_type, v) }
202
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
+ k_type = Regexp.last_match[:k_type]
204
+ v_type = Regexp.last_match[:v_type]
205
+ {}.tap do |hash|
206
+ value.each do |k, v|
207
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
+ end
209
+ end
210
+ else # model
211
+ # models (e.g. Pet) or oneOf
212
+ klass = VeniceClient.const_get(type)
213
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ # Outputs non-array value in the form of hash
246
+ # For object, use to_hash. Otherwise, just return the value
247
+ # @param [Object] value Any valid value
248
+ # @return [Hash] Returns the value in the form of hash
249
+ def _to_hash(value)
250
+ if value.is_a?(Array)
251
+ value.compact.map { |v| _to_hash(v) }
252
+ elsif value.is_a?(Hash)
253
+ {}.tap do |hash|
254
+ value.each { |k, v| hash[k] = _to_hash(v) }
255
+ end
256
+ elsif value.respond_to? :to_hash
257
+ value.to_hash
258
+ else
259
+ value
260
+ end
261
+ end
262
+
263
+ end
264
+
265
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- The version of the OpenAPI document: 20250918.173746
6
+ The version of the OpenAPI document: 20251209.153516
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0