vapi_server_sdk 0.2.0 → 0.4.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 +160 -68
- data/lib/vapi_server_sdk/analytics/client.rb +0 -14
- data/lib/vapi_server_sdk/assistants/client.rb +19 -72
- 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 -236
- data/lib/vapi_server_sdk/blocks/types/blocks_update_request.rb +109 -0
- data/lib/vapi_server_sdk/calls/client.rb +22 -74
- data/lib/vapi_server_sdk/files/client.rb +0 -70
- data/lib/vapi_server_sdk/knowledge_bases/client.rb +7 -78
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_update_request.rb +96 -0
- data/lib/vapi_server_sdk/logs/client.rb +75 -22
- data/lib/vapi_server_sdk/logs/types/logging_controller_logs_delete_query_request_type.rb +12 -0
- data/lib/vapi_server_sdk/phone_numbers/client.rb +7 -139
- data/lib/vapi_server_sdk/phone_numbers/types/phone_numbers_update_request.rb +122 -0
- data/lib/vapi_server_sdk/squads/client.rb +16 -70
- data/lib/vapi_server_sdk/tools/client.rb +7 -161
- 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 +5 -3
- 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 +5 -3
- 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/bash_tool_with_tool_call.rb +175 -0
- data/lib/vapi_server_sdk/types/bash_tool_with_tool_call_messages_item.rb +120 -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/client_inbound_message_end_call.rb +47 -0
- data/lib/vapi_server_sdk/types/client_inbound_message_message.rb +13 -0
- data/lib/vapi_server_sdk/types/client_message_tool_calls_tool_with_tool_call_list_item.rb +116 -77
- 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/computer_tool_with_tool_call.rb +199 -0
- data/lib/vapi_server_sdk/types/computer_tool_with_tool_call_messages_item.rb +120 -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 +5 -3
- 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 +5 -3
- 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_knowledge_base_dto.rb +2 -4
- 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_trieve_knowledge_base_dto.rb +34 -47
- data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto_create_plan.rb +97 -0
- 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_workflow_dto.rb +87 -0
- data/lib/vapi_server_sdk/types/create_workflow_dto_nodes_item.rb +81 -0
- data/lib/vapi_server_sdk/types/create_x_ai_credential_dto.rb +2 -11
- data/lib/vapi_server_sdk/types/custom_knowledge_base.rb +2 -4
- 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/edge.rb +80 -0
- data/lib/vapi_server_sdk/types/edge_condition.rb +94 -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/function_tool_with_tool_call.rb +1 -10
- data/lib/vapi_server_sdk/types/gather.rb +87 -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/ghl_tool_with_tool_call.rb +1 -9
- 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/json_schema.rb +13 -2
- data/lib/vapi_server_sdk/types/log.rb +18 -18
- data/lib/vapi_server_sdk/types/make_tool_with_tool_call.rb +1 -9
- 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/{subscription_concurrency_line_remove_dto.rb → programmatic_edge_condition.rb} +16 -14
- data/lib/vapi_server_sdk/types/say.rb +72 -0
- data/lib/vapi_server_sdk/types/{payment_retry_dto.rb → semantic_edge_condition.rb} +16 -14
- 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/server_message_tool_calls_tool_with_tool_call_list_item.rb +116 -77
- 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 +13 -11
- data/lib/vapi_server_sdk/types/sync_voice_library_dto_providers_item.rb +1 -0
- data/lib/vapi_server_sdk/types/text_editor_tool_with_tool_call.rb +175 -0
- data/lib/vapi_server_sdk/types/text_editor_tool_with_tool_call_messages_item.rb +121 -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/trieve_knowledge_base.rb +35 -44
- data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_create_plan.rb → trieve_knowledge_base_chunk_plan.rb} +17 -11
- data/lib/vapi_server_sdk/types/trieve_knowledge_base_create.rb +59 -0
- data/lib/vapi_server_sdk/types/trieve_knowledge_base_create_plan.rb +96 -0
- data/lib/vapi_server_sdk/types/{subscription_concurrency_line_buy_dto.rb → trieve_knowledge_base_import.rb} +14 -14
- data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_search_plan.rb → trieve_knowledge_base_search_plan.rb} +9 -11
- data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_search_plan_search_type.rb → trieve_knowledge_base_search_plan_search_type.rb} +1 -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 +5 -3
- 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 +5 -3
- 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 +137 -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 +96 -0
- data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto_create_plan.rb +97 -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_workflow_dto.rb +82 -0
- data/lib/vapi_server_sdk/types/update_workflow_dto_nodes_item.rb +81 -0
- data/lib/vapi_server_sdk/types/update_x_ai_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/vapi_model.rb +27 -1
- data/lib/vapi_server_sdk/types/vapi_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/vonage_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/workflow.rb +125 -0
- data/lib/vapi_server_sdk/types/workflow_nodes_item.rb +81 -0
- metadata +116 -24
- 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_status.rb +0 -11
- data/lib/vapi_server_sdk/types/payments_paginated_response.rb +0 -75
- 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,95 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "fallback_smallest_ai_voice_id"
|
4
|
+
require_relative "chunk_plan"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module Vapi
|
9
|
+
class FallbackSmallestAiVoice
|
10
|
+
# @return [Vapi::FallbackSmallestAiVoiceId] This is the provider-specific ID that will be used.
|
11
|
+
attr_reader :voice_id
|
12
|
+
# @return [String] Smallest AI voice model to use. Defaults to 'lightning' when not specified.
|
13
|
+
attr_reader :model
|
14
|
+
# @return [Float] This is the speed multiplier that will be used.
|
15
|
+
attr_reader :speed
|
16
|
+
# @return [Vapi::ChunkPlan] This is the plan for chunking the model output before it is sent to the voice
|
17
|
+
# provider.
|
18
|
+
attr_reader :chunk_plan
|
19
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
attr_reader :additional_properties
|
21
|
+
# @return [Object]
|
22
|
+
attr_reader :_field_set
|
23
|
+
protected :_field_set
|
24
|
+
|
25
|
+
OMIT = Object.new
|
26
|
+
|
27
|
+
# @param voice_id [Vapi::FallbackSmallestAiVoiceId] This is the provider-specific ID that will be used.
|
28
|
+
# @param model [String] Smallest AI voice model to use. Defaults to 'lightning' when not specified.
|
29
|
+
# @param speed [Float] This is the speed multiplier that will be used.
|
30
|
+
# @param chunk_plan [Vapi::ChunkPlan] This is the plan for chunking the model output before it is sent to the voice
|
31
|
+
# provider.
|
32
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
# @return [Vapi::FallbackSmallestAiVoice]
|
34
|
+
def initialize(voice_id:, model: OMIT, speed: OMIT, chunk_plan: OMIT, additional_properties: nil)
|
35
|
+
@voice_id = voice_id
|
36
|
+
@model = model if model != OMIT
|
37
|
+
@speed = speed if speed != OMIT
|
38
|
+
@chunk_plan = chunk_plan if chunk_plan != OMIT
|
39
|
+
@additional_properties = additional_properties
|
40
|
+
@_field_set = { "voiceId": voice_id, "model": model, "speed": speed, "chunkPlan": chunk_plan }.reject do |_k, v|
|
41
|
+
v == OMIT
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Deserialize a JSON object to an instance of FallbackSmallestAiVoice
|
46
|
+
#
|
47
|
+
# @param json_object [String]
|
48
|
+
# @return [Vapi::FallbackSmallestAiVoice]
|
49
|
+
def self.from_json(json_object:)
|
50
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
51
|
+
parsed_json = JSON.parse(json_object)
|
52
|
+
if parsed_json["voiceId"].nil?
|
53
|
+
voice_id = nil
|
54
|
+
else
|
55
|
+
voice_id = parsed_json["voiceId"].to_json
|
56
|
+
voice_id = Vapi::FallbackSmallestAiVoiceId.from_json(json_object: voice_id)
|
57
|
+
end
|
58
|
+
model = parsed_json["model"]
|
59
|
+
speed = parsed_json["speed"]
|
60
|
+
if parsed_json["chunkPlan"].nil?
|
61
|
+
chunk_plan = nil
|
62
|
+
else
|
63
|
+
chunk_plan = parsed_json["chunkPlan"].to_json
|
64
|
+
chunk_plan = Vapi::ChunkPlan.from_json(json_object: chunk_plan)
|
65
|
+
end
|
66
|
+
new(
|
67
|
+
voice_id: voice_id,
|
68
|
+
model: model,
|
69
|
+
speed: speed,
|
70
|
+
chunk_plan: chunk_plan,
|
71
|
+
additional_properties: struct
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
# Serialize an instance of FallbackSmallestAiVoice to a JSON object
|
76
|
+
#
|
77
|
+
# @return [String]
|
78
|
+
def to_json(*_args)
|
79
|
+
@_field_set&.to_json
|
80
|
+
end
|
81
|
+
|
82
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
83
|
+
# hash and check each fields type against the current object's property
|
84
|
+
# definitions.
|
85
|
+
#
|
86
|
+
# @param obj [Object]
|
87
|
+
# @return [Void]
|
88
|
+
def self.validate_raw(obj:)
|
89
|
+
Vapi::FallbackSmallestAiVoiceId.validate_raw(obj: obj.voice_id)
|
90
|
+
obj.model&.is_a?(String) != false || raise("Passed value for field obj.model is not the expected type, validation failed.")
|
91
|
+
obj.speed&.is_a?(Float) != false || raise("Passed value for field obj.speed is not the expected type, validation failed.")
|
92
|
+
obj.chunk_plan.nil? || Vapi::ChunkPlan.validate_raw(obj: obj.chunk_plan)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Vapi
|
6
|
+
# This is the provider-specific ID that will be used.
|
7
|
+
class FallbackSmallestAiVoiceId
|
8
|
+
# Deserialize a JSON object to an instance of FallbackSmallestAiVoiceId
|
9
|
+
#
|
10
|
+
# @param json_object [String]
|
11
|
+
# @return [Vapi::FallbackSmallestAiVoiceId]
|
12
|
+
def self.from_json(json_object:)
|
13
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
14
|
+
begin
|
15
|
+
struct.is_a?(Vapi::FallbackSmallestAiVoiceIdEnum) != false || raise("Passed value for field struct is not the expected type, validation failed.")
|
16
|
+
return struct unless struct.nil?
|
17
|
+
|
18
|
+
return nil
|
19
|
+
rescue StandardError
|
20
|
+
# noop
|
21
|
+
end
|
22
|
+
begin
|
23
|
+
struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
|
24
|
+
return struct unless struct.nil?
|
25
|
+
|
26
|
+
return nil
|
27
|
+
rescue StandardError
|
28
|
+
# noop
|
29
|
+
end
|
30
|
+
struct
|
31
|
+
end
|
32
|
+
|
33
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
34
|
+
# hash and check each fields type against the current object's property
|
35
|
+
# definitions.
|
36
|
+
#
|
37
|
+
# @param obj [Object]
|
38
|
+
# @return [Void]
|
39
|
+
def self.validate_raw(obj:)
|
40
|
+
begin
|
41
|
+
return obj.is_a?(Vapi::FallbackSmallestAiVoiceIdEnum) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
42
|
+
rescue StandardError
|
43
|
+
# noop
|
44
|
+
end
|
45
|
+
begin
|
46
|
+
return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
47
|
+
rescue StandardError
|
48
|
+
# noop
|
49
|
+
end
|
50
|
+
raise("Passed value matched no type within the union, validation failed.")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Vapi
|
4
|
+
class FallbackSmallestAiVoiceIdEnum
|
5
|
+
EMILY = "emily"
|
6
|
+
JASMINE = "jasmine"
|
7
|
+
ARMAN = "arman"
|
8
|
+
JAMES = "james"
|
9
|
+
MITHALI = "mithali"
|
10
|
+
ARAVIND = "aravind"
|
11
|
+
RAJ = "raj"
|
12
|
+
DIYA = "diya"
|
13
|
+
RAMAN = "raman"
|
14
|
+
ANANYA = "ananya"
|
15
|
+
ISHA = "isha"
|
16
|
+
WILLIAM = "william"
|
17
|
+
AARAV = "aarav"
|
18
|
+
MONIKA = "monika"
|
19
|
+
NIHARIKA = "niharika"
|
20
|
+
DEEPIKA = "deepika"
|
21
|
+
RAGHAV = "raghav"
|
22
|
+
KAJAL = "kajal"
|
23
|
+
RADHIKA = "radhika"
|
24
|
+
MANSI = "mansi"
|
25
|
+
NISHA = "nisha"
|
26
|
+
SAURABH = "saurabh"
|
27
|
+
POOJA = "pooja"
|
28
|
+
SAINA = "saina"
|
29
|
+
SANYA = "sanya"
|
30
|
+
end
|
31
|
+
end
|
@@ -21,8 +21,6 @@ module Vapi
|
|
21
21
|
# `tool.destinations`. For others like the function tool, these can be custom
|
22
22
|
# configured.
|
23
23
|
attr_reader :messages
|
24
|
-
# @return [String] The type of tool. "function" for Function tool.
|
25
|
-
attr_reader :type
|
26
24
|
# @return [Vapi::ToolCall]
|
27
25
|
attr_reader :tool_call
|
28
26
|
# @return [Vapi::OpenAiFunction] This is the function definition of the tool.
|
@@ -60,7 +58,6 @@ module Vapi
|
|
60
58
|
# For some tools, this is auto-filled based on special fields like
|
61
59
|
# `tool.destinations`. For others like the function tool, these can be custom
|
62
60
|
# configured.
|
63
|
-
# @param type [String] The type of tool. "function" for Function tool.
|
64
61
|
# @param tool_call [Vapi::ToolCall]
|
65
62
|
# @param function [Vapi::OpenAiFunction] This is the function definition of the tool.
|
66
63
|
# For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on
|
@@ -79,11 +76,9 @@ module Vapi
|
|
79
76
|
# phoneNumber.serverUrl, then org.serverUrl.
|
80
77
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
81
78
|
# @return [Vapi::FunctionToolWithToolCall]
|
82
|
-
def initialize(
|
83
|
-
additional_properties: nil)
|
79
|
+
def initialize(tool_call:, async: OMIT, messages: OMIT, function: OMIT, server: OMIT, additional_properties: nil)
|
84
80
|
@async = async if async != OMIT
|
85
81
|
@messages = messages if messages != OMIT
|
86
|
-
@type = type
|
87
82
|
@tool_call = tool_call
|
88
83
|
@function = function if function != OMIT
|
89
84
|
@server = server if server != OMIT
|
@@ -91,7 +86,6 @@ module Vapi
|
|
91
86
|
@_field_set = {
|
92
87
|
"async": async,
|
93
88
|
"messages": messages,
|
94
|
-
"type": type,
|
95
89
|
"toolCall": tool_call,
|
96
90
|
"function": function,
|
97
91
|
"server": server
|
@@ -112,7 +106,6 @@ module Vapi
|
|
112
106
|
item = item.to_json
|
113
107
|
Vapi::FunctionToolWithToolCallMessagesItem.from_json(json_object: item)
|
114
108
|
end
|
115
|
-
type = parsed_json["type"]
|
116
109
|
if parsed_json["toolCall"].nil?
|
117
110
|
tool_call = nil
|
118
111
|
else
|
@@ -134,7 +127,6 @@ module Vapi
|
|
134
127
|
new(
|
135
128
|
async: async,
|
136
129
|
messages: messages,
|
137
|
-
type: type,
|
138
130
|
tool_call: tool_call,
|
139
131
|
function: function,
|
140
132
|
server: server,
|
@@ -158,7 +150,6 @@ module Vapi
|
|
158
150
|
def self.validate_raw(obj:)
|
159
151
|
obj.async&.is_a?(Boolean) != false || raise("Passed value for field obj.async is not the expected type, validation failed.")
|
160
152
|
obj.messages&.is_a?(Array) != false || raise("Passed value for field obj.messages is not the expected type, validation failed.")
|
161
|
-
obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
162
153
|
Vapi::ToolCall.validate_raw(obj: obj.tool_call)
|
163
154
|
obj.function.nil? || Vapi::OpenAiFunction.validate_raw(obj: obj.function)
|
164
155
|
obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "json_schema"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Vapi
|
8
|
+
class Gather
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :type
|
11
|
+
# @return [Vapi::JsonSchema]
|
12
|
+
attr_reader :schema
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :instruction
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :name
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param type [String]
|
26
|
+
# @param schema [Vapi::JsonSchema]
|
27
|
+
# @param instruction [String]
|
28
|
+
# @param name [String]
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [Vapi::Gather]
|
31
|
+
def initialize(type:, instruction:, name:, schema: OMIT, additional_properties: nil)
|
32
|
+
@type = type
|
33
|
+
@schema = schema if schema != OMIT
|
34
|
+
@instruction = instruction
|
35
|
+
@name = name
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = { "type": type, "schema": schema, "instruction": instruction, "name": name }.reject do |_k, v|
|
38
|
+
v == OMIT
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Deserialize a JSON object to an instance of Gather
|
43
|
+
#
|
44
|
+
# @param json_object [String]
|
45
|
+
# @return [Vapi::Gather]
|
46
|
+
def self.from_json(json_object:)
|
47
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
48
|
+
parsed_json = JSON.parse(json_object)
|
49
|
+
type = parsed_json["type"]
|
50
|
+
if parsed_json["schema"].nil?
|
51
|
+
schema = nil
|
52
|
+
else
|
53
|
+
schema = parsed_json["schema"].to_json
|
54
|
+
schema = Vapi::JsonSchema.from_json(json_object: schema)
|
55
|
+
end
|
56
|
+
instruction = parsed_json["instruction"]
|
57
|
+
name = parsed_json["name"]
|
58
|
+
new(
|
59
|
+
type: type,
|
60
|
+
schema: schema,
|
61
|
+
instruction: instruction,
|
62
|
+
name: name,
|
63
|
+
additional_properties: struct
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Serialize an instance of Gather to a JSON object
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
def to_json(*_args)
|
71
|
+
@_field_set&.to_json
|
72
|
+
end
|
73
|
+
|
74
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
75
|
+
# hash and check each fields type against the current object's property
|
76
|
+
# definitions.
|
77
|
+
#
|
78
|
+
# @param obj [Object]
|
79
|
+
# @return [Void]
|
80
|
+
def self.validate_raw(obj:)
|
81
|
+
obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
82
|
+
obj.schema.nil? || Vapi::JsonSchema.validate_raw(obj: obj.schema)
|
83
|
+
obj.instruction.is_a?(String) != false || raise("Passed value for field obj.instruction is not the expected type, validation failed.")
|
84
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -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
|
@@ -22,8 +22,6 @@ module Vapi
|
|
22
22
|
# `tool.destinations`. For others like the function tool, these can be custom
|
23
23
|
# configured.
|
24
24
|
attr_reader :messages
|
25
|
-
# @return [String] The type of tool. "ghl" for GHL tool.
|
26
|
-
attr_reader :type
|
27
25
|
# @return [Vapi::ToolCall]
|
28
26
|
attr_reader :tool_call
|
29
27
|
# @return [Vapi::GhlToolMetadata]
|
@@ -63,7 +61,6 @@ module Vapi
|
|
63
61
|
# For some tools, this is auto-filled based on special fields like
|
64
62
|
# `tool.destinations`. For others like the function tool, these can be custom
|
65
63
|
# configured.
|
66
|
-
# @param type [String] The type of tool. "ghl" for GHL tool.
|
67
64
|
# @param tool_call [Vapi::ToolCall]
|
68
65
|
# @param metadata [Vapi::GhlToolMetadata]
|
69
66
|
# @param function [Vapi::OpenAiFunction] This is the function definition of the tool.
|
@@ -83,11 +80,10 @@ module Vapi
|
|
83
80
|
# phoneNumber.serverUrl, then org.serverUrl.
|
84
81
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
85
82
|
# @return [Vapi::GhlToolWithToolCall]
|
86
|
-
def initialize(
|
83
|
+
def initialize(tool_call:, metadata:, async: OMIT, messages: OMIT, function: OMIT, server: OMIT,
|
87
84
|
additional_properties: nil)
|
88
85
|
@async = async if async != OMIT
|
89
86
|
@messages = messages if messages != OMIT
|
90
|
-
@type = type
|
91
87
|
@tool_call = tool_call
|
92
88
|
@metadata = metadata
|
93
89
|
@function = function if function != OMIT
|
@@ -96,7 +92,6 @@ module Vapi
|
|
96
92
|
@_field_set = {
|
97
93
|
"async": async,
|
98
94
|
"messages": messages,
|
99
|
-
"type": type,
|
100
95
|
"toolCall": tool_call,
|
101
96
|
"metadata": metadata,
|
102
97
|
"function": function,
|
@@ -118,7 +113,6 @@ module Vapi
|
|
118
113
|
item = item.to_json
|
119
114
|
Vapi::GhlToolWithToolCallMessagesItem.from_json(json_object: item)
|
120
115
|
end
|
121
|
-
type = parsed_json["type"]
|
122
116
|
if parsed_json["toolCall"].nil?
|
123
117
|
tool_call = nil
|
124
118
|
else
|
@@ -146,7 +140,6 @@ module Vapi
|
|
146
140
|
new(
|
147
141
|
async: async,
|
148
142
|
messages: messages,
|
149
|
-
type: type,
|
150
143
|
tool_call: tool_call,
|
151
144
|
metadata: metadata,
|
152
145
|
function: function,
|
@@ -171,7 +164,6 @@ module Vapi
|
|
171
164
|
def self.validate_raw(obj:)
|
172
165
|
obj.async&.is_a?(Boolean) != false || raise("Passed value for field obj.async is not the expected type, validation failed.")
|
173
166
|
obj.messages&.is_a?(Array) != false || raise("Passed value for field obj.messages is not the expected type, validation failed.")
|
174
|
-
obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
175
167
|
Vapi::ToolCall.validate_raw(obj: obj.tool_call)
|
176
168
|
Vapi::GhlToolMetadata.validate_raw(obj: obj.metadata)
|
177
169
|
obj.function.nil? || Vapi::OpenAiFunction.validate_raw(obj: obj.function)
|
@@ -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"
|