venice_client 1.0.1 → 1.0.2

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 (586) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +39 -0
  3. data/.gitlab-ci.yml +26 -0
  4. data/.openapi-generator/FILES +395 -0
  5. data/.openapi-generator/VERSION +1 -0
  6. data/.openapi-generator-ignore +23 -0
  7. data/.rspec +2 -0
  8. data/.rubocop.yml +148 -0
  9. data/.travis.yml +11 -0
  10. data/README.md +120 -390
  11. data/Rakefile +2 -0
  12. data/docs/APIKeysApi.md +236 -89
  13. data/docs/AssistantMessage.md +26 -0
  14. data/docs/AssistantMessageContent.md +15 -0
  15. data/docs/AudioApi.md +40 -19
  16. data/docs/AudioModelPricing.md +18 -0
  17. data/docs/AudioModelPricingInput.md +22 -0
  18. data/docs/BillingApi.md +50 -29
  19. data/docs/BillingUsageRequest.md +24 -8
  20. data/docs/BillingUsageResponse.md +16 -4
  21. data/docs/CharactersApi.md +36 -14
  22. data/docs/ChatApi.md +43 -22
  23. data/docs/ChatCompletionRequest.md +66 -28
  24. data/docs/ChatCompletionRequestMessagesInner.md +28 -0
  25. data/docs/ChatCompletionRequestResponseFormat.md +49 -0
  26. data/docs/ChatCompletionRequestStop.md +15 -0
  27. data/docs/ChatCompletionRequestStreamOptions.md +14 -3
  28. data/docs/ChatCompletionRequestToolChoice.md +20 -0
  29. data/docs/ChatCompletionRequestToolChoiceAnyOf.md +20 -0
  30. data/docs/ChatCompletionRequestToolChoiceAnyOfFunction.md +18 -0
  31. data/docs/ChatCompletionRequestVeniceParameters.md +26 -8
  32. data/docs/CreateApiKey200Response.md +20 -0
  33. data/docs/CreateApiKey200ResponseData.md +28 -0
  34. data/docs/CreateApiKeyRequest.md +24 -0
  35. data/docs/CreateApiKeyRequestExpiresAt.md +15 -0
  36. data/docs/CreateChatCompletion200Response.md +32 -0
  37. data/docs/CreateChatCompletion200ResponseChoicesInner.md +26 -0
  38. data/docs/CreateChatCompletion200ResponseChoicesInnerLogprobs.md +24 -0
  39. data/docs/CreateChatCompletion200ResponseChoicesInnerLogprobsTopLogprobsInner.md +22 -0
  40. data/docs/CreateChatCompletion200ResponseChoicesInnerMessage.md +28 -0
  41. data/docs/CreateChatCompletion200ResponseUsage.md +24 -0
  42. data/docs/CreateChatCompletion200ResponseVeniceParameters.md +32 -0
  43. data/docs/CreateChatCompletion200ResponseVeniceParametersWebSearchCitationsInner.md +24 -0
  44. data/docs/CreateChatCompletion400Response.md +20 -0
  45. data/docs/CreateChatCompletion401Response.md +18 -0
  46. data/docs/CreateChatCompletion402Response.md +18 -0
  47. data/docs/CreateChatCompletion415Response.md +18 -0
  48. data/docs/CreateChatCompletion429Response.md +18 -0
  49. data/docs/CreateChatCompletion500Response.md +18 -0
  50. data/docs/CreateChatCompletion503Response.md +18 -0
  51. data/docs/CreateChatCompletion504Response.md +18 -0
  52. data/docs/CreateEmbedding200Response.md +24 -0
  53. data/docs/CreateEmbedding200ResponseDataInner.md +22 -0
  54. data/docs/CreateEmbedding200ResponseUsage.md +20 -0
  55. data/docs/CreateEmbeddingRequestSchema.md +22 -7
  56. data/docs/CreateEmbeddingRequestSchemaInput.md +15 -0
  57. data/docs/CreateEmbeddingRequestSchemaModel.md +15 -0
  58. data/docs/CreateSpeech403Response.md +18 -0
  59. data/docs/CreateSpeechRequestSchema.md +24 -8
  60. data/docs/DeleteApiKey200Response.md +18 -0
  61. data/docs/EditImageRequest.md +20 -0
  62. data/docs/EmbeddingsApi.md +44 -23
  63. data/docs/GenerateImage200Response.md +24 -0
  64. data/docs/GenerateImage200ResponseTiming.md +24 -0
  65. data/docs/GenerateImageRequest.md +44 -18
  66. data/docs/GetApiKeyGenerateWeb3Key200Response.md +20 -0
  67. data/docs/GetApiKeyGenerateWeb3Key200ResponseData.md +18 -0
  68. data/docs/GetApiKeyRateLimitLogs200Response.md +20 -0
  69. data/docs/GetApiKeyRateLimitLogs200ResponseDataInner.md +26 -0
  70. data/docs/GetApiKeyRateLimits200Response.md +18 -0
  71. data/docs/GetApiKeyRateLimits200ResponseData.md +28 -0
  72. data/docs/GetApiKeyRateLimits200ResponseDataApiTier.md +20 -0
  73. data/docs/GetApiKeyRateLimits200ResponseDataBalances.md +22 -0
  74. data/docs/GetApiKeyRateLimits200ResponseDataRateLimitsInner.md +20 -0
  75. data/docs/GetApiKeyRateLimits200ResponseDataRateLimitsInnerRateLimitsInner.md +20 -0
  76. data/docs/GetApiKeys200Response.md +20 -0
  77. data/docs/GetApiKeys200ResponseDataInner.md +34 -0
  78. data/docs/GetApiKeys200ResponseDataInnerConsumptionLimits.md +22 -0
  79. data/docs/GetApiKeys200ResponseDataInnerUsage.md +18 -0
  80. data/docs/GetApiKeys200ResponseDataInnerUsageTrailingSevenDays.md +22 -0
  81. data/docs/GetBillingUsage200Response.md +20 -0
  82. data/docs/GetBillingUsage200ResponseDataInner.md +32 -0
  83. data/docs/GetBillingUsage200ResponseDataInnerInferenceDetails.md +24 -0
  84. data/docs/GetBillingUsage200ResponsePagination.md +24 -0
  85. data/docs/ImageApi.md +198 -102
  86. data/docs/ImageModelConstraints.md +22 -0
  87. data/docs/ImageModelConstraintsSteps.md +20 -0
  88. data/docs/ImageModelPricing.md +20 -0
  89. data/docs/ImageModelPricingGeneration.md +22 -0
  90. data/docs/ImageModelPricingUpscale.md +20 -0
  91. data/docs/ImageModelPricingUpscale2x.md +22 -0
  92. data/docs/ImageModelPricingUpscale4x.md +22 -0
  93. data/docs/ImageStylesGet200Response.md +20 -0
  94. data/docs/ImageStylesGet500Response.md +18 -0
  95. data/docs/ImageURLObject.md +18 -0
  96. data/docs/ImageUrl.md +20 -0
  97. data/docs/JsonObject.md +18 -0
  98. data/docs/JsonSchema.md +20 -0
  99. data/docs/LLMModelPricing.md +20 -0
  100. data/docs/LLMModelPricingInput.md +22 -0
  101. data/docs/LLMModelPricingOutput.md +22 -0
  102. data/docs/ListCharacters200Response.md +20 -0
  103. data/docs/ListCharacters200ResponseDataInner.md +36 -0
  104. data/docs/ListCharacters200ResponseDataInnerStats.md +18 -0
  105. data/docs/ListModelCompatibilityMapping200Response.md +22 -0
  106. data/docs/ListModelTraits200Response.md +22 -0
  107. data/docs/ListModels200Response.md +22 -0
  108. data/docs/ListModels200ResponseType.md +15 -0
  109. data/docs/ListModelsTypeParameter.md +15 -0
  110. data/docs/ModelResponse.md +24 -8
  111. data/docs/ModelResponseModelSpec.md +32 -11
  112. data/docs/ModelResponseModelSpecCapabilities.md +28 -10
  113. data/docs/ModelResponseModelSpecConstraints.md +26 -0
  114. data/docs/ModelResponseModelSpecPricing.md +24 -0
  115. data/docs/ModelsApi.md +112 -49
  116. data/docs/ObjectsInner.md +49 -0
  117. data/docs/PostApiKeyGenerateWeb3KeyRequest.md +30 -0
  118. data/docs/PreviewApi.md +36 -14
  119. data/docs/SimpleGenerateImage200Response.md +20 -0
  120. data/docs/SimpleGenerateImage200ResponseDataInner.md +20 -0
  121. data/docs/SimpleGenerateImage200ResponseDataInnerAnyOf.md +18 -0
  122. data/docs/SimpleGenerateImage200ResponseDataInnerAnyOf1.md +18 -0
  123. data/docs/SimpleGenerateImageRequest.md +36 -14
  124. data/docs/SpeechApi.md +40 -19
  125. data/docs/SystemMessage.md +22 -0
  126. data/docs/SystemMessageContent.md +15 -0
  127. data/docs/Text.md +20 -0
  128. data/docs/TextModelConstraints.md +20 -0
  129. data/docs/TextModelConstraintsTemperature.md +18 -0
  130. data/docs/TextModelConstraintsTopP.md +18 -0
  131. data/docs/ToolCall.md +18 -5
  132. data/docs/ToolCallFunction.md +22 -0
  133. data/docs/ToolMessage.md +28 -0
  134. data/docs/UpscaleImageRequest.md +24 -8
  135. data/docs/UpscaleImageRequestEnhance.md +15 -0
  136. data/docs/UserMessage.md +20 -0
  137. data/docs/UserMessageContent.md +15 -0
  138. data/git_push.sh +11 -9
  139. data/lib/venice_client/api/api_keys_api.rb +122 -65
  140. data/lib/venice_client/api/audio_api.rb +26 -14
  141. data/lib/venice_client/api/billing_api.rb +46 -23
  142. data/lib/venice_client/api/characters_api.rb +20 -11
  143. data/lib/venice_client/api/chat_api.rb +28 -16
  144. data/lib/venice_client/api/embeddings_api.rb +34 -22
  145. data/lib/venice_client/api/image_api.rb +146 -119
  146. data/lib/venice_client/api/models_api.rb +62 -37
  147. data/lib/venice_client/api/preview_api.rb +20 -11
  148. data/lib/venice_client/api/speech_api.rb +26 -14
  149. data/lib/venice_client/api_client.rb +99 -94
  150. data/lib/venice_client/api_error.rb +7 -5
  151. data/lib/venice_client/configuration.rb +129 -24
  152. data/lib/venice_client/models/assistant_message.rb +304 -0
  153. data/lib/venice_client/models/assistant_message_content.rb +104 -0
  154. data/lib/venice_client/models/audio_model_pricing.rb +238 -0
  155. data/lib/venice_client/models/audio_model_pricing_input.rb +292 -0
  156. data/lib/venice_client/models/billing_usage_request.rb +99 -38
  157. data/lib/venice_client/models/billing_usage_response.rb +68 -30
  158. data/lib/venice_client/models/chat_completion_request.rb +389 -61
  159. data/lib/venice_client/models/chat_completion_request_messages_inner.rb +106 -0
  160. data/lib/venice_client/models/chat_completion_request_response_format.rb +106 -0
  161. data/lib/venice_client/models/chat_completion_request_stop.rb +105 -0
  162. data/lib/venice_client/models/chat_completion_request_stream_options.rb +43 -29
  163. data/lib/venice_client/models/chat_completion_request_tool_choice.rb +104 -0
  164. data/lib/venice_client/models/chat_completion_request_tool_choice_any_of.rb +263 -0
  165. data/lib/venice_client/models/chat_completion_request_tool_choice_any_of_function.rb +237 -0
  166. data/lib/venice_client/models/chat_completion_request_venice_parameters.rb +63 -37
  167. data/lib/venice_client/models/{inline_response_200_8.rb → create_api_key200_response.rb} +70 -32
  168. data/lib/venice_client/models/{inline_response_200_8_data.rb → create_api_key200_response_data.rb} +92 -43
  169. data/lib/venice_client/models/{api_keys_body.rb → create_api_key_request.rb} +65 -38
  170. data/lib/venice_client/models/create_api_key_request_expires_at.rb +104 -0
  171. data/lib/venice_client/models/{inline_response_200.rb → create_chat_completion200_response.rb} +120 -42
  172. data/lib/venice_client/models/{inline_response_200_choices.rb → create_chat_completion200_response_choices_inner.rb} +82 -44
  173. data/lib/venice_client/models/{inline_response_200_logprobs.rb → create_chat_completion200_response_choices_inner_logprobs.rb} +72 -34
  174. data/lib/venice_client/models/{inline_response_200_logprobs_top_logprobs.rb → create_chat_completion200_response_choices_inner_logprobs_top_logprobs_inner.rb} +71 -33
  175. data/lib/venice_client/models/create_chat_completion200_response_choices_inner_message.rb +104 -0
  176. data/lib/venice_client/models/{inline_response_200_usage.rb → create_chat_completion200_response_usage.rb} +83 -33
  177. data/lib/venice_client/models/{inline_response_200_venice_parameters.rb → create_chat_completion200_response_venice_parameters.rb} +131 -40
  178. data/lib/venice_client/models/{inline_response_200_venice_parameters_web_search_citations.rb → create_chat_completion200_response_venice_parameters_web_search_citations_inner.rb} +72 -34
  179. data/lib/venice_client/models/{inline_response_400.rb → create_chat_completion400_response.rb} +57 -31
  180. data/lib/venice_client/models/{inline_response_401.rb → create_chat_completion401_response.rb} +57 -31
  181. data/lib/venice_client/models/{inline_response_402.rb → create_chat_completion402_response.rb} +57 -31
  182. data/lib/venice_client/models/create_chat_completion415_response.rb +238 -0
  183. data/lib/venice_client/models/create_chat_completion429_response.rb +238 -0
  184. data/lib/venice_client/models/create_chat_completion500_response.rb +238 -0
  185. data/lib/venice_client/models/create_chat_completion503_response.rb +238 -0
  186. data/lib/venice_client/models/create_chat_completion504_response.rb +238 -0
  187. data/lib/venice_client/models/{inline_response_200_14.rb → create_embedding200_response.rb} +88 -36
  188. data/lib/venice_client/models/{inline_response_200_14_data.rb → create_embedding200_response_data_inner.rb} +75 -35
  189. data/lib/venice_client/models/{inline_response_200_14_usage.rb → create_embedding200_response_usage.rb} +70 -32
  190. data/lib/venice_client/models/create_embedding_request_schema.rb +92 -37
  191. data/lib/venice_client/models/create_embedding_request_schema_input.rb +107 -0
  192. data/lib/venice_client/models/create_embedding_request_schema_model.rb +104 -0
  193. data/lib/venice_client/models/{inline_response_403.rb → create_speech403_response.rb} +57 -31
  194. data/lib/venice_client/models/create_speech_request_schema.rb +112 -40
  195. data/lib/venice_client/models/{inline_response_200_12.rb → delete_api_key200_response.rb} +58 -46
  196. data/lib/venice_client/models/edit_image_request.rb +260 -0
  197. data/lib/venice_client/models/{inline_response_200_1.rb → generate_image200_response.rb} +83 -33
  198. data/lib/venice_client/models/{inline_response_200_1_timing.rb → generate_image200_response_timing.rb} +96 -34
  199. data/lib/venice_client/models/generate_image_request.rb +289 -46
  200. data/lib/venice_client/models/get_api_key_generate_web3_key200_response.rb +263 -0
  201. data/lib/venice_client/models/{inline_response_200_12_data.rb → get_api_key_generate_web3_key200_response_data.rb} +57 -31
  202. data/lib/venice_client/models/{inline_response_200_13.rb → get_api_key_rate_limit_logs200_response.rb} +63 -34
  203. data/lib/venice_client/models/{inline_response_200_11_data.rb → get_api_key_rate_limit_logs200_response_data_inner.rb} +107 -35
  204. data/lib/venice_client/models/{inline_response_200_10.rb → get_api_key_rate_limits200_response.rb} +57 -31
  205. data/lib/venice_client/models/{inline_response_200_10_data.rb → get_api_key_rate_limits200_response_data.rb} +112 -41
  206. data/lib/venice_client/models/{inline_response_200_10_data_api_tier.rb → get_api_key_rate_limits200_response_data_api_tier.rb} +71 -33
  207. data/lib/venice_client/models/{inline_response_200_10_data_balances.rb → get_api_key_rate_limits200_response_data_balances.rb} +60 -36
  208. data/lib/venice_client/models/{inline_response_200_10_data_rate_limits_1.rb → get_api_key_rate_limits200_response_data_rate_limits_inner.rb} +58 -32
  209. data/lib/venice_client/models/{inline_response_200_10_data_rate_limits.rb → get_api_key_rate_limits200_response_data_rate_limits_inner_rate_limits_inner.rb} +70 -32
  210. data/lib/venice_client/models/{inline_response_200_7.rb → get_api_keys200_response.rb} +62 -34
  211. data/lib/venice_client/models/{inline_response_200_7_data.rb → get_api_keys200_response_data_inner.rb} +99 -56
  212. data/lib/venice_client/models/get_api_keys200_response_data_inner_consumption_limits.rb +287 -0
  213. data/lib/venice_client/models/{inline_response_200_7_usage.rb → get_api_keys200_response_data_inner_usage.rb} +57 -31
  214. data/lib/venice_client/models/get_api_keys200_response_data_inner_usage_trailing_seven_days.rb +292 -0
  215. data/lib/venice_client/models/{inline_response_200_15.rb → get_billing_usage200_response.rb} +70 -32
  216. data/lib/venice_client/models/{billing_usage_response_data.rb → get_billing_usage200_response_data_inner.rb} +131 -45
  217. data/lib/venice_client/models/{billing_usage_response_inference_details.rb → get_billing_usage200_response_data_inner_inference_details.rb} +56 -54
  218. data/lib/venice_client/models/{billing_usage_response_pagination.rb → get_billing_usage200_response_pagination.rb} +96 -34
  219. data/lib/venice_client/models/image_model_constraints.rb +292 -0
  220. data/lib/venice_client/models/image_model_constraints_steps.rb +265 -0
  221. data/lib/venice_client/models/image_model_pricing.rb +264 -0
  222. data/lib/venice_client/models/image_model_pricing_generation.rb +292 -0
  223. data/lib/venice_client/models/image_model_pricing_upscale.rb +263 -0
  224. data/lib/venice_client/models/image_model_pricing_upscale2x.rb +292 -0
  225. data/lib/venice_client/models/image_model_pricing_upscale4x.rb +292 -0
  226. data/lib/venice_client/models/{inline_response_200_3.rb → image_styles_get200_response.rb} +62 -34
  227. data/lib/venice_client/models/{inline_response_415.rb → image_styles_get500_response.rb} +57 -31
  228. data/lib/venice_client/models/image_url.rb +288 -0
  229. data/lib/venice_client/models/{inline_response_200_7_usage_trailing_seven_days.rb → image_url_object.rb} +68 -56
  230. data/lib/venice_client/models/json_object.rb +262 -0
  231. data/lib/venice_client/models/json_schema.rb +290 -0
  232. data/lib/venice_client/models/{inline_response_200_11.rb → list_characters200_response.rb} +62 -35
  233. data/lib/venice_client/models/{inline_response_200_13_data.rb → list_characters200_response_data_inner.rb} +154 -50
  234. data/lib/venice_client/models/{inline_response_200_13_stats.rb → list_characters200_response_data_inner_stats.rb} +57 -31
  235. data/lib/venice_client/models/{inline_response_200_6.rb → list_model_compatibility_mapping200_response.rb} +79 -37
  236. data/lib/venice_client/models/{inline_response_200_5.rb → list_model_traits200_response.rb} +79 -37
  237. data/lib/venice_client/models/{inline_response_200_4.rb → list_models200_response.rb} +75 -36
  238. data/lib/venice_client/models/list_models200_response_type.rb +104 -0
  239. data/lib/venice_client/models/list_models_type_parameter.rb +104 -0
  240. data/lib/venice_client/models/llm_model_pricing.rb +264 -0
  241. data/lib/venice_client/models/llm_model_pricing_input.rb +292 -0
  242. data/lib/venice_client/models/llm_model_pricing_output.rb +292 -0
  243. data/lib/venice_client/models/model_response.rb +84 -40
  244. data/lib/venice_client/models/model_response_model_spec.rb +62 -40
  245. data/lib/venice_client/models/model_response_model_spec_capabilities.rb +138 -38
  246. data/lib/venice_client/models/model_response_model_spec_constraints.rb +105 -0
  247. data/lib/venice_client/models/model_response_model_spec_pricing.rb +106 -0
  248. data/lib/venice_client/models/objects_inner.rb +105 -0
  249. data/lib/venice_client/models/{api_keys_generate_web3_key_body.rb → post_api_key_generate_web3_key_request.rb} +91 -40
  250. data/lib/venice_client/models/{inline_response_200_2.rb → simple_generate_image200_response.rb} +73 -35
  251. data/lib/venice_client/models/simple_generate_image200_response_data_inner.rb +104 -0
  252. data/lib/venice_client/models/simple_generate_image200_response_data_inner_any_of.rb +238 -0
  253. data/lib/venice_client/models/{api_keys_consumption_limit.rb → simple_generate_image200_response_data_inner_any_of1.rb} +67 -57
  254. data/lib/venice_client/models/simple_generate_image_request.rb +146 -54
  255. data/lib/venice_client/models/system_message.rb +297 -0
  256. data/lib/venice_client/models/system_message_content.rb +104 -0
  257. data/lib/venice_client/models/text.rb +298 -0
  258. data/lib/venice_client/models/text_model_constraints.rb +264 -0
  259. data/lib/venice_client/models/text_model_constraints_temperature.rb +238 -0
  260. data/lib/venice_client/models/text_model_constraints_top_p.rb +238 -0
  261. data/lib/venice_client/models/tool_call.rb +57 -31
  262. data/lib/venice_client/models/{chat_completion_request_function.rb → tool_call_function.rb} +59 -33
  263. data/lib/venice_client/models/tool_message.rb +344 -0
  264. data/lib/venice_client/models/upscale_image_request.rb +146 -40
  265. data/lib/venice_client/models/upscale_image_request_enhance.rb +105 -0
  266. data/lib/venice_client/models/user_message.rb +288 -0
  267. data/lib/venice_client/models/user_message_content.rb +104 -0
  268. data/lib/venice_client/version.rb +5 -4
  269. data/lib/venice_client.rb +134 -108
  270. data/openapitools.json +7 -0
  271. data/spec/api/api_keys_api_spec.rb +43 -41
  272. data/spec/api/audio_api_spec.rb +18 -16
  273. data/spec/api/billing_api_spec.rb +23 -21
  274. data/spec/api/characters_api_spec.rb +17 -15
  275. data/spec/api/chat_api_spec.rb +19 -17
  276. data/spec/api/embeddings_api_spec.rb +19 -17
  277. data/spec/api/image_api_spec.rb +43 -46
  278. data/spec/api/models_api_spec.rb +28 -26
  279. data/spec/api/preview_api_spec.rb +17 -15
  280. data/spec/api/speech_api_spec.rb +18 -16
  281. data/spec/models/assistant_message_content_spec.rb +21 -0
  282. data/spec/models/assistant_message_spec.rb +64 -0
  283. data/spec/models/audio_model_pricing_input_spec.rb +48 -0
  284. data/spec/models/audio_model_pricing_spec.rb +36 -0
  285. data/spec/models/billing_usage_request_spec.rb +19 -23
  286. data/spec/models/billing_usage_response_spec.rb +12 -16
  287. data/spec/models/chat_completion_request_messages_inner_spec.rb +21 -0
  288. data/spec/models/chat_completion_request_response_format_spec.rb +32 -0
  289. data/spec/models/chat_completion_request_spec.rb +74 -71
  290. data/spec/models/chat_completion_request_stop_spec.rb +21 -0
  291. data/spec/models/chat_completion_request_stream_options_spec.rb +11 -15
  292. data/spec/models/chat_completion_request_tool_choice_any_of_function_spec.rb +36 -0
  293. data/spec/models/chat_completion_request_tool_choice_any_of_spec.rb +42 -0
  294. data/spec/models/chat_completion_request_tool_choice_spec.rb +21 -0
  295. data/spec/models/chat_completion_request_venice_parameters_spec.rb +35 -32
  296. data/spec/models/create_api_key200_response_data_spec.rb +70 -0
  297. data/spec/models/create_api_key200_response_spec.rb +42 -0
  298. data/spec/models/create_api_key_request_expires_at_spec.rb +21 -0
  299. data/spec/models/create_api_key_request_spec.rb +58 -0
  300. data/spec/models/create_chat_completion200_response_choices_inner_logprobs_spec.rb +54 -0
  301. data/spec/models/create_chat_completion200_response_choices_inner_logprobs_top_logprobs_inner_spec.rb +48 -0
  302. data/spec/models/create_chat_completion200_response_choices_inner_message_spec.rb +21 -0
  303. data/spec/models/create_chat_completion200_response_choices_inner_spec.rb +68 -0
  304. data/spec/models/create_chat_completion200_response_spec.rb +82 -0
  305. data/spec/models/create_chat_completion200_response_usage_spec.rb +54 -0
  306. data/spec/models/create_chat_completion200_response_venice_parameters_spec.rb +82 -0
  307. data/spec/models/create_chat_completion200_response_venice_parameters_web_search_citations_inner_spec.rb +54 -0
  308. data/spec/models/create_chat_completion400_response_spec.rb +42 -0
  309. data/spec/models/create_chat_completion401_response_spec.rb +36 -0
  310. data/spec/models/create_chat_completion402_response_spec.rb +36 -0
  311. data/spec/models/create_chat_completion415_response_spec.rb +36 -0
  312. data/spec/models/create_chat_completion429_response_spec.rb +36 -0
  313. data/spec/models/create_chat_completion500_response_spec.rb +36 -0
  314. data/spec/models/create_chat_completion503_response_spec.rb +36 -0
  315. data/spec/models/create_chat_completion504_response_spec.rb +36 -0
  316. data/spec/models/create_embedding200_response_data_inner_spec.rb +52 -0
  317. data/spec/models/create_embedding200_response_spec.rb +58 -0
  318. data/spec/models/create_embedding200_response_usage_spec.rb +42 -0
  319. data/spec/models/create_embedding_request_schema_input_spec.rb +21 -0
  320. data/spec/models/create_embedding_request_schema_model_spec.rb +21 -0
  321. data/spec/models/create_embedding_request_schema_spec.rb +16 -20
  322. data/spec/models/create_speech403_response_spec.rb +36 -0
  323. data/spec/models/create_speech_request_schema_spec.rb +31 -34
  324. data/spec/models/delete_api_key200_response_spec.rb +36 -0
  325. data/spec/models/edit_image_request_spec.rb +42 -0
  326. data/spec/models/generate_image200_response_spec.rb +54 -0
  327. data/spec/models/generate_image200_response_timing_spec.rb +54 -0
  328. data/spec/models/generate_image_request_spec.rb +27 -31
  329. data/spec/models/get_api_key_generate_web3_key200_response_data_spec.rb +36 -0
  330. data/spec/models/get_api_key_generate_web3_key200_response_spec.rb +42 -0
  331. data/spec/models/get_api_key_rate_limit_logs200_response_data_inner_spec.rb +60 -0
  332. data/spec/models/get_api_key_rate_limit_logs200_response_spec.rb +46 -0
  333. data/spec/models/get_api_key_rate_limits200_response_data_api_tier_spec.rb +42 -0
  334. data/spec/models/get_api_key_rate_limits200_response_data_balances_spec.rb +48 -0
  335. data/spec/models/get_api_key_rate_limits200_response_data_rate_limits_inner_rate_limits_inner_spec.rb +42 -0
  336. data/spec/models/get_api_key_rate_limits200_response_data_rate_limits_inner_spec.rb +42 -0
  337. data/spec/models/get_api_key_rate_limits200_response_data_spec.rb +66 -0
  338. data/spec/models/get_api_key_rate_limits200_response_spec.rb +36 -0
  339. data/spec/models/get_api_keys200_response_data_inner_consumption_limits_spec.rb +48 -0
  340. data/spec/models/get_api_keys200_response_data_inner_spec.rb +88 -0
  341. data/spec/models/get_api_keys200_response_data_inner_usage_spec.rb +36 -0
  342. data/spec/models/get_api_keys200_response_data_inner_usage_trailing_seven_days_spec.rb +48 -0
  343. data/spec/models/get_api_keys200_response_spec.rb +46 -0
  344. data/spec/models/get_billing_usage200_response_data_inner_inference_details_spec.rb +54 -0
  345. data/spec/models/get_billing_usage200_response_data_inner_spec.rb +82 -0
  346. data/spec/models/get_billing_usage200_response_pagination_spec.rb +54 -0
  347. data/spec/models/get_billing_usage200_response_spec.rb +42 -0
  348. data/spec/models/image_model_constraints_spec.rb +48 -0
  349. data/spec/models/image_model_constraints_steps_spec.rb +42 -0
  350. data/spec/models/image_model_pricing_generation_spec.rb +48 -0
  351. data/spec/models/image_model_pricing_spec.rb +42 -0
  352. data/spec/models/image_model_pricing_upscale2x_spec.rb +48 -0
  353. data/spec/models/image_model_pricing_upscale4x_spec.rb +48 -0
  354. data/spec/models/image_model_pricing_upscale_spec.rb +42 -0
  355. data/spec/models/image_styles_get200_response_spec.rb +46 -0
  356. data/spec/models/image_styles_get500_response_spec.rb +36 -0
  357. data/spec/models/image_url_object_spec.rb +36 -0
  358. data/spec/models/image_url_spec.rb +46 -0
  359. data/spec/models/json_object_spec.rb +40 -0
  360. data/spec/models/json_schema_spec.rb +46 -0
  361. data/spec/models/list_characters200_response_data_inner_spec.rb +90 -0
  362. data/spec/models/list_characters200_response_data_inner_stats_spec.rb +36 -0
  363. data/spec/models/list_characters200_response_spec.rb +46 -0
  364. data/spec/models/list_model_compatibility_mapping200_response_spec.rb +52 -0
  365. data/spec/models/list_model_traits200_response_spec.rb +52 -0
  366. data/spec/models/list_models200_response_spec.rb +52 -0
  367. data/spec/models/list_models200_response_type_spec.rb +21 -0
  368. data/spec/models/list_models_type_parameter_spec.rb +21 -0
  369. data/spec/models/llm_model_pricing_input_spec.rb +48 -0
  370. data/spec/models/llm_model_pricing_output_spec.rb +48 -0
  371. data/spec/models/llm_model_pricing_spec.rb +42 -0
  372. data/spec/models/model_response_model_spec_capabilities_spec.rb +33 -36
  373. data/spec/models/model_response_model_spec_constraints_spec.rb +21 -0
  374. data/spec/models/model_response_model_spec_pricing_spec.rb +21 -0
  375. data/spec/models/model_response_model_spec_spec.rb +40 -37
  376. data/spec/models/model_response_spec.rb +32 -35
  377. data/spec/models/objects_inner_spec.rb +32 -0
  378. data/spec/models/post_api_key_generate_web3_key_request_spec.rb +76 -0
  379. data/spec/models/simple_generate_image200_response_data_inner_any_of1_spec.rb +36 -0
  380. data/spec/models/simple_generate_image200_response_data_inner_any_of_spec.rb +36 -0
  381. data/spec/models/simple_generate_image200_response_data_inner_spec.rb +21 -0
  382. data/spec/models/simple_generate_image200_response_spec.rb +42 -0
  383. data/spec/models/simple_generate_image_request_spec.rb +29 -33
  384. data/spec/models/system_message_content_spec.rb +21 -0
  385. data/spec/models/system_message_spec.rb +52 -0
  386. data/spec/models/text_model_constraints_spec.rb +42 -0
  387. data/spec/models/text_model_constraints_temperature_spec.rb +36 -0
  388. data/spec/models/text_model_constraints_top_p_spec.rb +36 -0
  389. data/spec/models/text_spec.rb +46 -0
  390. data/spec/models/tool_call_function_spec.rb +48 -0
  391. data/spec/models/tool_call_spec.rb +22 -25
  392. data/spec/models/tool_message_spec.rb +70 -0
  393. data/spec/models/upscale_image_request_enhance_spec.rb +21 -0
  394. data/spec/models/upscale_image_request_spec.rb +28 -31
  395. data/spec/models/user_message_content_spec.rb +21 -0
  396. data/spec/models/user_message_spec.rb +46 -0
  397. data/spec/spec_helper.rb +7 -6
  398. data/swagger.yaml +4791 -0
  399. data/update.sh +9 -0
  400. metadata +440 -356
  401. data/docs/AnyOfChatCompletionRequestMessagesItems.md +0 -6
  402. data/docs/AnyOfChatCompletionRequestStop.md +0 -6
  403. data/docs/AnyOfChatCompletionRequestToolChoice.md +0 -6
  404. data/docs/AnyOfCreateEmbeddingRequestSchemaInput.md +0 -6
  405. data/docs/AnyOfCreateEmbeddingRequestSchemaModel.md +0 -6
  406. data/docs/AnyOfModelResponseModelSpecConstraints.md +0 -6
  407. data/docs/AnyOfModelResponseModelSpecPricing.md +0 -6
  408. data/docs/AnyOfUpscaleImageRequestEnhance.md +0 -6
  409. data/docs/AnyOfUpscaleImageRequestImage.md +0 -6
  410. data/docs/AnyOfapiKeysBodyExpiresAt.md +0 -6
  411. data/docs/AnyOfapiKeysConsumptionLimitUsd.md +0 -6
  412. data/docs/AnyOfapiKeysConsumptionLimitVcu.md +0 -6
  413. data/docs/AnyOfapiKeysGenerateWeb3KeyBodyExpiresAt.md +0 -6
  414. data/docs/AnyOfinlineResponse2002DataItems.md +0 -6
  415. data/docs/AnyOfinlineResponse2004Type.md +0 -6
  416. data/docs/AnyOfinlineResponse2005Type.md +0 -6
  417. data/docs/AnyOfinlineResponse2006Type.md +0 -6
  418. data/docs/AnyOfinlineResponse200ChoicesMessage.md +0 -6
  419. data/docs/AnyOfinlineResponse200PromptLogprobs.md +0 -6
  420. data/docs/ApiKeysBody.md +0 -10
  421. data/docs/ApiKeysConsumptionLimit.md +0 -8
  422. data/docs/ApiKeysGenerateWeb3KeyBody.md +0 -13
  423. data/docs/BillingUsageResponseData.md +0 -14
  424. data/docs/BillingUsageResponseInferenceDetails.md +0 -10
  425. data/docs/BillingUsageResponsePagination.md +0 -10
  426. data/docs/ChatCompletionRequestFunction.md +0 -9
  427. data/docs/InlineResponse200.md +0 -14
  428. data/docs/InlineResponse2001.md +0 -10
  429. data/docs/InlineResponse20010.md +0 -7
  430. data/docs/InlineResponse20010Data.md +0 -12
  431. data/docs/InlineResponse20010DataApiTier.md +0 -8
  432. data/docs/InlineResponse20010DataBalances.md +0 -8
  433. data/docs/InlineResponse20010DataRateLimits.md +0 -8
  434. data/docs/InlineResponse20010DataRateLimits1.md +0 -8
  435. data/docs/InlineResponse20011.md +0 -8
  436. data/docs/InlineResponse20011Data.md +0 -11
  437. data/docs/InlineResponse20012.md +0 -8
  438. data/docs/InlineResponse20012Data.md +0 -7
  439. data/docs/InlineResponse20013.md +0 -8
  440. data/docs/InlineResponse20013Data.md +0 -16
  441. data/docs/InlineResponse20013Stats.md +0 -7
  442. data/docs/InlineResponse20014.md +0 -10
  443. data/docs/InlineResponse20014Data.md +0 -9
  444. data/docs/InlineResponse20014Usage.md +0 -8
  445. data/docs/InlineResponse20015.md +0 -8
  446. data/docs/InlineResponse2001Timing.md +0 -10
  447. data/docs/InlineResponse2002.md +0 -8
  448. data/docs/InlineResponse2003.md +0 -8
  449. data/docs/InlineResponse2004.md +0 -9
  450. data/docs/InlineResponse2005.md +0 -9
  451. data/docs/InlineResponse2006.md +0 -9
  452. data/docs/InlineResponse2007.md +0 -8
  453. data/docs/InlineResponse2007Data.md +0 -15
  454. data/docs/InlineResponse2007Usage.md +0 -7
  455. data/docs/InlineResponse2007UsageTrailingSevenDays.md +0 -8
  456. data/docs/InlineResponse2008.md +0 -8
  457. data/docs/InlineResponse2008Data.md +0 -12
  458. data/docs/InlineResponse2009.md +0 -7
  459. data/docs/InlineResponse200Choices.md +0 -11
  460. data/docs/InlineResponse200Logprobs.md +0 -10
  461. data/docs/InlineResponse200LogprobsTopLogprobs.md +0 -9
  462. data/docs/InlineResponse200Usage.md +0 -10
  463. data/docs/InlineResponse200VeniceParameters.md +0 -13
  464. data/docs/InlineResponse200VeniceParametersWebSearchCitations.md +0 -10
  465. data/docs/InlineResponse400.md +0 -8
  466. data/docs/InlineResponse401.md +0 -7
  467. data/docs/InlineResponse402.md +0 -7
  468. data/docs/InlineResponse403.md +0 -7
  469. data/docs/InlineResponse415.md +0 -7
  470. data/docs/InlineResponse429.md +0 -7
  471. data/docs/InlineResponse500.md +0 -7
  472. data/docs/InlineResponse5001.md +0 -7
  473. data/docs/InlineResponse503.md +0 -7
  474. data/docs/ModelCompatibilitySchema.md +0 -6
  475. data/docs/ModelTraitSchema.md +0 -6
  476. data/docs/OneOfChatCompletionRequestResponseFormat.md +0 -6
  477. data/docs/Type.md +0 -6
  478. data/lib/venice_client/models/any_of_chat_completion_request_messages_items.rb +0 -197
  479. data/lib/venice_client/models/any_of_chat_completion_request_stop.rb +0 -197
  480. data/lib/venice_client/models/any_of_chat_completion_request_tool_choice.rb +0 -197
  481. data/lib/venice_client/models/any_of_create_embedding_request_schema_input.rb +0 -197
  482. data/lib/venice_client/models/any_of_create_embedding_request_schema_model.rb +0 -197
  483. data/lib/venice_client/models/any_of_model_response_model_spec_constraints.rb +0 -197
  484. data/lib/venice_client/models/any_of_model_response_model_spec_pricing.rb +0 -197
  485. data/lib/venice_client/models/any_of_upscale_image_request_enhance.rb +0 -197
  486. data/lib/venice_client/models/any_of_upscale_image_request_image.rb +0 -197
  487. data/lib/venice_client/models/any_ofapi_keys_body_expires_at.rb +0 -197
  488. data/lib/venice_client/models/any_ofapi_keys_consumption_limit_usd.rb +0 -197
  489. data/lib/venice_client/models/any_ofapi_keys_consumption_limit_vcu.rb +0 -195
  490. data/lib/venice_client/models/any_ofapi_keys_generate_web3_key_body_expires_at.rb +0 -197
  491. data/lib/venice_client/models/any_ofinline_response_200_2_data_items.rb +0 -197
  492. data/lib/venice_client/models/any_ofinline_response_200_4_type.rb +0 -197
  493. data/lib/venice_client/models/any_ofinline_response_200_5_type.rb +0 -197
  494. data/lib/venice_client/models/any_ofinline_response_200_6_type.rb +0 -197
  495. data/lib/venice_client/models/any_ofinline_response_200_choices_message.rb +0 -197
  496. data/lib/venice_client/models/any_ofinline_response_200_prompt_logprobs.rb +0 -197
  497. data/lib/venice_client/models/inline_response_200_9.rb +0 -211
  498. data/lib/venice_client/models/inline_response_429.rb +0 -212
  499. data/lib/venice_client/models/inline_response_500.rb +0 -212
  500. data/lib/venice_client/models/inline_response_500_1.rb +0 -212
  501. data/lib/venice_client/models/inline_response_503.rb +0 -212
  502. data/lib/venice_client/models/model_compatibility_schema.rb +0 -202
  503. data/lib/venice_client/models/model_trait_schema.rb +0 -200
  504. data/lib/venice_client/models/one_of_chat_completion_request_response_format.rb +0 -197
  505. data/lib/venice_client/models/type.rb +0 -198
  506. data/spec/api_client_spec.rb +0 -225
  507. data/spec/base_object_spec.rb +0 -109
  508. data/spec/configuration_spec.rb +0 -41
  509. data/spec/models/any_of_chat_completion_request_messages_items_spec.rb +0 -34
  510. data/spec/models/any_of_chat_completion_request_stop_spec.rb +0 -34
  511. data/spec/models/any_of_chat_completion_request_tool_choice_spec.rb +0 -34
  512. data/spec/models/any_of_create_embedding_request_schema_input_spec.rb +0 -34
  513. data/spec/models/any_of_create_embedding_request_schema_model_spec.rb +0 -34
  514. data/spec/models/any_of_model_response_model_spec_constraints_spec.rb +0 -34
  515. data/spec/models/any_of_model_response_model_spec_pricing_spec.rb +0 -34
  516. data/spec/models/any_of_upscale_image_request_enhance_spec.rb +0 -34
  517. data/spec/models/any_of_upscale_image_request_image_spec.rb +0 -34
  518. data/spec/models/any_ofapi_keys_body_expires_at_spec.rb +0 -34
  519. data/spec/models/any_ofapi_keys_consumption_limit_usd_spec.rb +0 -34
  520. data/spec/models/any_ofapi_keys_consumption_limit_vcu_spec.rb +0 -34
  521. data/spec/models/any_ofapi_keys_generate_web3_key_body_expires_at_spec.rb +0 -34
  522. data/spec/models/any_ofinline_response_200_2_data_items_spec.rb +0 -34
  523. data/spec/models/any_ofinline_response_200_4_type_spec.rb +0 -34
  524. data/spec/models/any_ofinline_response_200_5_type_spec.rb +0 -34
  525. data/spec/models/any_ofinline_response_200_6_type_spec.rb +0 -34
  526. data/spec/models/any_ofinline_response_200_choices_message_spec.rb +0 -34
  527. data/spec/models/any_ofinline_response_200_prompt_logprobs_spec.rb +0 -34
  528. data/spec/models/api_keys_body_spec.rb +0 -61
  529. data/spec/models/api_keys_consumption_limit_spec.rb +0 -46
  530. data/spec/models/api_keys_generate_web3_key_body_spec.rb +0 -80
  531. data/spec/models/billing_usage_response_data_spec.rb +0 -86
  532. data/spec/models/billing_usage_response_inference_details_spec.rb +0 -57
  533. data/spec/models/billing_usage_response_pagination_spec.rb +0 -58
  534. data/spec/models/chat_completion_request_function_spec.rb +0 -52
  535. data/spec/models/inline_response_200_10_data_api_tier_spec.rb +0 -45
  536. data/spec/models/inline_response_200_10_data_balances_spec.rb +0 -45
  537. data/spec/models/inline_response_200_10_data_rate_limits_1_spec.rb +0 -45
  538. data/spec/models/inline_response_200_10_data_rate_limits_spec.rb +0 -46
  539. data/spec/models/inline_response_200_10_data_spec.rb +0 -69
  540. data/spec/models/inline_response_200_10_spec.rb +0 -40
  541. data/spec/models/inline_response_200_11_data_spec.rb +0 -64
  542. data/spec/models/inline_response_200_11_spec.rb +0 -50
  543. data/spec/models/inline_response_200_12_data_spec.rb +0 -39
  544. data/spec/models/inline_response_200_12_spec.rb +0 -46
  545. data/spec/models/inline_response_200_13_data_spec.rb +0 -93
  546. data/spec/models/inline_response_200_13_spec.rb +0 -49
  547. data/spec/models/inline_response_200_13_stats_spec.rb +0 -40
  548. data/spec/models/inline_response_200_14_data_spec.rb +0 -55
  549. data/spec/models/inline_response_200_14_spec.rb +0 -61
  550. data/spec/models/inline_response_200_14_usage_spec.rb +0 -45
  551. data/spec/models/inline_response_200_15_spec.rb +0 -45
  552. data/spec/models/inline_response_200_1_spec.rb +0 -57
  553. data/spec/models/inline_response_200_1_timing_spec.rb +0 -58
  554. data/spec/models/inline_response_200_2_spec.rb +0 -46
  555. data/spec/models/inline_response_200_3_spec.rb +0 -50
  556. data/spec/models/inline_response_200_4_spec.rb +0 -55
  557. data/spec/models/inline_response_200_5_spec.rb +0 -55
  558. data/spec/models/inline_response_200_6_spec.rb +0 -55
  559. data/spec/models/inline_response_200_7_data_spec.rb +0 -91
  560. data/spec/models/inline_response_200_7_spec.rb +0 -50
  561. data/spec/models/inline_response_200_7_usage_spec.rb +0 -39
  562. data/spec/models/inline_response_200_7_usage_trailing_seven_days_spec.rb +0 -45
  563. data/spec/models/inline_response_200_8_data_spec.rb +0 -73
  564. data/spec/models/inline_response_200_8_spec.rb +0 -45
  565. data/spec/models/inline_response_200_9_spec.rb +0 -39
  566. data/spec/models/inline_response_200_choices_spec.rb +0 -72
  567. data/spec/models/inline_response_200_logprobs_spec.rb +0 -57
  568. data/spec/models/inline_response_200_logprobs_top_logprobs_spec.rb +0 -51
  569. data/spec/models/inline_response_200_spec.rb +0 -85
  570. data/spec/models/inline_response_200_usage_spec.rb +0 -57
  571. data/spec/models/inline_response_200_venice_parameters_spec.rb +0 -80
  572. data/spec/models/inline_response_200_venice_parameters_web_search_citations_spec.rb +0 -57
  573. data/spec/models/inline_response_400_spec.rb +0 -45
  574. data/spec/models/inline_response_401_spec.rb +0 -39
  575. data/spec/models/inline_response_402_spec.rb +0 -39
  576. data/spec/models/inline_response_403_spec.rb +0 -40
  577. data/spec/models/inline_response_415_spec.rb +0 -40
  578. data/spec/models/inline_response_429_spec.rb +0 -39
  579. data/spec/models/inline_response_500_1_spec.rb +0 -40
  580. data/spec/models/inline_response_500_spec.rb +0 -39
  581. data/spec/models/inline_response_503_spec.rb +0 -40
  582. data/spec/models/model_compatibility_schema_spec.rb +0 -34
  583. data/spec/models/model_trait_schema_spec.rb +0 -34
  584. data/spec/models/one_of_chat_completion_request_response_format_spec.rb +0 -34
  585. data/spec/models/type_spec.rb +0 -34
  586. data/venice_client.gemspec +0 -38
@@ -3,17 +3,19 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- OpenAPI spec version: 20250521.233203
6
+ The version of the OpenAPI document: 20250709.013306
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.68
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module VeniceClient
15
- # The request body for creating a new API key. API key creation is rate limited to 20 requests per minute and a maximum of 500 active API keys per user.
16
- class ApiKeysBody
17
+ # The request body for creating a new API key. API key creation is rate limited to 20 requests per minute and a maximum of 500 active API keys per user. VCU is being deprecated in favor of Diem. Please update your API calls to use Diem instead.
18
+ class CreateApiKeyRequest
17
19
  # The API Key type. Admin keys have full access to the API while inference keys are only able to call inference endpoints.
18
20
  attr_accessor :api_key_type
19
21
 
@@ -22,7 +24,6 @@ module VeniceClient
22
24
  # The API Key description
23
25
  attr_accessor :description
24
26
 
25
- # The API Key expiration date. If not provided, the key will not expire.
26
27
  attr_accessor :expires_at
27
28
 
28
29
  class EnumAttributeValidator
@@ -57,13 +58,23 @@ module VeniceClient
57
58
  }
58
59
  end
59
60
 
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ acceptable_attribute_map.values
69
+ end
70
+
60
71
  # Attribute type mapping.
61
72
  def self.openapi_types
62
73
  {
63
- :'api_key_type' => :'Object',
64
- :'consumption_limit' => :'Object',
65
- :'description' => :'Object',
66
- :'expires_at' => :'Object'
74
+ :'api_key_type' => :'String',
75
+ :'consumption_limit' => :'GetApiKeys200ResponseDataInnerConsumptionLimits',
76
+ :'description' => :'String',
77
+ :'expires_at' => :'CreateApiKeyRequestExpiresAt'
67
78
  }
68
79
  end
69
80
 
@@ -72,24 +83,27 @@ module VeniceClient
72
83
  Set.new([
73
84
  ])
74
85
  end
75
-
86
+
76
87
  # Initializes the object
77
88
  # @param [Hash] attributes Model attributes in the form of hash
78
89
  def initialize(attributes = {})
79
90
  if (!attributes.is_a?(Hash))
80
- fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::ApiKeysBody` initialize method"
91
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::CreateApiKeyRequest` initialize method"
81
92
  end
82
93
 
83
94
  # check to see if the attribute exists and convert string to symbol for hash key
95
+ acceptable_attribute_map = self.class.acceptable_attribute_map
84
96
  attributes = attributes.each_with_object({}) { |(k, v), h|
85
- if (!self.class.attribute_map.key?(k.to_sym))
86
- fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::ApiKeysBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ if (!acceptable_attribute_map.key?(k.to_sym))
98
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::CreateApiKeyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
99
  end
88
100
  h[k.to_sym] = v
89
101
  }
90
102
 
91
103
  if attributes.key?(:'api_key_type')
92
104
  self.api_key_type = attributes[:'api_key_type']
105
+ else
106
+ self.api_key_type = nil
93
107
  end
94
108
 
95
109
  if attributes.key?(:'consumption_limit')
@@ -98,6 +112,8 @@ module VeniceClient
98
112
 
99
113
  if attributes.key?(:'description')
100
114
  self.description = attributes[:'description']
115
+ else
116
+ self.description = nil
101
117
  end
102
118
 
103
119
  if attributes.key?(:'expires_at')
@@ -108,6 +124,7 @@ module VeniceClient
108
124
  # Show invalid properties with the reasons. Usually used together with valid?
109
125
  # @return Array for valid properties with the reasons
110
126
  def list_invalid_properties
127
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
128
  invalid_properties = Array.new
112
129
  if @api_key_type.nil?
113
130
  invalid_properties.push('invalid value for "api_key_type", api_key_type cannot be nil.')
@@ -123,8 +140,9 @@ module VeniceClient
123
140
  # Check to see if the all the properties in the model are valid
124
141
  # @return true if the model is valid
125
142
  def valid?
143
+ warn '[DEPRECATED] the `valid?` method is obsolete'
126
144
  return false if @api_key_type.nil?
127
- api_key_type_validator = EnumAttributeValidator.new('Object', ['INFERENCE', 'ADMIN'])
145
+ api_key_type_validator = EnumAttributeValidator.new('String', ["INFERENCE", "ADMIN"])
128
146
  return false unless api_key_type_validator.valid?(@api_key_type)
129
147
  return false if @description.nil?
130
148
  true
@@ -133,13 +151,23 @@ module VeniceClient
133
151
  # Custom attribute writer method checking allowed values (enum).
134
152
  # @param [Object] api_key_type Object to be assigned
135
153
  def api_key_type=(api_key_type)
136
- validator = EnumAttributeValidator.new('Object', ['INFERENCE', 'ADMIN'])
154
+ validator = EnumAttributeValidator.new('String', ["INFERENCE", "ADMIN"])
137
155
  unless validator.valid?(api_key_type)
138
156
  fail ArgumentError, "invalid value for \"api_key_type\", must be one of #{validator.allowable_values}."
139
157
  end
140
158
  @api_key_type = api_key_type
141
159
  end
142
160
 
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] description Value to be assigned
163
+ def description=(description)
164
+ if description.nil?
165
+ fail ArgumentError, 'description cannot be nil'
166
+ end
167
+
168
+ @description = description
169
+ end
170
+
143
171
  # Checks equality by comparing each attribute.
144
172
  # @param [Object] Object to be compared
145
173
  def ==(o)
@@ -167,39 +195,33 @@ module VeniceClient
167
195
  # @param [Hash] attributes Model attributes in the form of hash
168
196
  # @return [Object] Returns the model itself
169
197
  def self.build_from_hash(attributes)
170
- new.build_from_hash(attributes)
171
- end
172
-
173
- # Builds the object from hash
174
- # @param [Hash] attributes Model attributes in the form of hash
175
- # @return [Object] Returns the model itself
176
- def build_from_hash(attributes)
177
198
  return nil unless attributes.is_a?(Hash)
178
- self.class.openapi_types.each_pair do |key, type|
179
- if type =~ /\AArray<(.*)>/i
199
+ attributes = attributes.transform_keys(&:to_sym)
200
+ transformed_hash = {}
201
+ openapi_types.each_pair do |key, type|
202
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
203
+ transformed_hash["#{key}"] = nil
204
+ elsif type =~ /\AArray<(.*)>/i
180
205
  # check to ensure the input is an array given that the attribute
181
206
  # is documented as an array but the input is not
182
- if attributes[self.class.attribute_map[key]].is_a?(Array)
183
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
207
+ if attributes[attribute_map[key]].is_a?(Array)
208
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
184
209
  end
185
- elsif !attributes[self.class.attribute_map[key]].nil?
186
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
187
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
188
- self.send("#{key}=", nil)
210
+ elsif !attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
189
212
  end
190
213
  end
191
-
192
- self
214
+ new(transformed_hash)
193
215
  end
194
216
 
195
217
  # Deserializes the data based on type
196
218
  # @param string type Data type
197
219
  # @param string value Value to be deserialized
198
220
  # @return [Object] Deserialized data
199
- def _deserialize(type, value)
221
+ def self._deserialize(type, value)
200
222
  case type.to_sym
201
- when :DateTime
202
- DateTime.parse(value)
223
+ when :Time
224
+ Time.parse(value)
203
225
  when :Date
204
226
  Date.parse(value)
205
227
  when :String
@@ -229,7 +251,9 @@ module VeniceClient
229
251
  end
230
252
  end
231
253
  else # model
232
- VeniceClient.const_get(type).build_from_hash(value)
254
+ # models (e.g. Pet) or oneOf
255
+ klass = VeniceClient.const_get(type)
256
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
233
257
  end
234
258
  end
235
259
 
@@ -277,5 +301,8 @@ module VeniceClient
277
301
  else
278
302
  value
279
303
  end
280
- end end
304
+ end
305
+
306
+ end
307
+
281
308
  end
@@ -0,0 +1,104 @@
1
+ =begin
2
+ #Venice.ai API
3
+
4
+ #The Venice.ai API.
5
+
6
+ The version of the OpenAPI document: 20250709.013306
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
+ # The API Key expiration date. If not provided, the key will not expire.
18
+ module CreateApiKeyRequestExpiresAt
19
+ class << self
20
+ # List of class defined in anyOf (OpenAPI v3)
21
+ def openapi_any_of
22
+ [
23
+ :'String'
24
+ ]
25
+ end
26
+
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of anyOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of anyOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
34
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
35
+ # - TODO: scalar values are de facto behaving as if they were nullable.
36
+ # - TODO: logging when debugging is set.
37
+ openapi_any_of.each do |klass|
38
+ begin
39
+ next if klass == :AnyType # "nullable: true"
40
+ typed_data = find_and_cast_into_type(klass, data)
41
+ return typed_data if typed_data
42
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
43
+ end
44
+ end
45
+
46
+ openapi_any_of.include?(:AnyType) ? data : nil
47
+ end
48
+
49
+ private
50
+
51
+ SchemaMismatchError = Class.new(StandardError)
52
+
53
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
54
+ def find_and_cast_into_type(klass, data)
55
+ return if data.nil?
56
+
57
+ case klass.to_s
58
+ when 'Boolean'
59
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
60
+ when 'Float'
61
+ return data if data.instance_of?(Float)
62
+ when 'Integer'
63
+ return data if data.instance_of?(Integer)
64
+ when 'Time'
65
+ return Time.parse(data)
66
+ when 'Date'
67
+ return Date.iso8601(data)
68
+ when 'String'
69
+ return data if data.instance_of?(String)
70
+ when 'Object' # "type: object"
71
+ return data if data.instance_of?(Hash)
72
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
73
+ if data.instance_of?(Array)
74
+ sub_type = Regexp.last_match[:sub_type]
75
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
76
+ end
77
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
78
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
79
+ sub_type = Regexp.last_match[:sub_type]
80
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
81
+ end
82
+ else # model
83
+ const = VeniceClient.const_get(klass)
84
+ if const
85
+ if const.respond_to?(:openapi_any_of) # nested anyOf model
86
+ model = const.build(data)
87
+ return model if model
88
+ else
89
+ # raise if data contains keys that are not known to the model
90
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
91
+ model = const.build_from_hash(data)
92
+ return model if model
93
+ end
94
+ end
95
+ end
96
+
97
+ raise # if no match by now, raise
98
+ rescue
99
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
100
+ end
101
+ end
102
+ end
103
+
104
+ end
@@ -3,16 +3,18 @@
3
3
 
4
4
  #The Venice.ai API.
5
5
 
6
- OpenAPI spec version: 20250521.233203
6
+ The version of the OpenAPI document: 20250709.013306
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.68
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module VeniceClient
15
- class InlineResponse200
17
+ class CreateChatCompletion200Response
16
18
  # A list of chat completion choices. Can be more than one if n is greater than 1.
17
19
  attr_accessor :choices
18
20
 
@@ -28,7 +30,6 @@ module VeniceClient
28
30
  # The type of the object returned.
29
31
  attr_accessor :object
30
32
 
31
- # Log probability information for the prompt.
32
33
  attr_accessor :prompt_logprobs
33
34
 
34
35
  attr_accessor :usage
@@ -71,37 +72,49 @@ module VeniceClient
71
72
  }
72
73
  end
73
74
 
75
+ # Returns attribute mapping this model knows about
76
+ def self.acceptable_attribute_map
77
+ attribute_map
78
+ end
79
+
80
+ # Returns all the JSON keys this model knows about
81
+ def self.acceptable_attributes
82
+ acceptable_attribute_map.values
83
+ end
84
+
74
85
  # Attribute type mapping.
75
86
  def self.openapi_types
76
87
  {
77
- :'choices' => :'Object',
78
- :'created' => :'Object',
79
- :'id' => :'Object',
80
- :'model' => :'Object',
81
- :'object' => :'Object',
82
- :'prompt_logprobs' => :'Object',
83
- :'usage' => :'Object',
84
- :'venice_parameters' => :'Object'
88
+ :'choices' => :'Array<CreateChatCompletion200ResponseChoicesInner>',
89
+ :'created' => :'Integer',
90
+ :'id' => :'String',
91
+ :'model' => :'String',
92
+ :'object' => :'String',
93
+ :'prompt_logprobs' => :'Hash<String, Object>',
94
+ :'usage' => :'CreateChatCompletion200ResponseUsage',
95
+ :'venice_parameters' => :'CreateChatCompletion200ResponseVeniceParameters'
85
96
  }
86
97
  end
87
98
 
88
99
  # List of attributes with nullable: true
89
100
  def self.openapi_nullable
90
101
  Set.new([
102
+ :'prompt_logprobs',
91
103
  ])
92
104
  end
93
-
105
+
94
106
  # Initializes the object
95
107
  # @param [Hash] attributes Model attributes in the form of hash
96
108
  def initialize(attributes = {})
97
109
  if (!attributes.is_a?(Hash))
98
- fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::InlineResponse200` initialize method"
110
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::CreateChatCompletion200Response` initialize method"
99
111
  end
100
112
 
101
113
  # check to see if the attribute exists and convert string to symbol for hash key
114
+ acceptable_attribute_map = self.class.acceptable_attribute_map
102
115
  attributes = attributes.each_with_object({}) { |(k, v), h|
103
- if (!self.class.attribute_map.key?(k.to_sym))
104
- fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::InlineResponse200`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
116
+ if (!acceptable_attribute_map.key?(k.to_sym))
117
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::CreateChatCompletion200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
105
118
  end
106
119
  h[k.to_sym] = v
107
120
  }
@@ -110,30 +123,44 @@ module VeniceClient
110
123
  if (value = attributes[:'choices']).is_a?(Array)
111
124
  self.choices = value
112
125
  end
126
+ else
127
+ self.choices = nil
113
128
  end
114
129
 
115
130
  if attributes.key?(:'created')
116
131
  self.created = attributes[:'created']
132
+ else
133
+ self.created = nil
117
134
  end
118
135
 
119
136
  if attributes.key?(:'id')
120
137
  self.id = attributes[:'id']
138
+ else
139
+ self.id = nil
121
140
  end
122
141
 
123
142
  if attributes.key?(:'model')
124
143
  self.model = attributes[:'model']
144
+ else
145
+ self.model = nil
125
146
  end
126
147
 
127
148
  if attributes.key?(:'object')
128
149
  self.object = attributes[:'object']
150
+ else
151
+ self.object = nil
129
152
  end
130
153
 
131
154
  if attributes.key?(:'prompt_logprobs')
132
- self.prompt_logprobs = attributes[:'prompt_logprobs']
155
+ if (value = attributes[:'prompt_logprobs']).is_a?(Hash)
156
+ self.prompt_logprobs = value
157
+ end
133
158
  end
134
159
 
135
160
  if attributes.key?(:'usage')
136
161
  self.usage = attributes[:'usage']
162
+ else
163
+ self.usage = nil
137
164
  end
138
165
 
139
166
  if attributes.key?(:'venice_parameters')
@@ -144,6 +171,7 @@ module VeniceClient
144
171
  # Show invalid properties with the reasons. Usually used together with valid?
145
172
  # @return Array for valid properties with the reasons
146
173
  def list_invalid_properties
174
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
147
175
  invalid_properties = Array.new
148
176
  if @choices.nil?
149
177
  invalid_properties.push('invalid value for "choices", choices cannot be nil.')
@@ -175,27 +203,78 @@ module VeniceClient
175
203
  # Check to see if the all the properties in the model are valid
176
204
  # @return true if the model is valid
177
205
  def valid?
206
+ warn '[DEPRECATED] the `valid?` method is obsolete'
178
207
  return false if @choices.nil?
179
208
  return false if @created.nil?
180
209
  return false if @id.nil?
181
210
  return false if @model.nil?
182
211
  return false if @object.nil?
183
- object_validator = EnumAttributeValidator.new('Object', ['chat.completion'])
212
+ object_validator = EnumAttributeValidator.new('String', ["chat.completion"])
184
213
  return false unless object_validator.valid?(@object)
185
214
  return false if @usage.nil?
186
215
  true
187
216
  end
188
217
 
218
+ # Custom attribute writer method with validation
219
+ # @param [Object] choices Value to be assigned
220
+ def choices=(choices)
221
+ if choices.nil?
222
+ fail ArgumentError, 'choices cannot be nil'
223
+ end
224
+
225
+ @choices = choices
226
+ end
227
+
228
+ # Custom attribute writer method with validation
229
+ # @param [Object] created Value to be assigned
230
+ def created=(created)
231
+ if created.nil?
232
+ fail ArgumentError, 'created cannot be nil'
233
+ end
234
+
235
+ @created = created
236
+ end
237
+
238
+ # Custom attribute writer method with validation
239
+ # @param [Object] id Value to be assigned
240
+ def id=(id)
241
+ if id.nil?
242
+ fail ArgumentError, 'id cannot be nil'
243
+ end
244
+
245
+ @id = id
246
+ end
247
+
248
+ # Custom attribute writer method with validation
249
+ # @param [Object] model Value to be assigned
250
+ def model=(model)
251
+ if model.nil?
252
+ fail ArgumentError, 'model cannot be nil'
253
+ end
254
+
255
+ @model = model
256
+ end
257
+
189
258
  # Custom attribute writer method checking allowed values (enum).
190
259
  # @param [Object] object Object to be assigned
191
260
  def object=(object)
192
- validator = EnumAttributeValidator.new('Object', ['chat.completion'])
261
+ validator = EnumAttributeValidator.new('String', ["chat.completion"])
193
262
  unless validator.valid?(object)
194
263
  fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
195
264
  end
196
265
  @object = object
197
266
  end
198
267
 
268
+ # Custom attribute writer method with validation
269
+ # @param [Object] usage Value to be assigned
270
+ def usage=(usage)
271
+ if usage.nil?
272
+ fail ArgumentError, 'usage cannot be nil'
273
+ end
274
+
275
+ @usage = usage
276
+ end
277
+
199
278
  # Checks equality by comparing each attribute.
200
279
  # @param [Object] Object to be compared
201
280
  def ==(o)
@@ -227,39 +306,33 @@ module VeniceClient
227
306
  # @param [Hash] attributes Model attributes in the form of hash
228
307
  # @return [Object] Returns the model itself
229
308
  def self.build_from_hash(attributes)
230
- new.build_from_hash(attributes)
231
- end
232
-
233
- # Builds the object from hash
234
- # @param [Hash] attributes Model attributes in the form of hash
235
- # @return [Object] Returns the model itself
236
- def build_from_hash(attributes)
237
309
  return nil unless attributes.is_a?(Hash)
238
- self.class.openapi_types.each_pair do |key, type|
239
- if type =~ /\AArray<(.*)>/i
310
+ attributes = attributes.transform_keys(&:to_sym)
311
+ transformed_hash = {}
312
+ openapi_types.each_pair do |key, type|
313
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
314
+ transformed_hash["#{key}"] = nil
315
+ elsif type =~ /\AArray<(.*)>/i
240
316
  # check to ensure the input is an array given that the attribute
241
317
  # is documented as an array but the input is not
242
- if attributes[self.class.attribute_map[key]].is_a?(Array)
243
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
318
+ if attributes[attribute_map[key]].is_a?(Array)
319
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
244
320
  end
245
- elsif !attributes[self.class.attribute_map[key]].nil?
246
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
247
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
248
- self.send("#{key}=", nil)
321
+ elsif !attributes[attribute_map[key]].nil?
322
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
249
323
  end
250
324
  end
251
-
252
- self
325
+ new(transformed_hash)
253
326
  end
254
327
 
255
328
  # Deserializes the data based on type
256
329
  # @param string type Data type
257
330
  # @param string value Value to be deserialized
258
331
  # @return [Object] Deserialized data
259
- def _deserialize(type, value)
332
+ def self._deserialize(type, value)
260
333
  case type.to_sym
261
- when :DateTime
262
- DateTime.parse(value)
334
+ when :Time
335
+ Time.parse(value)
263
336
  when :Date
264
337
  Date.parse(value)
265
338
  when :String
@@ -289,7 +362,9 @@ module VeniceClient
289
362
  end
290
363
  end
291
364
  else # model
292
- VeniceClient.const_get(type).build_from_hash(value)
365
+ # models (e.g. Pet) or oneOf
366
+ klass = VeniceClient.const_get(type)
367
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
293
368
  end
294
369
  end
295
370
 
@@ -337,5 +412,8 @@ module VeniceClient
337
412
  else
338
413
  value
339
414
  end
340
- end end
415
+ end
416
+
417
+ end
418
+
341
419
  end