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,185 @@
|
|
|
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
|
+
module VeniceClient
|
|
13
|
+
class ModelsApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/models/compatibility_mapping
|
|
20
|
+
# Returns a list of model compatibility mappings and the associated model.
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @option opts [String] :type (default to text)
|
|
23
|
+
# @return [InlineResponse2006]
|
|
24
|
+
def list_model_compatibility_mapping(opts = {})
|
|
25
|
+
data, _status_code, _headers = list_model_compatibility_mapping_with_http_info(opts)
|
|
26
|
+
data
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# /api/v1/models/compatibility_mapping
|
|
30
|
+
# Returns a list of model compatibility mappings and the associated model.
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @option opts [String] :type
|
|
33
|
+
# @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
|
|
34
|
+
def list_model_compatibility_mapping_with_http_info(opts = {})
|
|
35
|
+
if @api_client.config.debugging
|
|
36
|
+
@api_client.config.logger.debug 'Calling API: ModelsApi.list_model_compatibility_mapping ...'
|
|
37
|
+
end
|
|
38
|
+
if @api_client.config.client_side_validation && opts[:'type'] && !['embedding', 'image', 'text', 'tts', 'upscale'].include?(opts[:'type'])
|
|
39
|
+
fail ArgumentError, 'invalid value for "type", must be one of embedding, image, text, tts, upscale'
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/models/compatibility_mapping'
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = opts[:query_params] || {}
|
|
46
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
47
|
+
|
|
48
|
+
# header parameters
|
|
49
|
+
header_params = opts[:header_params] || {}
|
|
50
|
+
# HTTP header 'Accept' (if needed)
|
|
51
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
52
|
+
|
|
53
|
+
# form parameters
|
|
54
|
+
form_params = opts[:form_params] || {}
|
|
55
|
+
|
|
56
|
+
# http body (model)
|
|
57
|
+
post_body = opts[:body]
|
|
58
|
+
|
|
59
|
+
return_type = opts[:return_type] || 'InlineResponse2006'
|
|
60
|
+
|
|
61
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
62
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
63
|
+
:header_params => header_params,
|
|
64
|
+
:query_params => query_params,
|
|
65
|
+
:form_params => form_params,
|
|
66
|
+
:body => post_body,
|
|
67
|
+
:auth_names => auth_names,
|
|
68
|
+
:return_type => return_type)
|
|
69
|
+
|
|
70
|
+
if @api_client.config.debugging
|
|
71
|
+
@api_client.config.logger.debug "API called: ModelsApi#list_model_compatibility_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
72
|
+
end
|
|
73
|
+
return data, status_code, headers
|
|
74
|
+
end
|
|
75
|
+
# /api/v1/models/traits
|
|
76
|
+
# Returns a list of model traits and the associated model.
|
|
77
|
+
# @param [Hash] opts the optional parameters
|
|
78
|
+
# @option opts [String] :type (default to text)
|
|
79
|
+
# @return [InlineResponse2005]
|
|
80
|
+
def list_model_traits(opts = {})
|
|
81
|
+
data, _status_code, _headers = list_model_traits_with_http_info(opts)
|
|
82
|
+
data
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# /api/v1/models/traits
|
|
86
|
+
# Returns a list of model traits and the associated model.
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @option opts [String] :type
|
|
89
|
+
# @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
|
|
90
|
+
def list_model_traits_with_http_info(opts = {})
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug 'Calling API: ModelsApi.list_model_traits ...'
|
|
93
|
+
end
|
|
94
|
+
if @api_client.config.client_side_validation && opts[:'type'] && !['embedding', 'image', 'text', 'tts', 'upscale'].include?(opts[:'type'])
|
|
95
|
+
fail ArgumentError, 'invalid value for "type", must be one of embedding, image, text, tts, upscale'
|
|
96
|
+
end
|
|
97
|
+
# resource path
|
|
98
|
+
local_var_path = '/models/traits'
|
|
99
|
+
|
|
100
|
+
# query parameters
|
|
101
|
+
query_params = opts[:query_params] || {}
|
|
102
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
103
|
+
|
|
104
|
+
# header parameters
|
|
105
|
+
header_params = opts[:header_params] || {}
|
|
106
|
+
# HTTP header 'Accept' (if needed)
|
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
108
|
+
|
|
109
|
+
# form parameters
|
|
110
|
+
form_params = opts[:form_params] || {}
|
|
111
|
+
|
|
112
|
+
# http body (model)
|
|
113
|
+
post_body = opts[:body]
|
|
114
|
+
|
|
115
|
+
return_type = opts[:return_type] || 'InlineResponse2005'
|
|
116
|
+
|
|
117
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
118
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
119
|
+
:header_params => header_params,
|
|
120
|
+
:query_params => query_params,
|
|
121
|
+
:form_params => form_params,
|
|
122
|
+
:body => post_body,
|
|
123
|
+
:auth_names => auth_names,
|
|
124
|
+
:return_type => return_type)
|
|
125
|
+
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug "API called: ModelsApi#list_model_traits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
|
+
end
|
|
129
|
+
return data, status_code, headers
|
|
130
|
+
end
|
|
131
|
+
# /api/v1/models
|
|
132
|
+
# Returns a list of available models supported by the Venice.ai API for both text and image inference.
|
|
133
|
+
# @param [Hash] opts the optional parameters
|
|
134
|
+
# @option opts [Type] :type
|
|
135
|
+
# @return [InlineResponse2004]
|
|
136
|
+
def list_models(opts = {})
|
|
137
|
+
data, _status_code, _headers = list_models_with_http_info(opts)
|
|
138
|
+
data
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# /api/v1/models
|
|
142
|
+
# Returns a list of available models supported by the Venice.ai API for both text and image inference.
|
|
143
|
+
# @param [Hash] opts the optional parameters
|
|
144
|
+
# @option opts [Type] :type
|
|
145
|
+
# @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
|
|
146
|
+
def list_models_with_http_info(opts = {})
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug 'Calling API: ModelsApi.list_models ...'
|
|
149
|
+
end
|
|
150
|
+
# resource path
|
|
151
|
+
local_var_path = '/models'
|
|
152
|
+
|
|
153
|
+
# query parameters
|
|
154
|
+
query_params = opts[:query_params] || {}
|
|
155
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
156
|
+
|
|
157
|
+
# header parameters
|
|
158
|
+
header_params = opts[:header_params] || {}
|
|
159
|
+
# HTTP header 'Accept' (if needed)
|
|
160
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
161
|
+
|
|
162
|
+
# form parameters
|
|
163
|
+
form_params = opts[:form_params] || {}
|
|
164
|
+
|
|
165
|
+
# http body (model)
|
|
166
|
+
post_body = opts[:body]
|
|
167
|
+
|
|
168
|
+
return_type = opts[:return_type] || 'InlineResponse2004'
|
|
169
|
+
|
|
170
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
171
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
172
|
+
:header_params => header_params,
|
|
173
|
+
:query_params => query_params,
|
|
174
|
+
:form_params => form_params,
|
|
175
|
+
:body => post_body,
|
|
176
|
+
:auth_names => auth_names,
|
|
177
|
+
:return_type => return_type)
|
|
178
|
+
|
|
179
|
+
if @api_client.config.debugging
|
|
180
|
+
@api_client.config.logger.debug "API called: ModelsApi#list_models\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
181
|
+
end
|
|
182
|
+
return data, status_code, headers
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
module VeniceClient
|
|
13
|
+
class PreviewApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/characters
|
|
20
|
+
# This is a preview API and may change. Returns a list of characters supported in the API.
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @return [InlineResponse20013]
|
|
23
|
+
def list_characters(opts = {})
|
|
24
|
+
data, _status_code, _headers = list_characters_with_http_info(opts)
|
|
25
|
+
data
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# /api/v1/characters
|
|
29
|
+
# This is a preview API and may change. Returns a list of characters supported in the API.
|
|
30
|
+
# @param [Hash] opts the optional parameters
|
|
31
|
+
# @return [Array<(InlineResponse20013, Integer, Hash)>] InlineResponse20013 data, response status code and response headers
|
|
32
|
+
def list_characters_with_http_info(opts = {})
|
|
33
|
+
if @api_client.config.debugging
|
|
34
|
+
@api_client.config.logger.debug 'Calling API: PreviewApi.list_characters ...'
|
|
35
|
+
end
|
|
36
|
+
# resource path
|
|
37
|
+
local_var_path = '/characters'
|
|
38
|
+
|
|
39
|
+
# query parameters
|
|
40
|
+
query_params = opts[:query_params] || {}
|
|
41
|
+
|
|
42
|
+
# header parameters
|
|
43
|
+
header_params = opts[:header_params] || {}
|
|
44
|
+
# HTTP header 'Accept' (if needed)
|
|
45
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
46
|
+
|
|
47
|
+
# form parameters
|
|
48
|
+
form_params = opts[:form_params] || {}
|
|
49
|
+
|
|
50
|
+
# http body (model)
|
|
51
|
+
post_body = opts[:body]
|
|
52
|
+
|
|
53
|
+
return_type = opts[:return_type] || 'InlineResponse20013'
|
|
54
|
+
|
|
55
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
56
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
57
|
+
:header_params => header_params,
|
|
58
|
+
:query_params => query_params,
|
|
59
|
+
:form_params => form_params,
|
|
60
|
+
:body => post_body,
|
|
61
|
+
:auth_names => auth_names,
|
|
62
|
+
:return_type => return_type)
|
|
63
|
+
|
|
64
|
+
if @api_client.config.debugging
|
|
65
|
+
@api_client.config.logger.debug "API called: PreviewApi#list_characters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
66
|
+
end
|
|
67
|
+
return data, status_code, headers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
module VeniceClient
|
|
13
|
+
class SpeechApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/audio/speech
|
|
20
|
+
# Converts text to speech using various voice models and formats.
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @option opts [CreateSpeechRequestSchema] :body
|
|
23
|
+
# @return [String]
|
|
24
|
+
def create_speech(opts = {})
|
|
25
|
+
data, _status_code, _headers = create_speech_with_http_info(opts)
|
|
26
|
+
data
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# /api/v1/audio/speech
|
|
30
|
+
# Converts text to speech using various voice models and formats.
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @option opts [CreateSpeechRequestSchema] :body
|
|
33
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
34
|
+
def create_speech_with_http_info(opts = {})
|
|
35
|
+
if @api_client.config.debugging
|
|
36
|
+
@api_client.config.logger.debug 'Calling API: SpeechApi.create_speech ...'
|
|
37
|
+
end
|
|
38
|
+
# resource path
|
|
39
|
+
local_var_path = '/audio/speech'
|
|
40
|
+
|
|
41
|
+
# query parameters
|
|
42
|
+
query_params = opts[:query_params] || {}
|
|
43
|
+
|
|
44
|
+
# header parameters
|
|
45
|
+
header_params = opts[:header_params] || {}
|
|
46
|
+
# HTTP header 'Accept' (if needed)
|
|
47
|
+
header_params['Accept'] = @api_client.select_header_accept(['audio/aac', 'audio/flac', 'audio/mpeg', 'audio/opus', 'audio/pcm', 'audio/wav', 'application/json'])
|
|
48
|
+
# HTTP header 'Content-Type'
|
|
49
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
50
|
+
|
|
51
|
+
# form parameters
|
|
52
|
+
form_params = opts[:form_params] || {}
|
|
53
|
+
|
|
54
|
+
# http body (model)
|
|
55
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
|
56
|
+
|
|
57
|
+
return_type = opts[:return_type] || 'String'
|
|
58
|
+
|
|
59
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
60
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
61
|
+
:header_params => header_params,
|
|
62
|
+
:query_params => query_params,
|
|
63
|
+
:form_params => form_params,
|
|
64
|
+
:body => post_body,
|
|
65
|
+
:auth_names => auth_names,
|
|
66
|
+
:return_type => return_type)
|
|
67
|
+
|
|
68
|
+
if @api_client.config.debugging
|
|
69
|
+
@api_client.config.logger.debug "API called: SpeechApi#create_speech\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
70
|
+
end
|
|
71
|
+
return data, status_code, headers
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|