vapi_server_sdk 0.2.0 → 0.3.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 +4 -4
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +129 -62
- data/lib/vapi_server_sdk/assistants/client.rb +15 -2
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_credentials_item.rb +512 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_model.rb +13 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_voice.rb +13 -0
- data/lib/vapi_server_sdk/blocks/client.rb +7 -166
- data/lib/vapi_server_sdk/blocks/types/blocks_update_request.rb +109 -0
- data/lib/vapi_server_sdk/calls/client.rb +16 -4
- data/lib/vapi_server_sdk/knowledge_bases/client.rb +7 -8
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_update_request.rb +96 -0
- data/lib/vapi_server_sdk/logs/client.rb +84 -0
- data/lib/vapi_server_sdk/phone_numbers/client.rb +7 -69
- data/lib/vapi_server_sdk/phone_numbers/types/phone_numbers_update_request.rb +122 -0
- data/lib/vapi_server_sdk/squads/client.rb +8 -0
- data/lib/vapi_server_sdk/tools/client.rb +7 -91
- data/lib/vapi_server_sdk/tools/types/tools_update_request.rb +200 -0
- data/lib/vapi_server_sdk/types/assistant.rb +19 -1
- data/lib/vapi_server_sdk/types/assistant_credentials_item.rb +510 -0
- data/lib/vapi_server_sdk/types/assistant_model.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_overrides.rb +19 -1
- data/lib/vapi_server_sdk/types/assistant_overrides_credentials_item.rb +510 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_model.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_voice.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_voice.rb +13 -0
- data/lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb +88 -0
- data/lib/vapi_server_sdk/types/azure_credential.rb +22 -5
- data/lib/vapi_server_sdk/types/azure_credential_region.rb +1 -1
- data/lib/vapi_server_sdk/types/azure_credential_service.rb +9 -0
- data/lib/vapi_server_sdk/types/azure_open_ai_credential.rb +9 -1
- data/lib/vapi_server_sdk/types/azure_open_ai_credential_region.rb +1 -1
- data/lib/vapi_server_sdk/types/azure_speech_transcriber.rb +62 -0
- data/lib/vapi_server_sdk/types/azure_speech_transcriber_language.rb +152 -0
- data/lib/vapi_server_sdk/types/buy_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/byo_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/call_ended_reason.rb +44 -29
- data/lib/vapi_server_sdk/types/cartesia_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/cerebras_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/chat_dto.rb +103 -0
- data/lib/vapi_server_sdk/types/{credits_buy_dto.rb → chat_service_response.rb} +9 -17
- data/lib/vapi_server_sdk/types/cloudflare_credential.rb +142 -0
- data/lib/vapi_server_sdk/types/cloudflare_r_2_bucket_plan.rb +105 -0
- data/lib/vapi_server_sdk/types/create_anthropic_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_anyscale_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_assembly_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_assistant_dto.rb +19 -1
- data/lib/vapi_server_sdk/types/create_assistant_dto_credentials_item.rb +510 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_model.rb +13 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_voice.rb +13 -0
- data/lib/vapi_server_sdk/types/create_azure_credential_dto.rb +21 -12
- data/lib/vapi_server_sdk/types/create_azure_credential_dto_region.rb +1 -1
- data/lib/vapi_server_sdk/types/create_azure_credential_dto_service.rb +9 -0
- data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb +10 -9
- data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_region.rb +1 -1
- data/lib/vapi_server_sdk/types/create_byo_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_byo_sip_trunk_credential_dto.rb +1 -9
- data/lib/vapi_server_sdk/types/create_cartesia_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_cerebras_credential_dto.rb +74 -0
- data/lib/vapi_server_sdk/types/create_cloudflare_credential_dto.rb +101 -0
- data/lib/vapi_server_sdk/types/create_custom_llm_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_deep_infra_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_deep_seek_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/create_deepgram_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_eleven_labs_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_gcp_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_gladia_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_go_high_level_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_groq_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb +2 -15
- data/lib/vapi_server_sdk/types/create_lmnt_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_make_credential_dto.rb +2 -15
- data/lib/vapi_server_sdk/types/create_open_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_open_router_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_org_dto.rb +25 -25
- data/lib/vapi_server_sdk/types/create_perplexity_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_play_ht_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_rime_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_runpod_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_s_3_credential_dto.rb +2 -10
- data/lib/vapi_server_sdk/types/create_smallest_ai_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/create_tavus_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_together_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_twilio_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_twilio_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_vapi_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_vonage_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_vonage_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_webhook_credential_dto.rb +2 -13
- data/lib/vapi_server_sdk/types/create_x_ai_credential_dto.rb +2 -11
- data/lib/vapi_server_sdk/types/deep_seek_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/deep_seek_model.rb +177 -0
- data/lib/vapi_server_sdk/types/deep_seek_model_tools_item.rb +159 -0
- data/lib/vapi_server_sdk/types/eleven_labs_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/fallback_cartesia_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/fallback_open_ai_voice.rb +4 -4
- data/lib/vapi_server_sdk/types/fallback_open_ai_voice_id.rb +2 -2
- data/lib/vapi_server_sdk/types/fallback_plan_voices_item.rb +13 -0
- data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice.rb +95 -0
- data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id_enum.rb +31 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config.rb +58 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config_voice_name.rb +11 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_speech_config.rb +61 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_voice_config.rb +61 -0
- data/lib/vapi_server_sdk/types/google_model.rb +17 -1
- data/lib/vapi_server_sdk/types/google_model_model.rb +2 -0
- data/lib/vapi_server_sdk/types/google_realtime_config.rb +121 -0
- data/lib/vapi_server_sdk/types/groq_model_model.rb +1 -3
- data/lib/vapi_server_sdk/types/import_twilio_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/import_vonage_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/open_ai_model_fallback_models_item.rb +6 -0
- data/lib/vapi_server_sdk/types/open_ai_model_model.rb +6 -0
- data/lib/vapi_server_sdk/types/open_ai_voice.rb +4 -4
- data/lib/vapi_server_sdk/types/open_ai_voice_id.rb +2 -2
- data/lib/vapi_server_sdk/types/org.rb +25 -25
- data/lib/vapi_server_sdk/types/org_with_org_user.rb +25 -25
- data/lib/vapi_server_sdk/types/server_message_end_of_call_report_ended_reason.rb +44 -29
- data/lib/vapi_server_sdk/types/server_message_status_update.rb +11 -1
- data/lib/vapi_server_sdk/types/server_message_status_update_ended_reason.rb +44 -29
- data/lib/vapi_server_sdk/types/smallest_ai_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/smallest_ai_voice.rb +117 -0
- data/lib/vapi_server_sdk/types/smallest_ai_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/smallest_ai_voice_id_enum.rb +31 -0
- data/lib/vapi_server_sdk/types/subscription.rb +2 -2
- data/lib/vapi_server_sdk/types/sync_voice_library_dto_providers_item.rb +1 -0
- data/lib/vapi_server_sdk/types/transfer_plan.rb +26 -6
- data/lib/vapi_server_sdk/types/transfer_plan_message.rb +2 -1
- data/lib/vapi_server_sdk/types/twilio_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/update_anthropic_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_anyscale_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_assembly_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_azure_credential_dto.rb +24 -14
- data/lib/vapi_server_sdk/types/update_azure_credential_dto_region.rb +1 -1
- data/lib/vapi_server_sdk/types/update_azure_credential_dto_service.rb +9 -0
- data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto.rb +25 -24
- data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_region.rb +1 -1
- data/lib/vapi_server_sdk/types/update_bash_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/update_bash_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_byo_phone_number_dto.rb +187 -0
- data/lib/vapi_server_sdk/types/update_byo_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_byo_sip_trunk_credential_dto.rb +13 -21
- data/lib/vapi_server_sdk/types/update_cartesia_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_cerebras_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/update_cloudflare_credential_dto.rb +101 -0
- data/lib/vapi_server_sdk/types/update_computer_tool_dto.rb +185 -0
- data/lib/vapi_server_sdk/types/update_computer_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_conversation_block_dto.rb +206 -0
- data/lib/vapi_server_sdk/types/update_conversation_block_dto_messages_item.rb +95 -0
- data/lib/vapi_server_sdk/types/update_custom_knowledge_base_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_custom_llm_credential_dto.rb +4 -16
- data/lib/vapi_server_sdk/types/update_deep_infra_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_deep_seek_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/update_deepgram_credential_dto.rb +11 -18
- data/lib/vapi_server_sdk/types/update_dtmf_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_dtmf_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_eleven_labs_credential_dto.rb +11 -11
- data/lib/vapi_server_sdk/types/update_end_call_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_end_call_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_function_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_function_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_gcp_credential_dto.rb +11 -23
- data/lib/vapi_server_sdk/types/update_ghl_tool_dto.rb +159 -0
- data/lib/vapi_server_sdk/types/update_ghl_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_gladia_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_go_high_level_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_google_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/update_groq_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_inflection_ai_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/update_langfuse_credential_dto.rb +8 -21
- data/lib/vapi_server_sdk/types/update_lmnt_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_make_credential_dto.rb +8 -21
- data/lib/vapi_server_sdk/types/update_make_tool_dto.rb +159 -0
- data/lib/vapi_server_sdk/types/update_make_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_open_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_open_router_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_org_dto.rb +25 -25
- data/lib/vapi_server_sdk/types/update_output_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_output_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_perplexity_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_play_ht_credential_dto.rb +11 -18
- data/lib/vapi_server_sdk/types/update_rime_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_runpod_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_s_3_credential_dto.rb +12 -20
- data/lib/vapi_server_sdk/types/update_smallest_ai_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/update_tavus_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_text_editor_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/update_text_editor_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_together_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_token_dto.rb +81 -0
- data/lib/vapi_server_sdk/types/update_token_dto_tag.rb +9 -0
- data/lib/vapi_server_sdk/types/update_tool_call_block_dto.rb +168 -0
- data/lib/vapi_server_sdk/types/update_tool_call_block_dto_messages_item.rb +94 -0
- data/lib/vapi_server_sdk/types/update_tool_call_block_dto_tool.rb +161 -0
- data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_destinations_item.rb +121 -0
- data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_messages_item.rb +121 -0
- data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto.rb +109 -0
- data/lib/vapi_server_sdk/types/update_twilio_credential_dto.rb +11 -23
- data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto.rb +163 -0
- data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto.rb +169 -0
- data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_vonage_credential_dto.rb +11 -23
- data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto.rb +157 -0
- data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_workflow_block_dto.rb +154 -0
- data/lib/vapi_server_sdk/types/update_workflow_block_dto_messages_item.rb +94 -0
- data/lib/vapi_server_sdk/types/update_workflow_block_dto_steps_item.rb +94 -0
- data/lib/vapi_server_sdk/types/update_x_ai_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/vapi_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/vonage_phone_number.rb +25 -29
- metadata +88 -21
- data/lib/vapi_server_sdk/blocks/types/update_block_dto_messages_item.rb +0 -96
- data/lib/vapi_server_sdk/blocks/types/update_block_dto_steps_item.rb +0 -96
- data/lib/vapi_server_sdk/blocks/types/update_block_dto_tool.rb +0 -163
- data/lib/vapi_server_sdk/phone_numbers/types/update_phone_number_dto_fallback_destination.rb +0 -103
- data/lib/vapi_server_sdk/tools/types/update_tool_dto_messages_item.rb +0 -122
- data/lib/vapi_server_sdk/types/auto_reload_plan_dto.rb +0 -65
- data/lib/vapi_server_sdk/types/hipaa_buy_dto.rb +0 -65
- data/lib/vapi_server_sdk/types/payment.rb +0 -167
- data/lib/vapi_server_sdk/types/payment_retry_dto.rb +0 -55
- data/lib/vapi_server_sdk/types/payment_status.rb +0 -11
- data/lib/vapi_server_sdk/types/payments_paginated_response.rb +0 -75
- data/lib/vapi_server_sdk/types/subscription_concurrency_line_buy_dto.rb +0 -55
- data/lib/vapi_server_sdk/types/subscription_concurrency_line_remove_dto.rb +0 -55
- data/lib/vapi_server_sdk/types/subscription_coupon_add_dto.rb +0 -67
- data/lib/vapi_server_sdk/types/subscription_monthly_charge.rb +0 -65
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "gemini_multimodal_live_prebuilt_voice_config_voice_name"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Vapi
|
8
|
+
class GeminiMultimodalLivePrebuiltVoiceConfig
|
9
|
+
# @return [Vapi::GeminiMultimodalLivePrebuiltVoiceConfigVoiceName]
|
10
|
+
attr_reader :voice_name
|
11
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
12
|
+
attr_reader :additional_properties
|
13
|
+
# @return [Object]
|
14
|
+
attr_reader :_field_set
|
15
|
+
protected :_field_set
|
16
|
+
|
17
|
+
OMIT = Object.new
|
18
|
+
|
19
|
+
# @param voice_name [Vapi::GeminiMultimodalLivePrebuiltVoiceConfigVoiceName]
|
20
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
# @return [Vapi::GeminiMultimodalLivePrebuiltVoiceConfig]
|
22
|
+
def initialize(voice_name:, additional_properties: nil)
|
23
|
+
@voice_name = voice_name
|
24
|
+
@additional_properties = additional_properties
|
25
|
+
@_field_set = { "voiceName": voice_name }
|
26
|
+
end
|
27
|
+
|
28
|
+
# Deserialize a JSON object to an instance of
|
29
|
+
# GeminiMultimodalLivePrebuiltVoiceConfig
|
30
|
+
#
|
31
|
+
# @param json_object [String]
|
32
|
+
# @return [Vapi::GeminiMultimodalLivePrebuiltVoiceConfig]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
voice_name = parsed_json["voiceName"]
|
37
|
+
new(voice_name: voice_name, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of GeminiMultimodalLivePrebuiltVoiceConfig to a JSON
|
41
|
+
# object
|
42
|
+
#
|
43
|
+
# @return [String]
|
44
|
+
def to_json(*_args)
|
45
|
+
@_field_set&.to_json
|
46
|
+
end
|
47
|
+
|
48
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
49
|
+
# hash and check each fields type against the current object's property
|
50
|
+
# definitions.
|
51
|
+
#
|
52
|
+
# @param obj [Object]
|
53
|
+
# @return [Void]
|
54
|
+
def self.validate_raw(obj:)
|
55
|
+
obj.voice_name.is_a?(Vapi::GeminiMultimodalLivePrebuiltVoiceConfigVoiceName) != false || raise("Passed value for field obj.voice_name is not the expected type, validation failed.")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "gemini_multimodal_live_voice_config"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Vapi
|
8
|
+
class GeminiMultimodalLiveSpeechConfig
|
9
|
+
# @return [Vapi::GeminiMultimodalLiveVoiceConfig]
|
10
|
+
attr_reader :voice_config
|
11
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
12
|
+
attr_reader :additional_properties
|
13
|
+
# @return [Object]
|
14
|
+
attr_reader :_field_set
|
15
|
+
protected :_field_set
|
16
|
+
|
17
|
+
OMIT = Object.new
|
18
|
+
|
19
|
+
# @param voice_config [Vapi::GeminiMultimodalLiveVoiceConfig]
|
20
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
# @return [Vapi::GeminiMultimodalLiveSpeechConfig]
|
22
|
+
def initialize(voice_config:, additional_properties: nil)
|
23
|
+
@voice_config = voice_config
|
24
|
+
@additional_properties = additional_properties
|
25
|
+
@_field_set = { "voiceConfig": voice_config }
|
26
|
+
end
|
27
|
+
|
28
|
+
# Deserialize a JSON object to an instance of GeminiMultimodalLiveSpeechConfig
|
29
|
+
#
|
30
|
+
# @param json_object [String]
|
31
|
+
# @return [Vapi::GeminiMultimodalLiveSpeechConfig]
|
32
|
+
def self.from_json(json_object:)
|
33
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
34
|
+
parsed_json = JSON.parse(json_object)
|
35
|
+
if parsed_json["voiceConfig"].nil?
|
36
|
+
voice_config = nil
|
37
|
+
else
|
38
|
+
voice_config = parsed_json["voiceConfig"].to_json
|
39
|
+
voice_config = Vapi::GeminiMultimodalLiveVoiceConfig.from_json(json_object: voice_config)
|
40
|
+
end
|
41
|
+
new(voice_config: voice_config, additional_properties: struct)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Serialize an instance of GeminiMultimodalLiveSpeechConfig to a JSON object
|
45
|
+
#
|
46
|
+
# @return [String]
|
47
|
+
def to_json(*_args)
|
48
|
+
@_field_set&.to_json
|
49
|
+
end
|
50
|
+
|
51
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
52
|
+
# hash and check each fields type against the current object's property
|
53
|
+
# definitions.
|
54
|
+
#
|
55
|
+
# @param obj [Object]
|
56
|
+
# @return [Void]
|
57
|
+
def self.validate_raw(obj:)
|
58
|
+
Vapi::GeminiMultimodalLiveVoiceConfig.validate_raw(obj: obj.voice_config)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "gemini_multimodal_live_prebuilt_voice_config"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Vapi
|
8
|
+
class GeminiMultimodalLiveVoiceConfig
|
9
|
+
# @return [Vapi::GeminiMultimodalLivePrebuiltVoiceConfig]
|
10
|
+
attr_reader :prebuilt_voice_config
|
11
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
12
|
+
attr_reader :additional_properties
|
13
|
+
# @return [Object]
|
14
|
+
attr_reader :_field_set
|
15
|
+
protected :_field_set
|
16
|
+
|
17
|
+
OMIT = Object.new
|
18
|
+
|
19
|
+
# @param prebuilt_voice_config [Vapi::GeminiMultimodalLivePrebuiltVoiceConfig]
|
20
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
# @return [Vapi::GeminiMultimodalLiveVoiceConfig]
|
22
|
+
def initialize(prebuilt_voice_config:, additional_properties: nil)
|
23
|
+
@prebuilt_voice_config = prebuilt_voice_config
|
24
|
+
@additional_properties = additional_properties
|
25
|
+
@_field_set = { "prebuiltVoiceConfig": prebuilt_voice_config }
|
26
|
+
end
|
27
|
+
|
28
|
+
# Deserialize a JSON object to an instance of GeminiMultimodalLiveVoiceConfig
|
29
|
+
#
|
30
|
+
# @param json_object [String]
|
31
|
+
# @return [Vapi::GeminiMultimodalLiveVoiceConfig]
|
32
|
+
def self.from_json(json_object:)
|
33
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
34
|
+
parsed_json = JSON.parse(json_object)
|
35
|
+
if parsed_json["prebuiltVoiceConfig"].nil?
|
36
|
+
prebuilt_voice_config = nil
|
37
|
+
else
|
38
|
+
prebuilt_voice_config = parsed_json["prebuiltVoiceConfig"].to_json
|
39
|
+
prebuilt_voice_config = Vapi::GeminiMultimodalLivePrebuiltVoiceConfig.from_json(json_object: prebuilt_voice_config)
|
40
|
+
end
|
41
|
+
new(prebuilt_voice_config: prebuilt_voice_config, additional_properties: struct)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Serialize an instance of GeminiMultimodalLiveVoiceConfig to a JSON object
|
45
|
+
#
|
46
|
+
# @return [String]
|
47
|
+
def to_json(*_args)
|
48
|
+
@_field_set&.to_json
|
49
|
+
end
|
50
|
+
|
51
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
52
|
+
# hash and check each fields type against the current object's property
|
53
|
+
# definitions.
|
54
|
+
#
|
55
|
+
# @param obj [Object]
|
56
|
+
# @return [Void]
|
57
|
+
def self.validate_raw(obj:)
|
58
|
+
Vapi::GeminiMultimodalLivePrebuiltVoiceConfig.validate_raw(obj: obj.prebuilt_voice_config)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -4,6 +4,7 @@ require_relative "open_ai_message"
|
|
4
4
|
require_relative "google_model_tools_item"
|
5
5
|
require_relative "create_custom_knowledge_base_dto"
|
6
6
|
require_relative "google_model_model"
|
7
|
+
require_relative "google_realtime_config"
|
7
8
|
require "ostruct"
|
8
9
|
require "json"
|
9
10
|
|
@@ -25,6 +26,9 @@ module Vapi
|
|
25
26
|
attr_reader :knowledge_base_id
|
26
27
|
# @return [Vapi::GoogleModelModel] This is the Google model that will be used.
|
27
28
|
attr_reader :model
|
29
|
+
# @return [Vapi::GoogleRealtimeConfig] This is the session configuration for the Gemini Flash 2.0 Multimodal Live API.
|
30
|
+
# Only applicable if the model `gemini-2.0-flash-realtime-exp` is selected.
|
31
|
+
attr_reader :realtime_config
|
28
32
|
# @return [Float] This is the temperature that will be used for calls. Default is 0 to leverage
|
29
33
|
# caching for lower latency.
|
30
34
|
attr_reader :temperature
|
@@ -61,6 +65,8 @@ module Vapi
|
|
61
65
|
# @param knowledge_base [Vapi::CreateCustomKnowledgeBaseDto] These are the options for the knowledge base.
|
62
66
|
# @param knowledge_base_id [String] This is the ID of the knowledge base the model will use.
|
63
67
|
# @param model [Vapi::GoogleModelModel] This is the Google model that will be used.
|
68
|
+
# @param realtime_config [Vapi::GoogleRealtimeConfig] This is the session configuration for the Gemini Flash 2.0 Multimodal Live API.
|
69
|
+
# Only applicable if the model `gemini-2.0-flash-realtime-exp` is selected.
|
64
70
|
# @param temperature [Float] This is the temperature that will be used for calls. Default is 0 to leverage
|
65
71
|
# caching for lower latency.
|
66
72
|
# @param max_tokens [Float] This is the max number of tokens that the assistant will be allowed to generate
|
@@ -78,13 +84,14 @@ module Vapi
|
|
78
84
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
79
85
|
# @return [Vapi::GoogleModel]
|
80
86
|
def initialize(model:, messages: OMIT, tools: OMIT, tool_ids: OMIT, knowledge_base: OMIT, knowledge_base_id: OMIT,
|
81
|
-
temperature: OMIT, max_tokens: OMIT, emotion_recognition_enabled: OMIT, num_fast_turns: OMIT, additional_properties: nil)
|
87
|
+
realtime_config: OMIT, temperature: OMIT, max_tokens: OMIT, emotion_recognition_enabled: OMIT, num_fast_turns: OMIT, additional_properties: nil)
|
82
88
|
@messages = messages if messages != OMIT
|
83
89
|
@tools = tools if tools != OMIT
|
84
90
|
@tool_ids = tool_ids if tool_ids != OMIT
|
85
91
|
@knowledge_base = knowledge_base if knowledge_base != OMIT
|
86
92
|
@knowledge_base_id = knowledge_base_id if knowledge_base_id != OMIT
|
87
93
|
@model = model
|
94
|
+
@realtime_config = realtime_config if realtime_config != OMIT
|
88
95
|
@temperature = temperature if temperature != OMIT
|
89
96
|
@max_tokens = max_tokens if max_tokens != OMIT
|
90
97
|
@emotion_recognition_enabled = emotion_recognition_enabled if emotion_recognition_enabled != OMIT
|
@@ -97,6 +104,7 @@ module Vapi
|
|
97
104
|
"knowledgeBase": knowledge_base,
|
98
105
|
"knowledgeBaseId": knowledge_base_id,
|
99
106
|
"model": model,
|
107
|
+
"realtimeConfig": realtime_config,
|
100
108
|
"temperature": temperature,
|
101
109
|
"maxTokens": max_tokens,
|
102
110
|
"emotionRecognitionEnabled": emotion_recognition_enabled,
|
@@ -130,6 +138,12 @@ module Vapi
|
|
130
138
|
end
|
131
139
|
knowledge_base_id = parsed_json["knowledgeBaseId"]
|
132
140
|
model = parsed_json["model"]
|
141
|
+
if parsed_json["realtimeConfig"].nil?
|
142
|
+
realtime_config = nil
|
143
|
+
else
|
144
|
+
realtime_config = parsed_json["realtimeConfig"].to_json
|
145
|
+
realtime_config = Vapi::GoogleRealtimeConfig.from_json(json_object: realtime_config)
|
146
|
+
end
|
133
147
|
temperature = parsed_json["temperature"]
|
134
148
|
max_tokens = parsed_json["maxTokens"]
|
135
149
|
emotion_recognition_enabled = parsed_json["emotionRecognitionEnabled"]
|
@@ -141,6 +155,7 @@ module Vapi
|
|
141
155
|
knowledge_base: knowledge_base,
|
142
156
|
knowledge_base_id: knowledge_base_id,
|
143
157
|
model: model,
|
158
|
+
realtime_config: realtime_config,
|
144
159
|
temperature: temperature,
|
145
160
|
max_tokens: max_tokens,
|
146
161
|
emotion_recognition_enabled: emotion_recognition_enabled,
|
@@ -169,6 +184,7 @@ module Vapi
|
|
169
184
|
obj.knowledge_base.nil? || Vapi::CreateCustomKnowledgeBaseDto.validate_raw(obj: obj.knowledge_base)
|
170
185
|
obj.knowledge_base_id&.is_a?(String) != false || raise("Passed value for field obj.knowledge_base_id is not the expected type, validation failed.")
|
171
186
|
obj.model.is_a?(Vapi::GoogleModelModel) != false || raise("Passed value for field obj.model is not the expected type, validation failed.")
|
187
|
+
obj.realtime_config.nil? || Vapi::GoogleRealtimeConfig.validate_raw(obj: obj.realtime_config)
|
172
188
|
obj.temperature&.is_a?(Float) != false || raise("Passed value for field obj.temperature is not the expected type, validation failed.")
|
173
189
|
obj.max_tokens&.is_a?(Float) != false || raise("Passed value for field obj.max_tokens is not the expected type, validation failed.")
|
174
190
|
obj.emotion_recognition_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.emotion_recognition_enabled is not the expected type, validation failed.")
|
@@ -3,6 +3,8 @@
|
|
3
3
|
module Vapi
|
4
4
|
# This is the Google model that will be used.
|
5
5
|
class GoogleModelModel
|
6
|
+
GEMINI_20_FLASH_EXP = "gemini-2.0-flash-exp"
|
7
|
+
GEMINI_20_FLASH_REALTIME_EXP = "gemini-2.0-flash-realtime-exp"
|
6
8
|
GEMINI_15_FLASH = "gemini-1.5-flash"
|
7
9
|
GEMINI_15_FLASH_002 = "gemini-1.5-flash-002"
|
8
10
|
GEMINI_15_PRO = "gemini-1.5-pro"
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "gemini_multimodal_live_speech_config"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Vapi
|
8
|
+
class GoogleRealtimeConfig
|
9
|
+
# @return [Float] This is the nucleus sampling parameter that controls the cumulative probability
|
10
|
+
# of tokens considered during text generation.
|
11
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
12
|
+
attr_reader :top_p
|
13
|
+
# @return [Float] This is the top-k sampling parameter that limits the number of highest
|
14
|
+
# probability tokens considered during text generation.
|
15
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
16
|
+
attr_reader :top_k
|
17
|
+
# @return [Float] This is the presence penalty parameter that influences the model's likelihood to
|
18
|
+
# repeat information by penalizing tokens based on their presence in the text.
|
19
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
20
|
+
attr_reader :presence_penalty
|
21
|
+
# @return [Float] This is the frequency penalty parameter that influences the model's likelihood
|
22
|
+
# to repeat tokens by penalizing them based on their frequency in the text.
|
23
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
24
|
+
attr_reader :frequency_penalty
|
25
|
+
# @return [Vapi::GeminiMultimodalLiveSpeechConfig] This is the speech configuration object that defines the voice settings to be
|
26
|
+
# used for the model's speech output.
|
27
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
28
|
+
attr_reader :speech_config
|
29
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
attr_reader :additional_properties
|
31
|
+
# @return [Object]
|
32
|
+
attr_reader :_field_set
|
33
|
+
protected :_field_set
|
34
|
+
|
35
|
+
OMIT = Object.new
|
36
|
+
|
37
|
+
# @param top_p [Float] This is the nucleus sampling parameter that controls the cumulative probability
|
38
|
+
# of tokens considered during text generation.
|
39
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
40
|
+
# @param top_k [Float] This is the top-k sampling parameter that limits the number of highest
|
41
|
+
# probability tokens considered during text generation.
|
42
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
43
|
+
# @param presence_penalty [Float] This is the presence penalty parameter that influences the model's likelihood to
|
44
|
+
# repeat information by penalizing tokens based on their presence in the text.
|
45
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
46
|
+
# @param frequency_penalty [Float] This is the frequency penalty parameter that influences the model's likelihood
|
47
|
+
# to repeat tokens by penalizing them based on their frequency in the text.
|
48
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
49
|
+
# @param speech_config [Vapi::GeminiMultimodalLiveSpeechConfig] This is the speech configuration object that defines the voice settings to be
|
50
|
+
# used for the model's speech output.
|
51
|
+
# Only applicable with the Gemini Flash 2.0 Multimodal Live API.
|
52
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
53
|
+
# @return [Vapi::GoogleRealtimeConfig]
|
54
|
+
def initialize(top_p: OMIT, top_k: OMIT, presence_penalty: OMIT, frequency_penalty: OMIT, speech_config: OMIT,
|
55
|
+
additional_properties: nil)
|
56
|
+
@top_p = top_p if top_p != OMIT
|
57
|
+
@top_k = top_k if top_k != OMIT
|
58
|
+
@presence_penalty = presence_penalty if presence_penalty != OMIT
|
59
|
+
@frequency_penalty = frequency_penalty if frequency_penalty != OMIT
|
60
|
+
@speech_config = speech_config if speech_config != OMIT
|
61
|
+
@additional_properties = additional_properties
|
62
|
+
@_field_set = {
|
63
|
+
"topP": top_p,
|
64
|
+
"topK": top_k,
|
65
|
+
"presencePenalty": presence_penalty,
|
66
|
+
"frequencyPenalty": frequency_penalty,
|
67
|
+
"speechConfig": speech_config
|
68
|
+
}.reject do |_k, v|
|
69
|
+
v == OMIT
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Deserialize a JSON object to an instance of GoogleRealtimeConfig
|
74
|
+
#
|
75
|
+
# @param json_object [String]
|
76
|
+
# @return [Vapi::GoogleRealtimeConfig]
|
77
|
+
def self.from_json(json_object:)
|
78
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
79
|
+
parsed_json = JSON.parse(json_object)
|
80
|
+
top_p = parsed_json["topP"]
|
81
|
+
top_k = parsed_json["topK"]
|
82
|
+
presence_penalty = parsed_json["presencePenalty"]
|
83
|
+
frequency_penalty = parsed_json["frequencyPenalty"]
|
84
|
+
if parsed_json["speechConfig"].nil?
|
85
|
+
speech_config = nil
|
86
|
+
else
|
87
|
+
speech_config = parsed_json["speechConfig"].to_json
|
88
|
+
speech_config = Vapi::GeminiMultimodalLiveSpeechConfig.from_json(json_object: speech_config)
|
89
|
+
end
|
90
|
+
new(
|
91
|
+
top_p: top_p,
|
92
|
+
top_k: top_k,
|
93
|
+
presence_penalty: presence_penalty,
|
94
|
+
frequency_penalty: frequency_penalty,
|
95
|
+
speech_config: speech_config,
|
96
|
+
additional_properties: struct
|
97
|
+
)
|
98
|
+
end
|
99
|
+
|
100
|
+
# Serialize an instance of GoogleRealtimeConfig to a JSON object
|
101
|
+
#
|
102
|
+
# @return [String]
|
103
|
+
def to_json(*_args)
|
104
|
+
@_field_set&.to_json
|
105
|
+
end
|
106
|
+
|
107
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
108
|
+
# hash and check each fields type against the current object's property
|
109
|
+
# definitions.
|
110
|
+
#
|
111
|
+
# @param obj [Object]
|
112
|
+
# @return [Void]
|
113
|
+
def self.validate_raw(obj:)
|
114
|
+
obj.top_p&.is_a?(Float) != false || raise("Passed value for field obj.top_p is not the expected type, validation failed.")
|
115
|
+
obj.top_k&.is_a?(Float) != false || raise("Passed value for field obj.top_k is not the expected type, validation failed.")
|
116
|
+
obj.presence_penalty&.is_a?(Float) != false || raise("Passed value for field obj.presence_penalty is not the expected type, validation failed.")
|
117
|
+
obj.frequency_penalty&.is_a?(Float) != false || raise("Passed value for field obj.frequency_penalty is not the expected type, validation failed.")
|
118
|
+
obj.speech_config.nil? || Vapi::GeminiMultimodalLiveSpeechConfig.validate_raw(obj: obj.speech_config)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -3,15 +3,13 @@
|
|
3
3
|
module Vapi
|
4
4
|
# This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
|
5
5
|
class GroqModelModel
|
6
|
+
LLAMA_3370_B_VERSATILE = "llama-3.3-70b-versatile"
|
6
7
|
LLAMA_31405_B_REASONING = "llama-3.1-405b-reasoning"
|
7
8
|
LLAMA_3170_B_VERSATILE = "llama-3.1-70b-versatile"
|
8
9
|
LLAMA_318_B_INSTANT = "llama-3.1-8b-instant"
|
9
10
|
MIXTRAL_8_X_7_B_32768 = "mixtral-8x7b-32768"
|
10
11
|
LLAMA_38_B_8192 = "llama3-8b-8192"
|
11
12
|
LLAMA_370_B_8192 = "llama3-70b-8192"
|
12
|
-
LLAMA_3_GROQ_8_B_8192_TOOL_USE_PREVIEW = "llama3-groq-8b-8192-tool-use-preview"
|
13
|
-
LLAMA_3_GROQ_70_B_8192_TOOL_USE_PREVIEW = "llama3-groq-70b-8192-tool-use-preview"
|
14
|
-
GEMMA_7_B_IT = "gemma-7b-it"
|
15
13
|
GEMMA_29_B_IT = "gemma2-9b-it"
|
16
14
|
end
|
17
15
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "import_twilio_phone_number_dto_fallback_destination"
|
4
|
+
require_relative "server"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
@@ -31,16 +32,13 @@ module Vapi
|
|
31
32
|
# to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
|
32
33
|
# shape of the message and response that is expected.
|
33
34
|
attr_reader :squad_id
|
34
|
-
# @return [
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
|
40
|
-
|
41
|
-
# as a header called x-vapi-secret.
|
42
|
-
# Same precedence logic as serverUrl.
|
43
|
-
attr_reader :server_url_secret
|
35
|
+
# @return [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
|
36
|
+
# with their shape in ServerMessage schema.
|
37
|
+
# The order of precedence is:
|
38
|
+
# 1. assistant.server
|
39
|
+
# 2. phoneNumber.server
|
40
|
+
# 3. org.server
|
41
|
+
attr_reader :server
|
44
42
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
45
43
|
attr_reader :additional_properties
|
46
44
|
# @return [Object]
|
@@ -67,18 +65,16 @@ module Vapi
|
|
67
65
|
# If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent
|
68
66
|
# to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
|
69
67
|
# shape of the message and response that is expected.
|
70
|
-
# @param
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
# as a header called x-vapi-secret.
|
77
|
-
# Same precedence logic as serverUrl.
|
68
|
+
# @param server [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
|
69
|
+
# with their shape in ServerMessage schema.
|
70
|
+
# The order of precedence is:
|
71
|
+
# 1. assistant.server
|
72
|
+
# 2. phoneNumber.server
|
73
|
+
# 3. org.server
|
78
74
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
79
75
|
# @return [Vapi::ImportTwilioPhoneNumberDto]
|
80
76
|
def initialize(twilio_phone_number:, twilio_account_sid:, twilio_auth_token:, fallback_destination: OMIT,
|
81
|
-
name: OMIT, assistant_id: OMIT, squad_id: OMIT,
|
77
|
+
name: OMIT, assistant_id: OMIT, squad_id: OMIT, server: OMIT, additional_properties: nil)
|
82
78
|
@fallback_destination = fallback_destination if fallback_destination != OMIT
|
83
79
|
@twilio_phone_number = twilio_phone_number
|
84
80
|
@twilio_account_sid = twilio_account_sid
|
@@ -86,8 +82,7 @@ module Vapi
|
|
86
82
|
@name = name if name != OMIT
|
87
83
|
@assistant_id = assistant_id if assistant_id != OMIT
|
88
84
|
@squad_id = squad_id if squad_id != OMIT
|
89
|
-
@
|
90
|
-
@server_url_secret = server_url_secret if server_url_secret != OMIT
|
85
|
+
@server = server if server != OMIT
|
91
86
|
@additional_properties = additional_properties
|
92
87
|
@_field_set = {
|
93
88
|
"fallbackDestination": fallback_destination,
|
@@ -97,8 +92,7 @@ module Vapi
|
|
97
92
|
"name": name,
|
98
93
|
"assistantId": assistant_id,
|
99
94
|
"squadId": squad_id,
|
100
|
-
"
|
101
|
-
"serverUrlSecret": server_url_secret
|
95
|
+
"server": server
|
102
96
|
}.reject do |_k, v|
|
103
97
|
v == OMIT
|
104
98
|
end
|
@@ -123,8 +117,12 @@ module Vapi
|
|
123
117
|
name = parsed_json["name"]
|
124
118
|
assistant_id = parsed_json["assistantId"]
|
125
119
|
squad_id = parsed_json["squadId"]
|
126
|
-
|
127
|
-
|
120
|
+
if parsed_json["server"].nil?
|
121
|
+
server = nil
|
122
|
+
else
|
123
|
+
server = parsed_json["server"].to_json
|
124
|
+
server = Vapi::Server.from_json(json_object: server)
|
125
|
+
end
|
128
126
|
new(
|
129
127
|
fallback_destination: fallback_destination,
|
130
128
|
twilio_phone_number: twilio_phone_number,
|
@@ -133,8 +131,7 @@ module Vapi
|
|
133
131
|
name: name,
|
134
132
|
assistant_id: assistant_id,
|
135
133
|
squad_id: squad_id,
|
136
|
-
|
137
|
-
server_url_secret: server_url_secret,
|
134
|
+
server: server,
|
138
135
|
additional_properties: struct
|
139
136
|
)
|
140
137
|
end
|
@@ -160,8 +157,7 @@ module Vapi
|
|
160
157
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
161
158
|
obj.assistant_id&.is_a?(String) != false || raise("Passed value for field obj.assistant_id is not the expected type, validation failed.")
|
162
159
|
obj.squad_id&.is_a?(String) != false || raise("Passed value for field obj.squad_id is not the expected type, validation failed.")
|
163
|
-
obj.
|
164
|
-
obj.server_url_secret&.is_a?(String) != false || raise("Passed value for field obj.server_url_secret is not the expected type, validation failed.")
|
160
|
+
obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
|
165
161
|
end
|
166
162
|
end
|
167
163
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "import_vonage_phone_number_dto_fallback_destination"
|
4
|
+
require_relative "server"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
@@ -32,16 +33,13 @@ module Vapi
|
|
32
33
|
# to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
|
33
34
|
# shape of the message and response that is expected.
|
34
35
|
attr_reader :squad_id
|
35
|
-
# @return [
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
|
41
|
-
|
42
|
-
# as a header called x-vapi-secret.
|
43
|
-
# Same precedence logic as serverUrl.
|
44
|
-
attr_reader :server_url_secret
|
36
|
+
# @return [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
|
37
|
+
# with their shape in ServerMessage schema.
|
38
|
+
# The order of precedence is:
|
39
|
+
# 1. assistant.server
|
40
|
+
# 2. phoneNumber.server
|
41
|
+
# 3. org.server
|
42
|
+
attr_reader :server
|
45
43
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
46
44
|
attr_reader :additional_properties
|
47
45
|
# @return [Object]
|
@@ -70,26 +68,23 @@ module Vapi
|
|
70
68
|
# If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent
|
71
69
|
# to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
|
72
70
|
# shape of the message and response that is expected.
|
73
|
-
# @param
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
# as a header called x-vapi-secret.
|
80
|
-
# Same precedence logic as serverUrl.
|
71
|
+
# @param server [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
|
72
|
+
# with their shape in ServerMessage schema.
|
73
|
+
# The order of precedence is:
|
74
|
+
# 1. assistant.server
|
75
|
+
# 2. phoneNumber.server
|
76
|
+
# 3. org.server
|
81
77
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
82
78
|
# @return [Vapi::ImportVonagePhoneNumberDto]
|
83
79
|
def initialize(vonage_phone_number:, credential_id:, fallback_destination: OMIT, name: OMIT, assistant_id: OMIT,
|
84
|
-
squad_id: OMIT,
|
80
|
+
squad_id: OMIT, server: OMIT, additional_properties: nil)
|
85
81
|
@fallback_destination = fallback_destination if fallback_destination != OMIT
|
86
82
|
@vonage_phone_number = vonage_phone_number
|
87
83
|
@credential_id = credential_id
|
88
84
|
@name = name if name != OMIT
|
89
85
|
@assistant_id = assistant_id if assistant_id != OMIT
|
90
86
|
@squad_id = squad_id if squad_id != OMIT
|
91
|
-
@
|
92
|
-
@server_url_secret = server_url_secret if server_url_secret != OMIT
|
87
|
+
@server = server if server != OMIT
|
93
88
|
@additional_properties = additional_properties
|
94
89
|
@_field_set = {
|
95
90
|
"fallbackDestination": fallback_destination,
|
@@ -98,8 +93,7 @@ module Vapi
|
|
98
93
|
"name": name,
|
99
94
|
"assistantId": assistant_id,
|
100
95
|
"squadId": squad_id,
|
101
|
-
"
|
102
|
-
"serverUrlSecret": server_url_secret
|
96
|
+
"server": server
|
103
97
|
}.reject do |_k, v|
|
104
98
|
v == OMIT
|
105
99
|
end
|
@@ -123,8 +117,12 @@ module Vapi
|
|
123
117
|
name = parsed_json["name"]
|
124
118
|
assistant_id = parsed_json["assistantId"]
|
125
119
|
squad_id = parsed_json["squadId"]
|
126
|
-
|
127
|
-
|
120
|
+
if parsed_json["server"].nil?
|
121
|
+
server = nil
|
122
|
+
else
|
123
|
+
server = parsed_json["server"].to_json
|
124
|
+
server = Vapi::Server.from_json(json_object: server)
|
125
|
+
end
|
128
126
|
new(
|
129
127
|
fallback_destination: fallback_destination,
|
130
128
|
vonage_phone_number: vonage_phone_number,
|
@@ -132,8 +130,7 @@ module Vapi
|
|
132
130
|
name: name,
|
133
131
|
assistant_id: assistant_id,
|
134
132
|
squad_id: squad_id,
|
135
|
-
|
136
|
-
server_url_secret: server_url_secret,
|
133
|
+
server: server,
|
137
134
|
additional_properties: struct
|
138
135
|
)
|
139
136
|
end
|
@@ -158,8 +155,7 @@ module Vapi
|
|
158
155
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
159
156
|
obj.assistant_id&.is_a?(String) != false || raise("Passed value for field obj.assistant_id is not the expected type, validation failed.")
|
160
157
|
obj.squad_id&.is_a?(String) != false || raise("Passed value for field obj.squad_id is not the expected type, validation failed.")
|
161
|
-
obj.
|
162
|
-
obj.server_url_secret&.is_a?(String) != false || raise("Passed value for field obj.server_url_secret is not the expected type, validation failed.")
|
158
|
+
obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
|
163
159
|
end
|
164
160
|
end
|
165
161
|
end
|
@@ -2,7 +2,13 @@
|
|
2
2
|
|
3
3
|
module Vapi
|
4
4
|
class OpenAiModelFallbackModelsItem
|
5
|
+
O_1_PREVIEW = "o1-preview"
|
6
|
+
O_1_PREVIEW_20240912 = "o1-preview-2024-09-12"
|
7
|
+
O_1_MINI = "o1-mini"
|
8
|
+
O_1_MINI_20240912 = "o1-mini-2024-09-12"
|
5
9
|
GPT_4_O_REALTIME_PREVIEW_20241001 = "gpt-4o-realtime-preview-2024-10-01"
|
10
|
+
GPT_4_O_REALTIME_PREVIEW_20241217 = "gpt-4o-realtime-preview-2024-12-17"
|
11
|
+
GPT_4_O_MINI_REALTIME_PREVIEW_20241217 = "gpt-4o-mini-realtime-preview-2024-12-17"
|
6
12
|
GPT_4_O_MINI = "gpt-4o-mini"
|
7
13
|
GPT_4_O_MINI_20240718 = "gpt-4o-mini-2024-07-18"
|
8
14
|
GPT_4_O = "gpt-4o"
|