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