venice_client 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +510 -0
  4. data/Rakefile +8 -0
  5. data/docs/APIKeysApi.md +334 -0
  6. data/docs/AnyOfChatCompletionRequestMessagesItems.md +6 -0
  7. data/docs/AnyOfChatCompletionRequestStop.md +6 -0
  8. data/docs/AnyOfChatCompletionRequestToolChoice.md +6 -0
  9. data/docs/AnyOfCreateEmbeddingRequestSchemaInput.md +6 -0
  10. data/docs/AnyOfCreateEmbeddingRequestSchemaModel.md +6 -0
  11. data/docs/AnyOfModelResponseModelSpecConstraints.md +6 -0
  12. data/docs/AnyOfModelResponseModelSpecPricing.md +6 -0
  13. data/docs/AnyOfUpscaleImageRequestEnhance.md +6 -0
  14. data/docs/AnyOfUpscaleImageRequestImage.md +6 -0
  15. data/docs/AnyOfapiKeysBodyExpiresAt.md +6 -0
  16. data/docs/AnyOfapiKeysConsumptionLimitUsd.md +6 -0
  17. data/docs/AnyOfapiKeysConsumptionLimitVcu.md +6 -0
  18. data/docs/AnyOfapiKeysGenerateWeb3KeyBodyExpiresAt.md +6 -0
  19. data/docs/AnyOfinlineResponse2002DataItems.md +6 -0
  20. data/docs/AnyOfinlineResponse2004Type.md +6 -0
  21. data/docs/AnyOfinlineResponse2005Type.md +6 -0
  22. data/docs/AnyOfinlineResponse2006Type.md +6 -0
  23. data/docs/AnyOfinlineResponse200ChoicesMessage.md +6 -0
  24. data/docs/AnyOfinlineResponse200PromptLogprobs.md +6 -0
  25. data/docs/ApiKeysBody.md +10 -0
  26. data/docs/ApiKeysConsumptionLimit.md +8 -0
  27. data/docs/ApiKeysGenerateWeb3KeyBody.md +13 -0
  28. data/docs/AudioApi.md +58 -0
  29. data/docs/BillingApi.md +70 -0
  30. data/docs/BillingUsageRequest.md +12 -0
  31. data/docs/BillingUsageResponse.md +8 -0
  32. data/docs/BillingUsageResponseData.md +14 -0
  33. data/docs/BillingUsageResponseInferenceDetails.md +10 -0
  34. data/docs/BillingUsageResponsePagination.md +10 -0
  35. data/docs/CharactersApi.md +52 -0
  36. data/docs/ChatApi.md +60 -0
  37. data/docs/ChatCompletionRequest.md +32 -0
  38. data/docs/ChatCompletionRequestFunction.md +9 -0
  39. data/docs/ChatCompletionRequestStreamOptions.md +7 -0
  40. data/docs/ChatCompletionRequestVeniceParameters.md +12 -0
  41. data/docs/CreateEmbeddingRequestSchema.md +11 -0
  42. data/docs/CreateSpeechRequestSchema.md +12 -0
  43. data/docs/EmbeddingsApi.md +60 -0
  44. data/docs/GenerateImageRequest.md +22 -0
  45. data/docs/ImageApi.md +270 -0
  46. data/docs/InlineResponse200.md +14 -0
  47. data/docs/InlineResponse2001.md +10 -0
  48. data/docs/InlineResponse20010.md +7 -0
  49. data/docs/InlineResponse20010Data.md +12 -0
  50. data/docs/InlineResponse20010DataApiTier.md +8 -0
  51. data/docs/InlineResponse20010DataBalances.md +8 -0
  52. data/docs/InlineResponse20010DataRateLimits.md +8 -0
  53. data/docs/InlineResponse20010DataRateLimits1.md +8 -0
  54. data/docs/InlineResponse20011.md +8 -0
  55. data/docs/InlineResponse20011Data.md +11 -0
  56. data/docs/InlineResponse20012.md +8 -0
  57. data/docs/InlineResponse20012Data.md +7 -0
  58. data/docs/InlineResponse20013.md +8 -0
  59. data/docs/InlineResponse20013Data.md +16 -0
  60. data/docs/InlineResponse20013Stats.md +7 -0
  61. data/docs/InlineResponse20014.md +10 -0
  62. data/docs/InlineResponse20014Data.md +9 -0
  63. data/docs/InlineResponse20014Usage.md +8 -0
  64. data/docs/InlineResponse20015.md +8 -0
  65. data/docs/InlineResponse2001Timing.md +10 -0
  66. data/docs/InlineResponse2002.md +8 -0
  67. data/docs/InlineResponse2003.md +8 -0
  68. data/docs/InlineResponse2004.md +9 -0
  69. data/docs/InlineResponse2005.md +9 -0
  70. data/docs/InlineResponse2006.md +9 -0
  71. data/docs/InlineResponse2007.md +8 -0
  72. data/docs/InlineResponse2007Data.md +15 -0
  73. data/docs/InlineResponse2007Usage.md +7 -0
  74. data/docs/InlineResponse2007UsageTrailingSevenDays.md +8 -0
  75. data/docs/InlineResponse2008.md +8 -0
  76. data/docs/InlineResponse2008Data.md +12 -0
  77. data/docs/InlineResponse2009.md +7 -0
  78. data/docs/InlineResponse200Choices.md +11 -0
  79. data/docs/InlineResponse200Logprobs.md +10 -0
  80. data/docs/InlineResponse200LogprobsTopLogprobs.md +9 -0
  81. data/docs/InlineResponse200Usage.md +10 -0
  82. data/docs/InlineResponse200VeniceParameters.md +13 -0
  83. data/docs/InlineResponse200VeniceParametersWebSearchCitations.md +10 -0
  84. data/docs/InlineResponse400.md +8 -0
  85. data/docs/InlineResponse401.md +7 -0
  86. data/docs/InlineResponse402.md +7 -0
  87. data/docs/InlineResponse403.md +7 -0
  88. data/docs/InlineResponse415.md +7 -0
  89. data/docs/InlineResponse429.md +7 -0
  90. data/docs/InlineResponse500.md +7 -0
  91. data/docs/InlineResponse5001.md +7 -0
  92. data/docs/InlineResponse503.md +7 -0
  93. data/docs/ModelCompatibilitySchema.md +6 -0
  94. data/docs/ModelResponse.md +12 -0
  95. data/docs/ModelResponseModelSpec.md +15 -0
  96. data/docs/ModelResponseModelSpecCapabilities.md +14 -0
  97. data/docs/ModelTraitSchema.md +6 -0
  98. data/docs/ModelsApi.md +160 -0
  99. data/docs/OneOfChatCompletionRequestResponseFormat.md +6 -0
  100. data/docs/PreviewApi.md +52 -0
  101. data/docs/SimpleGenerateImageRequest.md +18 -0
  102. data/docs/SpeechApi.md +58 -0
  103. data/docs/ToolCall.md +9 -0
  104. data/docs/Type.md +6 -0
  105. data/docs/UpscaleImageRequest.md +12 -0
  106. data/git_push.sh +55 -0
  107. data/lib/venice_client/api/api_keys_api.rb +381 -0
  108. data/lib/venice_client/api/audio_api.rb +74 -0
  109. data/lib/venice_client/api/billing_api.rb +97 -0
  110. data/lib/venice_client/api/characters_api.rb +70 -0
  111. data/lib/venice_client/api/chat_api.rb +77 -0
  112. data/lib/venice_client/api/embeddings_api.rb +81 -0
  113. data/lib/venice_client/api/image_api.rb +314 -0
  114. data/lib/venice_client/api/models_api.rb +185 -0
  115. data/lib/venice_client/api/preview_api.rb +70 -0
  116. data/lib/venice_client/api/speech_api.rb +74 -0
  117. data/lib/venice_client/api_client.rb +388 -0
  118. data/lib/venice_client/api_error.rb +56 -0
  119. data/lib/venice_client/configuration.rb +204 -0
  120. data/lib/venice_client/models/any_of_chat_completion_request_messages_items.rb +197 -0
  121. data/lib/venice_client/models/any_of_chat_completion_request_stop.rb +197 -0
  122. data/lib/venice_client/models/any_of_chat_completion_request_tool_choice.rb +197 -0
  123. data/lib/venice_client/models/any_of_create_embedding_request_schema_input.rb +197 -0
  124. data/lib/venice_client/models/any_of_create_embedding_request_schema_model.rb +197 -0
  125. data/lib/venice_client/models/any_of_model_response_model_spec_constraints.rb +197 -0
  126. data/lib/venice_client/models/any_of_model_response_model_spec_pricing.rb +197 -0
  127. data/lib/venice_client/models/any_of_upscale_image_request_enhance.rb +197 -0
  128. data/lib/venice_client/models/any_of_upscale_image_request_image.rb +197 -0
  129. data/lib/venice_client/models/any_ofapi_keys_body_expires_at.rb +197 -0
  130. data/lib/venice_client/models/any_ofapi_keys_consumption_limit_usd.rb +197 -0
  131. data/lib/venice_client/models/any_ofapi_keys_consumption_limit_vcu.rb +195 -0
  132. data/lib/venice_client/models/any_ofapi_keys_generate_web3_key_body_expires_at.rb +197 -0
  133. data/lib/venice_client/models/any_ofinline_response_200_2_data_items.rb +197 -0
  134. data/lib/venice_client/models/any_ofinline_response_200_4_type.rb +197 -0
  135. data/lib/venice_client/models/any_ofinline_response_200_5_type.rb +197 -0
  136. data/lib/venice_client/models/any_ofinline_response_200_6_type.rb +197 -0
  137. data/lib/venice_client/models/any_ofinline_response_200_choices_message.rb +197 -0
  138. data/lib/venice_client/models/any_ofinline_response_200_prompt_logprobs.rb +197 -0
  139. data/lib/venice_client/models/api_keys_body.rb +281 -0
  140. data/lib/venice_client/models/api_keys_consumption_limit.rb +228 -0
  141. data/lib/venice_client/models/api_keys_generate_web3_key_body.rb +322 -0
  142. data/lib/venice_client/models/billing_usage_request.rb +309 -0
  143. data/lib/venice_client/models/billing_usage_response.rb +228 -0
  144. data/lib/venice_client/models/billing_usage_response_data.rb +350 -0
  145. data/lib/venice_client/models/billing_usage_response_inference_details.rb +262 -0
  146. data/lib/venice_client/models/billing_usage_response_pagination.rb +253 -0
  147. data/lib/venice_client/models/chat_completion_request.rb +483 -0
  148. data/lib/venice_client/models/chat_completion_request_function.rb +231 -0
  149. data/lib/venice_client/models/chat_completion_request_stream_options.rb +207 -0
  150. data/lib/venice_client/models/chat_completion_request_venice_parameters.rb +302 -0
  151. data/lib/venice_client/models/create_embedding_request_schema.rb +294 -0
  152. data/lib/venice_client/models/create_speech_request_schema.rb +331 -0
  153. data/lib/venice_client/models/generate_image_request.rb +420 -0
  154. data/lib/venice_client/models/inline_response_200.rb +341 -0
  155. data/lib/venice_client/models/inline_response_200_1.rb +254 -0
  156. data/lib/venice_client/models/inline_response_200_10.rb +211 -0
  157. data/lib/venice_client/models/inline_response_200_10_data.rb +287 -0
  158. data/lib/venice_client/models/inline_response_200_10_data_api_tier.rb +227 -0
  159. data/lib/venice_client/models/inline_response_200_10_data_balances.rb +217 -0
  160. data/lib/venice_client/models/inline_response_200_10_data_rate_limits.rb +227 -0
  161. data/lib/venice_client/models/inline_response_200_10_data_rate_limits_1.rb +223 -0
  162. data/lib/venice_client/models/inline_response_200_11.rb +262 -0
  163. data/lib/venice_client/models/inline_response_200_11_data.rb +274 -0
  164. data/lib/venice_client/models/inline_response_200_12.rb +225 -0
  165. data/lib/venice_client/models/inline_response_200_12_data.rb +212 -0
  166. data/lib/venice_client/models/inline_response_200_13.rb +261 -0
  167. data/lib/venice_client/models/inline_response_200_13_data.rb +350 -0
  168. data/lib/venice_client/models/inline_response_200_13_stats.rb +212 -0
  169. data/lib/venice_client/models/inline_response_200_14.rb +292 -0
  170. data/lib/venice_client/models/inline_response_200_14_data.rb +278 -0
  171. data/lib/venice_client/models/inline_response_200_14_usage.rb +228 -0
  172. data/lib/venice_client/models/inline_response_200_15.rb +228 -0
  173. data/lib/venice_client/models/inline_response_200_1_timing.rb +257 -0
  174. data/lib/venice_client/models/inline_response_200_2.rb +228 -0
  175. data/lib/venice_client/models/inline_response_200_3.rb +262 -0
  176. data/lib/venice_client/models/inline_response_200_4.rb +277 -0
  177. data/lib/venice_client/models/inline_response_200_5.rb +274 -0
  178. data/lib/venice_client/models/inline_response_200_6.rb +274 -0
  179. data/lib/venice_client/models/inline_response_200_7.rb +262 -0
  180. data/lib/venice_client/models/inline_response_200_7_data.rb +357 -0
  181. data/lib/venice_client/models/inline_response_200_7_usage.rb +211 -0
  182. data/lib/venice_client/models/inline_response_200_7_usage_trailing_seven_days.rb +227 -0
  183. data/lib/venice_client/models/inline_response_200_8.rb +225 -0
  184. data/lib/venice_client/models/inline_response_200_8_data.rb +316 -0
  185. data/lib/venice_client/models/inline_response_200_9.rb +211 -0
  186. data/lib/venice_client/models/inline_response_200_choices.rb +312 -0
  187. data/lib/venice_client/models/inline_response_200_logprobs.rb +251 -0
  188. data/lib/venice_client/models/inline_response_200_logprobs_top_logprobs.rb +236 -0
  189. data/lib/venice_client/models/inline_response_200_usage.rb +253 -0
  190. data/lib/venice_client/models/inline_response_200_venice_parameters.rb +329 -0
  191. data/lib/venice_client/models/inline_response_200_venice_parameters_web_search_citations.rb +243 -0
  192. data/lib/venice_client/models/inline_response_400.rb +222 -0
  193. data/lib/venice_client/models/inline_response_401.rb +212 -0
  194. data/lib/venice_client/models/inline_response_402.rb +212 -0
  195. data/lib/venice_client/models/inline_response_403.rb +212 -0
  196. data/lib/venice_client/models/inline_response_415.rb +212 -0
  197. data/lib/venice_client/models/inline_response_429.rb +212 -0
  198. data/lib/venice_client/models/inline_response_500.rb +212 -0
  199. data/lib/venice_client/models/inline_response_500_1.rb +212 -0
  200. data/lib/venice_client/models/inline_response_503.rb +212 -0
  201. data/lib/venice_client/models/model_compatibility_schema.rb +202 -0
  202. data/lib/venice_client/models/model_response.rb +340 -0
  203. data/lib/venice_client/models/model_response_model_spec.rb +292 -0
  204. data/lib/venice_client/models/model_response_model_spec_capabilities.rb +352 -0
  205. data/lib/venice_client/models/model_trait_schema.rb +200 -0
  206. data/lib/venice_client/models/one_of_chat_completion_request_response_format.rb +197 -0
  207. data/lib/venice_client/models/simple_generate_image_request.rb +456 -0
  208. data/lib/venice_client/models/tool_call.rb +230 -0
  209. data/lib/venice_client/models/type.rb +198 -0
  210. data/lib/venice_client/models/upscale_image_request.rb +270 -0
  211. data/lib/venice_client/version.rb +14 -0
  212. data/lib/venice_client.rb +139 -0
  213. data/spec/api/api_keys_api_spec.rb +113 -0
  214. data/spec/api/audio_api_spec.rb +45 -0
  215. data/spec/api/billing_api_spec.rb +51 -0
  216. data/spec/api/characters_api_spec.rb +44 -0
  217. data/spec/api/chat_api_spec.rb +46 -0
  218. data/spec/api/embeddings_api_spec.rb +46 -0
  219. data/spec/api/image_api_spec.rb +99 -0
  220. data/spec/api/models_api_spec.rb +69 -0
  221. data/spec/api/preview_api_spec.rb +44 -0
  222. data/spec/api/speech_api_spec.rb +45 -0
  223. data/spec/api_client_spec.rb +225 -0
  224. data/spec/base_object_spec.rb +109 -0
  225. data/spec/configuration_spec.rb +41 -0
  226. data/spec/models/any_of_chat_completion_request_messages_items_spec.rb +34 -0
  227. data/spec/models/any_of_chat_completion_request_stop_spec.rb +34 -0
  228. data/spec/models/any_of_chat_completion_request_tool_choice_spec.rb +34 -0
  229. data/spec/models/any_of_create_embedding_request_schema_input_spec.rb +34 -0
  230. data/spec/models/any_of_create_embedding_request_schema_model_spec.rb +34 -0
  231. data/spec/models/any_of_model_response_model_spec_constraints_spec.rb +34 -0
  232. data/spec/models/any_of_model_response_model_spec_pricing_spec.rb +34 -0
  233. data/spec/models/any_of_upscale_image_request_enhance_spec.rb +34 -0
  234. data/spec/models/any_of_upscale_image_request_image_spec.rb +34 -0
  235. data/spec/models/any_ofapi_keys_body_expires_at_spec.rb +34 -0
  236. data/spec/models/any_ofapi_keys_consumption_limit_usd_spec.rb +34 -0
  237. data/spec/models/any_ofapi_keys_consumption_limit_vcu_spec.rb +34 -0
  238. data/spec/models/any_ofapi_keys_generate_web3_key_body_expires_at_spec.rb +34 -0
  239. data/spec/models/any_ofinline_response_200_2_data_items_spec.rb +34 -0
  240. data/spec/models/any_ofinline_response_200_4_type_spec.rb +34 -0
  241. data/spec/models/any_ofinline_response_200_5_type_spec.rb +34 -0
  242. data/spec/models/any_ofinline_response_200_6_type_spec.rb +34 -0
  243. data/spec/models/any_ofinline_response_200_choices_message_spec.rb +34 -0
  244. data/spec/models/any_ofinline_response_200_prompt_logprobs_spec.rb +34 -0
  245. data/spec/models/api_keys_body_spec.rb +61 -0
  246. data/spec/models/api_keys_consumption_limit_spec.rb +46 -0
  247. data/spec/models/api_keys_generate_web3_key_body_spec.rb +80 -0
  248. data/spec/models/billing_usage_request_spec.rb +78 -0
  249. data/spec/models/billing_usage_response_data_spec.rb +86 -0
  250. data/spec/models/billing_usage_response_inference_details_spec.rb +57 -0
  251. data/spec/models/billing_usage_response_pagination_spec.rb +58 -0
  252. data/spec/models/billing_usage_response_spec.rb +46 -0
  253. data/spec/models/chat_completion_request_function_spec.rb +52 -0
  254. data/spec/models/chat_completion_request_spec.rb +189 -0
  255. data/spec/models/chat_completion_request_stream_options_spec.rb +40 -0
  256. data/spec/models/chat_completion_request_venice_parameters_spec.rb +73 -0
  257. data/spec/models/create_embedding_request_schema_spec.rb +68 -0
  258. data/spec/models/create_speech_request_schema_spec.rb +81 -0
  259. data/spec/models/generate_image_request_spec.rb +134 -0
  260. data/spec/models/inline_response_200_10_data_api_tier_spec.rb +45 -0
  261. data/spec/models/inline_response_200_10_data_balances_spec.rb +45 -0
  262. data/spec/models/inline_response_200_10_data_rate_limits_1_spec.rb +45 -0
  263. data/spec/models/inline_response_200_10_data_rate_limits_spec.rb +46 -0
  264. data/spec/models/inline_response_200_10_data_spec.rb +69 -0
  265. data/spec/models/inline_response_200_10_spec.rb +40 -0
  266. data/spec/models/inline_response_200_11_data_spec.rb +64 -0
  267. data/spec/models/inline_response_200_11_spec.rb +50 -0
  268. data/spec/models/inline_response_200_12_data_spec.rb +39 -0
  269. data/spec/models/inline_response_200_12_spec.rb +46 -0
  270. data/spec/models/inline_response_200_13_data_spec.rb +93 -0
  271. data/spec/models/inline_response_200_13_spec.rb +49 -0
  272. data/spec/models/inline_response_200_13_stats_spec.rb +40 -0
  273. data/spec/models/inline_response_200_14_data_spec.rb +55 -0
  274. data/spec/models/inline_response_200_14_spec.rb +61 -0
  275. data/spec/models/inline_response_200_14_usage_spec.rb +45 -0
  276. data/spec/models/inline_response_200_15_spec.rb +45 -0
  277. data/spec/models/inline_response_200_1_spec.rb +57 -0
  278. data/spec/models/inline_response_200_1_timing_spec.rb +58 -0
  279. data/spec/models/inline_response_200_2_spec.rb +46 -0
  280. data/spec/models/inline_response_200_3_spec.rb +50 -0
  281. data/spec/models/inline_response_200_4_spec.rb +55 -0
  282. data/spec/models/inline_response_200_5_spec.rb +55 -0
  283. data/spec/models/inline_response_200_6_spec.rb +55 -0
  284. data/spec/models/inline_response_200_7_data_spec.rb +91 -0
  285. data/spec/models/inline_response_200_7_spec.rb +50 -0
  286. data/spec/models/inline_response_200_7_usage_spec.rb +39 -0
  287. data/spec/models/inline_response_200_7_usage_trailing_seven_days_spec.rb +45 -0
  288. data/spec/models/inline_response_200_8_data_spec.rb +73 -0
  289. data/spec/models/inline_response_200_8_spec.rb +45 -0
  290. data/spec/models/inline_response_200_9_spec.rb +39 -0
  291. data/spec/models/inline_response_200_choices_spec.rb +72 -0
  292. data/spec/models/inline_response_200_logprobs_spec.rb +57 -0
  293. data/spec/models/inline_response_200_logprobs_top_logprobs_spec.rb +51 -0
  294. data/spec/models/inline_response_200_spec.rb +85 -0
  295. data/spec/models/inline_response_200_usage_spec.rb +57 -0
  296. data/spec/models/inline_response_200_venice_parameters_spec.rb +80 -0
  297. data/spec/models/inline_response_200_venice_parameters_web_search_citations_spec.rb +57 -0
  298. data/spec/models/inline_response_400_spec.rb +45 -0
  299. data/spec/models/inline_response_401_spec.rb +39 -0
  300. data/spec/models/inline_response_402_spec.rb +39 -0
  301. data/spec/models/inline_response_403_spec.rb +40 -0
  302. data/spec/models/inline_response_415_spec.rb +40 -0
  303. data/spec/models/inline_response_429_spec.rb +39 -0
  304. data/spec/models/inline_response_500_1_spec.rb +40 -0
  305. data/spec/models/inline_response_500_spec.rb +39 -0
  306. data/spec/models/inline_response_503_spec.rb +40 -0
  307. data/spec/models/model_compatibility_schema_spec.rb +34 -0
  308. data/spec/models/model_response_model_spec_capabilities_spec.rb +85 -0
  309. data/spec/models/model_response_model_spec_spec.rb +87 -0
  310. data/spec/models/model_response_spec.rb +81 -0
  311. data/spec/models/model_trait_schema_spec.rb +34 -0
  312. data/spec/models/one_of_chat_completion_request_response_format_spec.rb +34 -0
  313. data/spec/models/simple_generate_image_request_spec.rb +134 -0
  314. data/spec/models/tool_call_spec.rb +51 -0
  315. data/spec/models/type_spec.rb +34 -0
  316. data/spec/models/upscale_image_request_spec.rb +69 -0
  317. data/spec/spec_helper.rb +110 -0
  318. data/venice_client.gemspec +38 -0
  319. metadata +522 -0
@@ -0,0 +1,329 @@
1
+ =begin
2
+ #Venice.ai API
3
+
4
+ #The Venice.ai API.
5
+
6
+ OpenAPI spec version: 20250521.233203
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.68
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module VeniceClient
15
+ # Unique parameters to Venice's API implementation.
16
+ class InlineResponse200VeniceParameters
17
+ # Did the request enable web search?
18
+ attr_accessor :enable_web_search
19
+
20
+ # Did the request enable web citations?
21
+ attr_accessor :enable_web_citations
22
+
23
+ # Did the request include the Venice system prompt?
24
+ attr_accessor :include_venice_system_prompt
25
+
26
+ # The character slug of a public Venice character.
27
+ attr_accessor :character_slug
28
+
29
+ # Did the request strip thinking response?
30
+ attr_accessor :strip_thinking_response
31
+
32
+ # Did the request disable thinking?
33
+ attr_accessor :disable_thinking
34
+
35
+ # Citations from web search results.
36
+ attr_accessor :web_search_citations
37
+
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'enable_web_search' => :'enable_web_search',
64
+ :'enable_web_citations' => :'enable_web_citations',
65
+ :'include_venice_system_prompt' => :'include_venice_system_prompt',
66
+ :'character_slug' => :'character_slug',
67
+ :'strip_thinking_response' => :'strip_thinking_response',
68
+ :'disable_thinking' => :'disable_thinking',
69
+ :'web_search_citations' => :'web_search_citations'
70
+ }
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'enable_web_search' => :'Object',
77
+ :'enable_web_citations' => :'Object',
78
+ :'include_venice_system_prompt' => :'Object',
79
+ :'character_slug' => :'Object',
80
+ :'strip_thinking_response' => :'Object',
81
+ :'disable_thinking' => :'Object',
82
+ :'web_search_citations' => :'Object'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ ])
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::InlineResponse200VeniceParameters` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ attributes = attributes.each_with_object({}) { |(k, v), h|
101
+ if (!self.class.attribute_map.key?(k.to_sym))
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::InlineResponse200VeniceParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
103
+ end
104
+ h[k.to_sym] = v
105
+ }
106
+
107
+ if attributes.key?(:'enable_web_search')
108
+ self.enable_web_search = attributes[:'enable_web_search']
109
+ end
110
+
111
+ if attributes.key?(:'enable_web_citations')
112
+ self.enable_web_citations = attributes[:'enable_web_citations']
113
+ end
114
+
115
+ if attributes.key?(:'include_venice_system_prompt')
116
+ self.include_venice_system_prompt = attributes[:'include_venice_system_prompt']
117
+ end
118
+
119
+ if attributes.key?(:'character_slug')
120
+ self.character_slug = attributes[:'character_slug']
121
+ end
122
+
123
+ if attributes.key?(:'strip_thinking_response')
124
+ self.strip_thinking_response = attributes[:'strip_thinking_response']
125
+ end
126
+
127
+ if attributes.key?(:'disable_thinking')
128
+ self.disable_thinking = attributes[:'disable_thinking']
129
+ end
130
+
131
+ if attributes.key?(:'web_search_citations')
132
+ if (value = attributes[:'web_search_citations']).is_a?(Array)
133
+ self.web_search_citations = value
134
+ end
135
+ end
136
+ end
137
+
138
+ # Show invalid properties with the reasons. Usually used together with valid?
139
+ # @return Array for valid properties with the reasons
140
+ def list_invalid_properties
141
+ invalid_properties = Array.new
142
+ if @enable_web_search.nil?
143
+ invalid_properties.push('invalid value for "enable_web_search", enable_web_search cannot be nil.')
144
+ end
145
+
146
+ if @enable_web_citations.nil?
147
+ invalid_properties.push('invalid value for "enable_web_citations", enable_web_citations cannot be nil.')
148
+ end
149
+
150
+ if @include_venice_system_prompt.nil?
151
+ invalid_properties.push('invalid value for "include_venice_system_prompt", include_venice_system_prompt cannot be nil.')
152
+ end
153
+
154
+ if @strip_thinking_response.nil?
155
+ invalid_properties.push('invalid value for "strip_thinking_response", strip_thinking_response cannot be nil.')
156
+ end
157
+
158
+ if @disable_thinking.nil?
159
+ invalid_properties.push('invalid value for "disable_thinking", disable_thinking cannot be nil.')
160
+ end
161
+
162
+ invalid_properties
163
+ end
164
+
165
+ # Check to see if the all the properties in the model are valid
166
+ # @return true if the model is valid
167
+ def valid?
168
+ return false if @enable_web_search.nil?
169
+ enable_web_search_validator = EnumAttributeValidator.new('Object', ['auto', 'false', 'true'])
170
+ return false unless enable_web_search_validator.valid?(@enable_web_search)
171
+ return false if @enable_web_citations.nil?
172
+ return false if @include_venice_system_prompt.nil?
173
+ return false if @strip_thinking_response.nil?
174
+ return false if @disable_thinking.nil?
175
+ true
176
+ end
177
+
178
+ # Custom attribute writer method checking allowed values (enum).
179
+ # @param [Object] enable_web_search Object to be assigned
180
+ def enable_web_search=(enable_web_search)
181
+ validator = EnumAttributeValidator.new('Object', ['auto', 'false', 'true'])
182
+ unless validator.valid?(enable_web_search)
183
+ fail ArgumentError, "invalid value for \"enable_web_search\", must be one of #{validator.allowable_values}."
184
+ end
185
+ @enable_web_search = enable_web_search
186
+ end
187
+
188
+ # Checks equality by comparing each attribute.
189
+ # @param [Object] Object to be compared
190
+ def ==(o)
191
+ return true if self.equal?(o)
192
+ self.class == o.class &&
193
+ enable_web_search == o.enable_web_search &&
194
+ enable_web_citations == o.enable_web_citations &&
195
+ include_venice_system_prompt == o.include_venice_system_prompt &&
196
+ character_slug == o.character_slug &&
197
+ strip_thinking_response == o.strip_thinking_response &&
198
+ disable_thinking == o.disable_thinking &&
199
+ web_search_citations == o.web_search_citations
200
+ end
201
+
202
+ # @see the `==` method
203
+ # @param [Object] Object to be compared
204
+ def eql?(o)
205
+ self == o
206
+ end
207
+
208
+ # Calculates hash code according to all attributes.
209
+ # @return [Integer] Hash code
210
+ def hash
211
+ [enable_web_search, enable_web_citations, include_venice_system_prompt, character_slug, strip_thinking_response, disable_thinking, web_search_citations].hash
212
+ end
213
+
214
+ # Builds the object from hash
215
+ # @param [Hash] attributes Model attributes in the form of hash
216
+ # @return [Object] Returns the model itself
217
+ def self.build_from_hash(attributes)
218
+ new.build_from_hash(attributes)
219
+ end
220
+
221
+ # Builds the object from hash
222
+ # @param [Hash] attributes Model attributes in the form of hash
223
+ # @return [Object] Returns the model itself
224
+ def build_from_hash(attributes)
225
+ return nil unless attributes.is_a?(Hash)
226
+ self.class.openapi_types.each_pair do |key, type|
227
+ if type =~ /\AArray<(.*)>/i
228
+ # check to ensure the input is an array given that the attribute
229
+ # is documented as an array but the input is not
230
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
231
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
232
+ end
233
+ elsif !attributes[self.class.attribute_map[key]].nil?
234
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
235
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
236
+ self.send("#{key}=", nil)
237
+ end
238
+ end
239
+
240
+ self
241
+ end
242
+
243
+ # Deserializes the data based on type
244
+ # @param string type Data type
245
+ # @param string value Value to be deserialized
246
+ # @return [Object] Deserialized data
247
+ def _deserialize(type, value)
248
+ case type.to_sym
249
+ when :DateTime
250
+ DateTime.parse(value)
251
+ when :Date
252
+ Date.parse(value)
253
+ when :String
254
+ value.to_s
255
+ when :Integer
256
+ value.to_i
257
+ when :Float
258
+ value.to_f
259
+ when :Boolean
260
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
261
+ true
262
+ else
263
+ false
264
+ end
265
+ when :Object
266
+ # generic object (usually a Hash), return directly
267
+ value
268
+ when /\AArray<(?<inner_type>.+)>\z/
269
+ inner_type = Regexp.last_match[:inner_type]
270
+ value.map { |v| _deserialize(inner_type, v) }
271
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
272
+ k_type = Regexp.last_match[:k_type]
273
+ v_type = Regexp.last_match[:v_type]
274
+ {}.tap do |hash|
275
+ value.each do |k, v|
276
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
277
+ end
278
+ end
279
+ else # model
280
+ VeniceClient.const_get(type).build_from_hash(value)
281
+ end
282
+ end
283
+
284
+ # Returns the string representation of the object
285
+ # @return [String] String presentation of the object
286
+ def to_s
287
+ to_hash.to_s
288
+ end
289
+
290
+ # to_body is an alias to to_hash (backward compatibility)
291
+ # @return [Hash] Returns the object in the form of hash
292
+ def to_body
293
+ to_hash
294
+ end
295
+
296
+ # Returns the object in the form of hash
297
+ # @return [Hash] Returns the object in the form of hash
298
+ def to_hash
299
+ hash = {}
300
+ self.class.attribute_map.each_pair do |attr, param|
301
+ value = self.send(attr)
302
+ if value.nil?
303
+ is_nullable = self.class.openapi_nullable.include?(attr)
304
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
305
+ end
306
+
307
+ hash[param] = _to_hash(value)
308
+ end
309
+ hash
310
+ end
311
+
312
+ # Outputs non-array value in the form of hash
313
+ # For object, use to_hash. Otherwise, just return the value
314
+ # @param [Object] value Any valid value
315
+ # @return [Hash] Returns the value in the form of hash
316
+ def _to_hash(value)
317
+ if value.is_a?(Array)
318
+ value.compact.map { |v| _to_hash(v) }
319
+ elsif value.is_a?(Hash)
320
+ {}.tap do |hash|
321
+ value.each { |k, v| hash[k] = _to_hash(v) }
322
+ end
323
+ elsif value.respond_to? :to_hash
324
+ value.to_hash
325
+ else
326
+ value
327
+ end
328
+ end end
329
+ end
@@ -0,0 +1,243 @@
1
+ =begin
2
+ #Venice.ai API
3
+
4
+ #The Venice.ai API.
5
+
6
+ OpenAPI spec version: 20250521.233203
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.68
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module VeniceClient
15
+ class InlineResponse200VeniceParametersWebSearchCitations
16
+ attr_accessor :content
17
+
18
+ attr_accessor :date
19
+
20
+ attr_accessor :title
21
+
22
+ attr_accessor :url
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'content' => :'content',
28
+ :'date' => :'date',
29
+ :'title' => :'title',
30
+ :'url' => :'url'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.openapi_types
36
+ {
37
+ :'content' => :'Object',
38
+ :'date' => :'Object',
39
+ :'title' => :'Object',
40
+ :'url' => :'Object'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::InlineResponse200VeniceParametersWebSearchCitations` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::InlineResponse200VeniceParametersWebSearchCitations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'content')
66
+ self.content = attributes[:'content']
67
+ end
68
+
69
+ if attributes.key?(:'date')
70
+ self.date = attributes[:'date']
71
+ end
72
+
73
+ if attributes.key?(:'title')
74
+ self.title = attributes[:'title']
75
+ end
76
+
77
+ if attributes.key?(:'url')
78
+ self.url = attributes[:'url']
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ invalid_properties = Array.new
86
+ if @title.nil?
87
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
88
+ end
89
+
90
+ if @url.nil?
91
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
92
+ end
93
+
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ return false if @title.nil?
101
+ return false if @url.nil?
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ content == o.content &&
111
+ date == o.date &&
112
+ title == o.title &&
113
+ url == o.url
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [content, date, title, url].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ new.build_from_hash(attributes)
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ self.class.openapi_types.each_pair do |key, type|
141
+ if type =~ /\AArray<(.*)>/i
142
+ # check to ensure the input is an array given that the attribute
143
+ # is documented as an array but the input is not
144
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
145
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ end
147
+ elsif !attributes[self.class.attribute_map[key]].nil?
148
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
150
+ self.send("#{key}=", nil)
151
+ end
152
+ end
153
+
154
+ self
155
+ end
156
+
157
+ # Deserializes the data based on type
158
+ # @param string type Data type
159
+ # @param string value Value to be deserialized
160
+ # @return [Object] Deserialized data
161
+ def _deserialize(type, value)
162
+ case type.to_sym
163
+ when :DateTime
164
+ DateTime.parse(value)
165
+ when :Date
166
+ Date.parse(value)
167
+ when :String
168
+ value.to_s
169
+ when :Integer
170
+ value.to_i
171
+ when :Float
172
+ value.to_f
173
+ when :Boolean
174
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
175
+ true
176
+ else
177
+ false
178
+ end
179
+ when :Object
180
+ # generic object (usually a Hash), return directly
181
+ value
182
+ when /\AArray<(?<inner_type>.+)>\z/
183
+ inner_type = Regexp.last_match[:inner_type]
184
+ value.map { |v| _deserialize(inner_type, v) }
185
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
186
+ k_type = Regexp.last_match[:k_type]
187
+ v_type = Regexp.last_match[:v_type]
188
+ {}.tap do |hash|
189
+ value.each do |k, v|
190
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
191
+ end
192
+ end
193
+ else # model
194
+ VeniceClient.const_get(type).build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end end
243
+ end