vapi_server_sdk 0.1.0 → 0.2.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 +184 -26
- data/lib/vapi_server_sdk/analytics/client.rb +14 -43
- data/lib/vapi_server_sdk/assistants/client.rb +57 -60
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_client_messages_item.rb +1 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_model.rb +39 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_server_messages_item.rb +1 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_transcriber.rb +27 -1
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_voice.rb +26 -0
- data/lib/vapi_server_sdk/calls/client.rb +58 -28
- data/lib/vapi_server_sdk/knowledge_bases/client.rb +394 -0
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_create_request.rb +96 -0
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_create_response.rb +96 -0
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_delete_response.rb +96 -0
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_get_response.rb +96 -0
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_list_response_item.rb +96 -0
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_update_response.rb +96 -0
- data/lib/vapi_server_sdk/logs/client.rb +10 -6
- data/lib/vapi_server_sdk/squads/client.rb +56 -32
- data/lib/vapi_server_sdk/tools/client.rb +4 -0
- data/lib/vapi_server_sdk/tools/types/tools_create_request.rb +39 -0
- data/lib/vapi_server_sdk/tools/types/tools_create_response.rb +39 -0
- data/lib/vapi_server_sdk/tools/types/tools_delete_response.rb +39 -0
- data/lib/vapi_server_sdk/tools/types/tools_get_response.rb +39 -0
- data/lib/vapi_server_sdk/tools/types/tools_list_response_item.rb +39 -0
- data/lib/vapi_server_sdk/tools/types/tools_update_response.rb +39 -0
- data/lib/vapi_server_sdk/types/analytics_query_dto.rb +59 -0
- data/lib/vapi_server_sdk/types/anthropic_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/anthropic_model.rb +21 -13
- data/lib/vapi_server_sdk/types/anthropic_model_model.rb +2 -0
- data/lib/vapi_server_sdk/types/anyscale_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/anyscale_model.rb +21 -13
- data/lib/vapi_server_sdk/types/assembly_ai_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/assembly_ai_transcriber.rb +97 -0
- data/lib/vapi_server_sdk/types/assistant.rb +42 -64
- data/lib/vapi_server_sdk/types/assistant_client_messages_item.rb +1 -0
- data/lib/vapi_server_sdk/types/assistant_custom_endpointing_rule.rb +100 -0
- data/lib/vapi_server_sdk/types/assistant_model.rb +39 -0
- data/lib/vapi_server_sdk/types/assistant_overrides.rb +57 -65
- data/lib/vapi_server_sdk/types/assistant_overrides_client_messages_item.rb +1 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_model.rb +39 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_server_messages_item.rb +1 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_transcriber.rb +27 -1
- data/lib/vapi_server_sdk/types/assistant_overrides_voice.rb +26 -0
- data/lib/vapi_server_sdk/types/assistant_server_messages_item.rb +1 -0
- data/lib/vapi_server_sdk/types/assistant_transcriber.rb +27 -1
- data/lib/vapi_server_sdk/types/assistant_voice.rb +26 -0
- data/lib/vapi_server_sdk/types/auto_reload_plan.rb +65 -0
- data/lib/vapi_server_sdk/types/auto_reload_plan_dto.rb +65 -0
- data/lib/vapi_server_sdk/types/azure_credential.rb +129 -0
- data/lib/vapi_server_sdk/types/azure_credential_region.rb +23 -0
- data/lib/vapi_server_sdk/types/azure_open_ai_credential.rb +12 -2
- data/lib/vapi_server_sdk/types/azure_open_ai_credential_models_item.rb +1 -0
- data/lib/vapi_server_sdk/types/azure_open_ai_credential_region.rb +1 -0
- data/lib/vapi_server_sdk/types/azure_voice.rb +25 -21
- data/lib/vapi_server_sdk/types/bash_tool.rb +194 -0
- data/lib/vapi_server_sdk/types/bash_tool_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/block_complete_message.rb +29 -4
- data/lib/vapi_server_sdk/types/block_start_message.rb +29 -4
- data/lib/vapi_server_sdk/types/both_custom_endpointing_rule.rb +126 -0
- data/lib/vapi_server_sdk/types/byo_sip_trunk_credential.rb +29 -9
- data/lib/vapi_server_sdk/types/call.rb +15 -1
- data/lib/vapi_server_sdk/types/call_ended_reason.rb +49 -24
- data/lib/vapi_server_sdk/types/call_log_privileged.rb +88 -0
- data/lib/vapi_server_sdk/types/call_log_privileged_level.rb +12 -0
- data/lib/vapi_server_sdk/types/call_logs_paginated_response.rb +75 -0
- data/lib/vapi_server_sdk/types/cartesia_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/cartesia_voice.rb +25 -21
- data/lib/vapi_server_sdk/types/cartesia_voice_language.rb +9 -1
- data/lib/vapi_server_sdk/types/client_inbound_message_add_message.rb +25 -3
- data/lib/vapi_server_sdk/types/client_inbound_message_message.rb +13 -0
- data/lib/vapi_server_sdk/types/client_inbound_message_transfer.rb +63 -0
- data/lib/vapi_server_sdk/types/client_inbound_message_transfer_destination.rb +96 -0
- data/lib/vapi_server_sdk/types/{client_message_language_changed.rb → client_message_language_change_detected.rb} +5 -5
- data/lib/vapi_server_sdk/types/client_message_message.rb +22 -9
- data/lib/vapi_server_sdk/types/client_message_tool_calls_tool_with_tool_call_list_item.rb +77 -77
- data/lib/vapi_server_sdk/types/client_message_transfer_update.rb +116 -0
- data/lib/vapi_server_sdk/types/client_message_transfer_update_destination.rb +122 -0
- data/lib/vapi_server_sdk/types/computer_tool.rb +218 -0
- data/lib/vapi_server_sdk/types/computer_tool_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/condition.rb +9 -9
- data/lib/vapi_server_sdk/types/create_anthropic_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_anyscale_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_assembly_ai_credential_dto.rb +74 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto.rb +43 -65
- data/lib/vapi_server_sdk/types/create_assistant_dto_client_messages_item.rb +1 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_model.rb +39 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_server_messages_item.rb +1 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_transcriber.rb +27 -1
- data/lib/vapi_server_sdk/types/create_assistant_dto_voice.rb +26 -0
- data/lib/vapi_server_sdk/types/create_azure_credential_dto.rb +95 -0
- data/lib/vapi_server_sdk/types/create_azure_credential_dto_region.rb +23 -0
- data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb +13 -3
- data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_models_item.rb +1 -0
- data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_region.rb +1 -0
- data/lib/vapi_server_sdk/types/create_bash_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/create_bash_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/create_byo_sip_trunk_credential_dto.rb +31 -11
- data/lib/vapi_server_sdk/types/create_cartesia_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_computer_tool_dto.rb +185 -0
- data/lib/vapi_server_sdk/types/create_computer_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/create_custom_knowledge_base_dto.rb +137 -0
- data/lib/vapi_server_sdk/types/create_custom_llm_credential_dto.rb +31 -2
- data/lib/vapi_server_sdk/types/create_deep_infra_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_deepgram_credential_dto.rb +9 -2
- data/lib/vapi_server_sdk/types/create_eleven_labs_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_gcp_credential_dto.rb +10 -10
- data/lib/vapi_server_sdk/types/create_gladia_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_go_high_level_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_google_credential_dto.rb +76 -0
- data/lib/vapi_server_sdk/types/create_groq_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_inflection_ai_credential_dto.rb +76 -0
- data/lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb +96 -0
- data/lib/vapi_server_sdk/types/create_lmnt_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_make_credential_dto.rb +17 -2
- data/lib/vapi_server_sdk/types/create_open_ai_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_open_router_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_org_dto.rb +21 -2
- data/lib/vapi_server_sdk/types/create_org_dto_channel.rb +10 -0
- data/lib/vapi_server_sdk/types/create_perplexity_ai_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_play_ht_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_rime_ai_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_runpod_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_s_3_credential_dto.rb +13 -3
- data/lib/vapi_server_sdk/types/{knowledge_base.rb → create_tavus_credential_dto.rb} +21 -21
- data/lib/vapi_server_sdk/types/create_text_editor_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/create_text_editor_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/create_together_ai_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto.rb +109 -0
- data/lib/vapi_server_sdk/types/create_twilio_credential_dto.rb +16 -2
- data/lib/vapi_server_sdk/types/create_vapi_phone_number_dto.rb +20 -2
- data/lib/vapi_server_sdk/types/create_vonage_credential_dto.rb +16 -2
- data/lib/vapi_server_sdk/types/create_webhook_credential_dto.rb +84 -0
- data/lib/vapi_server_sdk/types/create_x_ai_credential_dto.rb +76 -0
- data/lib/vapi_server_sdk/types/credits_buy_dto.rb +55 -0
- data/lib/vapi_server_sdk/types/custom_knowledge_base.rb +154 -0
- data/lib/vapi_server_sdk/types/custom_llm_credential.rb +46 -3
- data/lib/vapi_server_sdk/types/custom_llm_model.rb +23 -15
- data/lib/vapi_server_sdk/types/custom_message.rb +92 -0
- data/lib/vapi_server_sdk/types/custom_transcriber.rb +125 -0
- data/lib/vapi_server_sdk/types/custom_voice.rb +132 -0
- data/lib/vapi_server_sdk/types/customer_custom_endpointing_rule.rb +100 -0
- data/lib/vapi_server_sdk/types/deep_infra_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/deep_infra_model.rb +21 -13
- data/lib/vapi_server_sdk/types/deepgram_credential.rb +9 -1
- data/lib/vapi_server_sdk/types/deepgram_transcriber.rb +69 -11
- data/lib/vapi_server_sdk/types/deepgram_voice.rb +17 -17
- data/lib/vapi_server_sdk/types/eleven_labs_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/eleven_labs_voice.rb +28 -24
- data/lib/vapi_server_sdk/types/fallback_azure_voice.rb +100 -0
- data/lib/vapi_server_sdk/types/fallback_azure_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/fallback_azure_voice_voice_id.rb +9 -0
- data/lib/vapi_server_sdk/types/fallback_cartesia_voice.rb +100 -0
- data/lib/vapi_server_sdk/types/fallback_cartesia_voice_language.rb +23 -0
- data/lib/vapi_server_sdk/types/fallback_cartesia_voice_model.rb +10 -0
- data/lib/vapi_server_sdk/types/fallback_custom_voice.rb +117 -0
- data/lib/vapi_server_sdk/types/fallback_deepgram_voice.rb +81 -0
- data/lib/vapi_server_sdk/types/fallback_deepgram_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/fallback_deepgram_voice_id_enum.rb +18 -0
- data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice.rb +164 -0
- data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_id.rb +54 -0
- data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_id_enum.rb +21 -0
- data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_model.rb +12 -0
- data/lib/vapi_server_sdk/types/fallback_lmnt_voice.rb +88 -0
- data/lib/vapi_server_sdk/types/fallback_lmnt_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/fallback_lmnt_voice_id_enum.rb +8 -0
- data/lib/vapi_server_sdk/types/fallback_neets_voice.rb +81 -0
- data/lib/vapi_server_sdk/types/fallback_neets_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/fallback_neets_voice_id_enum.rb +7 -0
- data/lib/vapi_server_sdk/types/fallback_open_ai_voice.rb +87 -0
- data/lib/vapi_server_sdk/types/fallback_open_ai_voice_id.rb +20 -0
- data/lib/vapi_server_sdk/types/fallback_plan.rb +61 -0
- data/lib/vapi_server_sdk/types/fallback_plan_voices_item.rb +211 -0
- data/lib/vapi_server_sdk/types/fallback_play_ht_voice.rb +172 -0
- data/lib/vapi_server_sdk/types/fallback_play_ht_voice_emotion.rb +19 -0
- data/lib/vapi_server_sdk/types/fallback_play_ht_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/fallback_play_ht_voice_id_enum.rb +16 -0
- data/lib/vapi_server_sdk/types/fallback_play_ht_voice_language.rb +44 -0
- data/lib/vapi_server_sdk/types/fallback_play_ht_voice_model.rb +10 -0
- data/lib/vapi_server_sdk/types/fallback_rime_ai_voice.rb +96 -0
- data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_id_enum.rb +87 -0
- data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_model.rb +9 -0
- data/lib/vapi_server_sdk/types/fallback_tavus_voice.rb +147 -0
- data/lib/vapi_server_sdk/types/fallback_tavus_voice_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/format_plan.rb +0 -2
- data/lib/vapi_server_sdk/types/function_tool_with_tool_call.rb +10 -1
- data/lib/vapi_server_sdk/types/gcp_credential.rb +2 -2
- data/lib/vapi_server_sdk/types/ghl_tool_with_tool_call.rb +9 -1
- data/lib/vapi_server_sdk/types/gladia_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/go_high_level_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/google_credential.rb +113 -0
- data/lib/vapi_server_sdk/types/google_model.rb +178 -0
- data/lib/vapi_server_sdk/types/google_model_model.rb +12 -0
- data/lib/vapi_server_sdk/types/google_model_tools_item.rb +159 -0
- data/lib/vapi_server_sdk/types/groq_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/groq_model.rb +21 -13
- data/lib/vapi_server_sdk/types/hipaa_buy_dto.rb +65 -0
- data/lib/vapi_server_sdk/types/inflection_ai_credential.rb +113 -0
- data/lib/vapi_server_sdk/types/inflection_ai_model.rb +177 -0
- data/lib/vapi_server_sdk/types/inflection_ai_model_tools_item.rb +159 -0
- data/lib/vapi_server_sdk/types/invite_user_dto.rb +9 -9
- data/lib/vapi_server_sdk/types/knowledge_base_response_document.rb +74 -0
- data/lib/vapi_server_sdk/types/langfuse_credential.rb +130 -0
- data/lib/vapi_server_sdk/types/lmnt_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/lmnt_voice.rb +18 -14
- data/lib/vapi_server_sdk/types/log.rb +12 -4
- data/lib/vapi_server_sdk/types/log_resource.rb +8 -0
- data/lib/vapi_server_sdk/types/make_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/make_tool_with_tool_call.rb +9 -1
- data/lib/vapi_server_sdk/types/neets_voice.rb +17 -17
- data/lib/vapi_server_sdk/types/o_auth_2_authentication_plan.rb +79 -0
- data/lib/vapi_server_sdk/types/oauth_2_authentication_session.rb +68 -0
- data/lib/vapi_server_sdk/types/open_ai_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/open_ai_function.rb +30 -4
- data/lib/vapi_server_sdk/types/open_ai_model.rb +23 -15
- data/lib/vapi_server_sdk/types/open_ai_model_fallback_models_item.rb +2 -0
- data/lib/vapi_server_sdk/types/open_ai_model_model.rb +2 -0
- data/lib/vapi_server_sdk/types/open_ai_voice.rb +22 -14
- data/lib/vapi_server_sdk/types/open_ai_voice_id.rb +7 -0
- data/lib/vapi_server_sdk/types/open_router_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/open_router_model.rb +21 -13
- data/lib/vapi_server_sdk/types/org.rb +35 -2
- data/lib/vapi_server_sdk/types/org_channel.rb +10 -0
- data/lib/vapi_server_sdk/types/org_with_org_user.rb +262 -0
- data/lib/vapi_server_sdk/types/org_with_org_user_channel.rb +10 -0
- data/lib/vapi_server_sdk/types/org_with_org_user_role.rb +9 -0
- data/lib/vapi_server_sdk/types/payment.rb +167 -0
- data/lib/vapi_server_sdk/types/payment_retry_dto.rb +55 -0
- data/lib/vapi_server_sdk/types/payment_status.rb +11 -0
- data/lib/vapi_server_sdk/types/payments_paginated_response.rb +75 -0
- data/lib/vapi_server_sdk/types/perplexity_ai_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/perplexity_ai_model.rb +21 -13
- data/lib/vapi_server_sdk/types/phone_number_paginated_response.rb +75 -0
- data/lib/vapi_server_sdk/types/phone_number_paginated_response_results_item.rb +121 -0
- data/lib/vapi_server_sdk/types/play_ht_credential.rb +13 -2
- data/lib/vapi_server_sdk/types/play_ht_voice.rb +37 -15
- data/lib/vapi_server_sdk/types/play_ht_voice_language.rb +44 -0
- data/lib/vapi_server_sdk/types/play_ht_voice_model.rb +10 -0
- data/lib/vapi_server_sdk/types/regex_option.rb +2 -2
- data/lib/vapi_server_sdk/types/regex_option_type.rb +1 -1
- data/lib/vapi_server_sdk/types/regex_replacement.rb +14 -4
- data/lib/vapi_server_sdk/types/rime_ai_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/rime_ai_voice.rb +18 -14
- data/lib/vapi_server_sdk/types/runpod_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/s_3_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/server.rb +16 -2
- data/lib/vapi_server_sdk/types/server_message_end_of_call_report_ended_reason.rb +49 -24
- data/lib/vapi_server_sdk/types/server_message_knowledge_base_request.rb +195 -0
- data/lib/vapi_server_sdk/types/server_message_knowledge_base_request_messages_item.rb +97 -0
- data/lib/vapi_server_sdk/types/{server_message_language_changed_phone_number.rb → server_message_knowledge_base_request_phone_number.rb} +8 -8
- data/lib/vapi_server_sdk/types/{server_message_language_changed.rb → server_message_language_change_detected.rb} +10 -10
- data/lib/vapi_server_sdk/types/server_message_language_change_detected_phone_number.rb +125 -0
- data/lib/vapi_server_sdk/types/server_message_message.rb +22 -9
- data/lib/vapi_server_sdk/types/server_message_response_knowledge_base_request.rb +81 -0
- data/lib/vapi_server_sdk/types/server_message_response_message_response.rb +14 -0
- data/lib/vapi_server_sdk/types/server_message_status_update_ended_reason.rb +49 -24
- data/lib/vapi_server_sdk/types/server_message_tool_calls_tool_with_tool_call_list_item.rb +77 -77
- data/lib/vapi_server_sdk/types/server_message_transfer_update.rb +18 -2
- data/lib/vapi_server_sdk/types/sip_authentication.rb +80 -0
- data/lib/vapi_server_sdk/types/start_speaking_plan.rb +54 -10
- data/lib/vapi_server_sdk/types/start_speaking_plan_custom_endpointing_rules_item.rb +108 -0
- data/lib/vapi_server_sdk/types/structured_data_plan.rb +28 -10
- data/lib/vapi_server_sdk/types/subscription.rb +336 -0
- data/lib/vapi_server_sdk/types/subscription_concurrency_line_buy_dto.rb +55 -0
- data/lib/vapi_server_sdk/types/subscription_concurrency_line_remove_dto.rb +55 -0
- data/lib/vapi_server_sdk/types/subscription_coupon_add_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/subscription_monthly_charge.rb +65 -0
- data/lib/vapi_server_sdk/types/subscription_status.rb +10 -0
- data/lib/vapi_server_sdk/types/subscription_type.rb +10 -0
- data/lib/vapi_server_sdk/types/success_evaluation_plan.rb +38 -16
- data/lib/vapi_server_sdk/types/summary_plan.rb +26 -8
- data/lib/vapi_server_sdk/types/sync_voice_library_dto_providers_item.rb +1 -0
- data/lib/vapi_server_sdk/types/tavus_conversation_properties.rb +173 -0
- data/lib/vapi_server_sdk/types/tavus_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/tavus_voice.rb +163 -0
- data/lib/vapi_server_sdk/types/tavus_voice_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/text_content.rb +73 -0
- data/lib/vapi_server_sdk/types/text_content_language.rb +191 -0
- data/lib/vapi_server_sdk/types/text_editor_tool.rb +194 -0
- data/lib/vapi_server_sdk/types/text_editor_tool_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/together_ai_credential.rb +13 -3
- data/lib/vapi_server_sdk/types/together_ai_model.rb +21 -13
- data/lib/vapi_server_sdk/types/tool_message_complete.rb +29 -3
- data/lib/vapi_server_sdk/types/tool_message_delayed.rb +30 -3
- data/lib/vapi_server_sdk/types/tool_message_failed.rb +30 -3
- data/lib/vapi_server_sdk/types/tool_message_start.rb +29 -4
- data/lib/vapi_server_sdk/types/transfer_destination_assistant.rb +79 -33
- data/lib/vapi_server_sdk/types/transfer_destination_assistant_message.rb +65 -0
- data/lib/vapi_server_sdk/types/transfer_destination_number.rb +56 -24
- data/lib/vapi_server_sdk/types/transfer_destination_number_message.rb +65 -0
- data/lib/vapi_server_sdk/types/transfer_destination_sip.rb +60 -15
- data/lib/vapi_server_sdk/types/transfer_destination_sip_message.rb +65 -0
- data/lib/vapi_server_sdk/types/transfer_destination_step.rb +28 -14
- data/lib/vapi_server_sdk/types/transfer_destination_step_message.rb +65 -0
- data/lib/vapi_server_sdk/types/transfer_plan.rb +141 -0
- data/lib/vapi_server_sdk/types/transfer_plan_message.rb +58 -0
- data/lib/vapi_server_sdk/types/transfer_plan_mode.rb +32 -0
- data/lib/vapi_server_sdk/types/transport.rb +70 -0
- data/lib/vapi_server_sdk/types/transport_cost.rb +12 -2
- data/lib/vapi_server_sdk/types/transport_cost_provider.rb +9 -0
- data/lib/vapi_server_sdk/types/transport_provider.rb +11 -0
- data/lib/vapi_server_sdk/types/trieve_knowledge_base.rb +125 -0
- data/lib/vapi_server_sdk/types/trieve_knowledge_base_vector_store_create_plan.rb +109 -0
- data/lib/vapi_server_sdk/types/trieve_knowledge_base_vector_store_search_plan.rb +95 -0
- data/lib/vapi_server_sdk/types/trieve_knowledge_base_vector_store_search_plan_search_type.rb +12 -0
- data/lib/vapi_server_sdk/types/twilio_credential.rb +12 -2
- data/lib/vapi_server_sdk/types/update_anthropic_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_anyscale_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_assembly_ai_credential_dto.rb +74 -0
- data/lib/vapi_server_sdk/types/update_azure_credential_dto.rb +95 -0
- data/lib/vapi_server_sdk/types/update_azure_credential_dto_region.rb +23 -0
- data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto.rb +13 -3
- data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_models_item.rb +1 -0
- data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_region.rb +1 -0
- data/lib/vapi_server_sdk/types/update_byo_sip_trunk_credential_dto.rb +31 -11
- data/lib/vapi_server_sdk/types/update_cartesia_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_custom_llm_credential_dto.rb +31 -2
- data/lib/vapi_server_sdk/types/update_deep_infra_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_deepgram_credential_dto.rb +9 -2
- data/lib/vapi_server_sdk/types/update_eleven_labs_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_gcp_credential_dto.rb +10 -10
- data/lib/vapi_server_sdk/types/update_gladia_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_go_high_level_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_google_credential_dto.rb +76 -0
- data/lib/vapi_server_sdk/types/update_groq_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_inflection_ai_credential_dto.rb +76 -0
- data/lib/vapi_server_sdk/types/update_langfuse_credential_dto.rb +96 -0
- data/lib/vapi_server_sdk/types/update_lmnt_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_make_credential_dto.rb +17 -2
- data/lib/vapi_server_sdk/types/update_open_ai_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_open_router_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_org_dto.rb +21 -2
- data/lib/vapi_server_sdk/types/update_org_dto_channel.rb +10 -0
- data/lib/vapi_server_sdk/types/update_perplexity_ai_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_play_ht_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_rime_ai_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_runpod_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_s_3_credential_dto.rb +13 -3
- data/lib/vapi_server_sdk/types/update_tavus_credential_dto.rb +74 -0
- data/lib/vapi_server_sdk/types/update_together_ai_credential_dto.rb +11 -2
- data/lib/vapi_server_sdk/types/update_twilio_credential_dto.rb +16 -2
- data/lib/vapi_server_sdk/types/update_vonage_credential_dto.rb +16 -2
- data/lib/vapi_server_sdk/types/update_x_ai_credential_dto.rb +76 -0
- data/lib/vapi_server_sdk/types/vapi_cost.rb +10 -2
- data/lib/vapi_server_sdk/types/vapi_cost_sub_type.rb +9 -0
- data/lib/vapi_server_sdk/types/vapi_model.rb +24 -16
- data/lib/vapi_server_sdk/types/vapi_phone_number.rb +20 -2
- data/lib/vapi_server_sdk/types/vonage_credential.rb +12 -2
- data/lib/vapi_server_sdk/types/webhook_credential.rb +134 -0
- data/lib/vapi_server_sdk/types/x_ai_credential.rb +113 -0
- data/lib/vapi_server_sdk/types/xai_model.rb +177 -0
- data/lib/vapi_server_sdk/types/xai_model_tools_item.rb +159 -0
- data/lib/vapi_server_sdk.rb +7 -0
- metadata +165 -6
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "open_ai_message"
|
4
4
|
require_relative "together_ai_model_tools_item"
|
5
|
-
require_relative "
|
5
|
+
require_relative "create_custom_knowledge_base_dto"
|
6
6
|
require "ostruct"
|
7
7
|
require "json"
|
8
8
|
|
@@ -18,13 +18,15 @@ module Vapi
|
|
18
18
|
# tools, use `tools`.
|
19
19
|
# Both `tools` and `toolIds` can be used together.
|
20
20
|
attr_reader :tool_ids
|
21
|
+
# @return [Vapi::CreateCustomKnowledgeBaseDto] These are the options for the knowledge base.
|
22
|
+
attr_reader :knowledge_base
|
23
|
+
# @return [String] This is the ID of the knowledge base the model will use.
|
24
|
+
attr_reader :knowledge_base_id
|
21
25
|
# @return [String] This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
|
22
26
|
attr_reader :model
|
23
27
|
# @return [Float] This is the temperature that will be used for calls. Default is 0 to leverage
|
24
28
|
# caching for lower latency.
|
25
29
|
attr_reader :temperature
|
26
|
-
# @return [Vapi::KnowledgeBase] These are the options for the knowledge base.
|
27
|
-
attr_reader :knowledge_base
|
28
30
|
# @return [Float] This is the max number of tokens that the assistant will be allowed to generate
|
29
31
|
# in each turn of the conversation. Default is 250.
|
30
32
|
attr_reader :max_tokens
|
@@ -55,10 +57,11 @@ module Vapi
|
|
55
57
|
# @param tool_ids [Array<String>] These are the tools that the assistant can use during the call. To use transient
|
56
58
|
# tools, use `tools`.
|
57
59
|
# Both `tools` and `toolIds` can be used together.
|
60
|
+
# @param knowledge_base [Vapi::CreateCustomKnowledgeBaseDto] These are the options for the knowledge base.
|
61
|
+
# @param knowledge_base_id [String] This is the ID of the knowledge base the model will use.
|
58
62
|
# @param model [String] This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
|
59
63
|
# @param temperature [Float] This is the temperature that will be used for calls. Default is 0 to leverage
|
60
64
|
# caching for lower latency.
|
61
|
-
# @param knowledge_base [Vapi::KnowledgeBase] These are the options for the knowledge base.
|
62
65
|
# @param max_tokens [Float] This is the max number of tokens that the assistant will be allowed to generate
|
63
66
|
# in each turn of the conversation. Default is 250.
|
64
67
|
# @param emotion_recognition_enabled [Boolean] This determines whether we detect user's emotion while they speak and send it as
|
@@ -73,14 +76,15 @@ module Vapi
|
|
73
76
|
# @default 0
|
74
77
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
75
78
|
# @return [Vapi::TogetherAiModel]
|
76
|
-
def initialize(model:, messages: OMIT, tools: OMIT, tool_ids: OMIT,
|
77
|
-
max_tokens: OMIT, emotion_recognition_enabled: OMIT, num_fast_turns: OMIT, additional_properties: nil)
|
79
|
+
def initialize(model:, messages: OMIT, tools: OMIT, tool_ids: OMIT, knowledge_base: OMIT, knowledge_base_id: OMIT,
|
80
|
+
temperature: OMIT, max_tokens: OMIT, emotion_recognition_enabled: OMIT, num_fast_turns: OMIT, additional_properties: nil)
|
78
81
|
@messages = messages if messages != OMIT
|
79
82
|
@tools = tools if tools != OMIT
|
80
83
|
@tool_ids = tool_ids if tool_ids != OMIT
|
84
|
+
@knowledge_base = knowledge_base if knowledge_base != OMIT
|
85
|
+
@knowledge_base_id = knowledge_base_id if knowledge_base_id != OMIT
|
81
86
|
@model = model
|
82
87
|
@temperature = temperature if temperature != OMIT
|
83
|
-
@knowledge_base = knowledge_base if knowledge_base != OMIT
|
84
88
|
@max_tokens = max_tokens if max_tokens != OMIT
|
85
89
|
@emotion_recognition_enabled = emotion_recognition_enabled if emotion_recognition_enabled != OMIT
|
86
90
|
@num_fast_turns = num_fast_turns if num_fast_turns != OMIT
|
@@ -89,9 +93,10 @@ module Vapi
|
|
89
93
|
"messages": messages,
|
90
94
|
"tools": tools,
|
91
95
|
"toolIds": tool_ids,
|
96
|
+
"knowledgeBase": knowledge_base,
|
97
|
+
"knowledgeBaseId": knowledge_base_id,
|
92
98
|
"model": model,
|
93
99
|
"temperature": temperature,
|
94
|
-
"knowledgeBase": knowledge_base,
|
95
100
|
"maxTokens": max_tokens,
|
96
101
|
"emotionRecognitionEnabled": emotion_recognition_enabled,
|
97
102
|
"numFastTurns": num_fast_turns
|
@@ -116,14 +121,15 @@ module Vapi
|
|
116
121
|
Vapi::TogetherAiModelToolsItem.from_json(json_object: item)
|
117
122
|
end
|
118
123
|
tool_ids = parsed_json["toolIds"]
|
119
|
-
model = parsed_json["model"]
|
120
|
-
temperature = parsed_json["temperature"]
|
121
124
|
if parsed_json["knowledgeBase"].nil?
|
122
125
|
knowledge_base = nil
|
123
126
|
else
|
124
127
|
knowledge_base = parsed_json["knowledgeBase"].to_json
|
125
|
-
knowledge_base = Vapi::
|
128
|
+
knowledge_base = Vapi::CreateCustomKnowledgeBaseDto.from_json(json_object: knowledge_base)
|
126
129
|
end
|
130
|
+
knowledge_base_id = parsed_json["knowledgeBaseId"]
|
131
|
+
model = parsed_json["model"]
|
132
|
+
temperature = parsed_json["temperature"]
|
127
133
|
max_tokens = parsed_json["maxTokens"]
|
128
134
|
emotion_recognition_enabled = parsed_json["emotionRecognitionEnabled"]
|
129
135
|
num_fast_turns = parsed_json["numFastTurns"]
|
@@ -131,9 +137,10 @@ module Vapi
|
|
131
137
|
messages: messages,
|
132
138
|
tools: tools,
|
133
139
|
tool_ids: tool_ids,
|
140
|
+
knowledge_base: knowledge_base,
|
141
|
+
knowledge_base_id: knowledge_base_id,
|
134
142
|
model: model,
|
135
143
|
temperature: temperature,
|
136
|
-
knowledge_base: knowledge_base,
|
137
144
|
max_tokens: max_tokens,
|
138
145
|
emotion_recognition_enabled: emotion_recognition_enabled,
|
139
146
|
num_fast_turns: num_fast_turns,
|
@@ -158,9 +165,10 @@ module Vapi
|
|
158
165
|
obj.messages&.is_a?(Array) != false || raise("Passed value for field obj.messages is not the expected type, validation failed.")
|
159
166
|
obj.tools&.is_a?(Array) != false || raise("Passed value for field obj.tools is not the expected type, validation failed.")
|
160
167
|
obj.tool_ids&.is_a?(Array) != false || raise("Passed value for field obj.tool_ids is not the expected type, validation failed.")
|
168
|
+
obj.knowledge_base.nil? || Vapi::CreateCustomKnowledgeBaseDto.validate_raw(obj: obj.knowledge_base)
|
169
|
+
obj.knowledge_base_id&.is_a?(String) != false || raise("Passed value for field obj.knowledge_base_id is not the expected type, validation failed.")
|
161
170
|
obj.model.is_a?(String) != false || raise("Passed value for field obj.model is not the expected type, validation failed.")
|
162
171
|
obj.temperature&.is_a?(Float) != false || raise("Passed value for field obj.temperature is not the expected type, validation failed.")
|
163
|
-
obj.knowledge_base.nil? || Vapi::KnowledgeBase.validate_raw(obj: obj.knowledge_base)
|
164
172
|
obj.max_tokens&.is_a?(Float) != false || raise("Passed value for field obj.max_tokens is not the expected type, validation failed.")
|
165
173
|
obj.emotion_recognition_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.emotion_recognition_enabled is not the expected type, validation failed.")
|
166
174
|
obj.num_fast_turns&.is_a?(Float) != false || raise("Passed value for field obj.num_fast_turns is not the expected type, validation failed.")
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "text_content"
|
3
4
|
require_relative "tool_message_complete_role"
|
4
5
|
require_relative "condition"
|
5
6
|
require "ostruct"
|
@@ -7,6 +8,15 @@ require "json"
|
|
7
8
|
|
8
9
|
module Vapi
|
9
10
|
class ToolMessageComplete
|
11
|
+
# @return [Array<Vapi::TextContent>] This is an alternative to the `content` property. It allows to specify variants
|
12
|
+
# of the same content, one per language.
|
13
|
+
# Usage:
|
14
|
+
# - If your assistants are multilingual, you can provide content for each
|
15
|
+
# language.
|
16
|
+
# - If you don't provide content for a language, the first item in the array will
|
17
|
+
# be automatically translated to the active language at that moment.
|
18
|
+
# This will override the `content` property.
|
19
|
+
attr_reader :contents
|
10
20
|
# @return [Vapi::ToolMessageCompleteRole] This is optional and defaults to "assistant".
|
11
21
|
# When role=assistant, `content` is said out loud.
|
12
22
|
# When role=system, `content` is passed to the model in a system message. Example:
|
@@ -42,6 +52,14 @@ module Vapi
|
|
42
52
|
|
43
53
|
OMIT = Object.new
|
44
54
|
|
55
|
+
# @param contents [Array<Vapi::TextContent>] This is an alternative to the `content` property. It allows to specify variants
|
56
|
+
# of the same content, one per language.
|
57
|
+
# Usage:
|
58
|
+
# - If your assistants are multilingual, you can provide content for each
|
59
|
+
# language.
|
60
|
+
# - If you don't provide content for a language, the first item in the array will
|
61
|
+
# be automatically translated to the active language at that moment.
|
62
|
+
# This will override the `content` property.
|
45
63
|
# @param role [Vapi::ToolMessageCompleteRole] This is optional and defaults to "assistant".
|
46
64
|
# When role=assistant, `content` is said out loud.
|
47
65
|
# When role=system, `content` is passed to the model in a system message. Example:
|
@@ -67,14 +85,16 @@ module Vapi
|
|
67
85
|
# in order for this message to be triggered.
|
68
86
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
69
87
|
# @return [Vapi::ToolMessageComplete]
|
70
|
-
def initialize(
|
88
|
+
def initialize(contents: OMIT, role: OMIT, end_call_after_spoken_enabled: OMIT, content: OMIT, conditions: OMIT,
|
71
89
|
additional_properties: nil)
|
90
|
+
@contents = contents if contents != OMIT
|
72
91
|
@role = role if role != OMIT
|
73
92
|
@end_call_after_spoken_enabled = end_call_after_spoken_enabled if end_call_after_spoken_enabled != OMIT
|
74
|
-
@content = content
|
93
|
+
@content = content if content != OMIT
|
75
94
|
@conditions = conditions if conditions != OMIT
|
76
95
|
@additional_properties = additional_properties
|
77
96
|
@_field_set = {
|
97
|
+
"contents": contents,
|
78
98
|
"role": role,
|
79
99
|
"endCallAfterSpokenEnabled": end_call_after_spoken_enabled,
|
80
100
|
"content": content,
|
@@ -91,6 +111,10 @@ module Vapi
|
|
91
111
|
def self.from_json(json_object:)
|
92
112
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
93
113
|
parsed_json = JSON.parse(json_object)
|
114
|
+
contents = parsed_json["contents"]&.map do |item|
|
115
|
+
item = item.to_json
|
116
|
+
Vapi::TextContent.from_json(json_object: item)
|
117
|
+
end
|
94
118
|
role = parsed_json["role"]
|
95
119
|
end_call_after_spoken_enabled = parsed_json["endCallAfterSpokenEnabled"]
|
96
120
|
content = parsed_json["content"]
|
@@ -99,6 +123,7 @@ module Vapi
|
|
99
123
|
Vapi::Condition.from_json(json_object: item)
|
100
124
|
end
|
101
125
|
new(
|
126
|
+
contents: contents,
|
102
127
|
role: role,
|
103
128
|
end_call_after_spoken_enabled: end_call_after_spoken_enabled,
|
104
129
|
content: content,
|
@@ -121,9 +146,10 @@ module Vapi
|
|
121
146
|
# @param obj [Object]
|
122
147
|
# @return [Void]
|
123
148
|
def self.validate_raw(obj:)
|
149
|
+
obj.contents&.is_a?(Array) != false || raise("Passed value for field obj.contents is not the expected type, validation failed.")
|
124
150
|
obj.role&.is_a?(Vapi::ToolMessageCompleteRole) != false || raise("Passed value for field obj.role is not the expected type, validation failed.")
|
125
151
|
obj.end_call_after_spoken_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.end_call_after_spoken_enabled is not the expected type, validation failed.")
|
126
|
-
obj.content
|
152
|
+
obj.content&.is_a?(String) != false || raise("Passed value for field obj.content is not the expected type, validation failed.")
|
127
153
|
obj.conditions&.is_a?(Array) != false || raise("Passed value for field obj.conditions is not the expected type, validation failed.")
|
128
154
|
end
|
129
155
|
end
|
@@ -1,11 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "text_content"
|
3
4
|
require_relative "condition"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
7
8
|
module Vapi
|
8
9
|
class ToolMessageDelayed
|
10
|
+
# @return [Array<Vapi::TextContent>] This is an alternative to the `content` property. It allows to specify variants
|
11
|
+
# of the same content, one per language.
|
12
|
+
# Usage:
|
13
|
+
# - If your assistants are multilingual, you can provide content for each
|
14
|
+
# language.
|
15
|
+
# - If you don't provide content for a language, the first item in the array will
|
16
|
+
# be automatically translated to the active language at that moment.
|
17
|
+
# This will override the `content` property.
|
18
|
+
attr_reader :contents
|
9
19
|
# @return [Float] The number of milliseconds to wait for the server response before saying this
|
10
20
|
# message.
|
11
21
|
attr_reader :timing_milliseconds
|
@@ -22,6 +32,14 @@ module Vapi
|
|
22
32
|
|
23
33
|
OMIT = Object.new
|
24
34
|
|
35
|
+
# @param contents [Array<Vapi::TextContent>] This is an alternative to the `content` property. It allows to specify variants
|
36
|
+
# of the same content, one per language.
|
37
|
+
# Usage:
|
38
|
+
# - If your assistants are multilingual, you can provide content for each
|
39
|
+
# language.
|
40
|
+
# - If you don't provide content for a language, the first item in the array will
|
41
|
+
# be automatically translated to the active language at that moment.
|
42
|
+
# This will override the `content` property.
|
25
43
|
# @param timing_milliseconds [Float] The number of milliseconds to wait for the server response before saying this
|
26
44
|
# message.
|
27
45
|
# @param content [String] This is the content that the assistant says when this message is triggered.
|
@@ -29,12 +47,15 @@ module Vapi
|
|
29
47
|
# in order for this message to be triggered.
|
30
48
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
49
|
# @return [Vapi::ToolMessageDelayed]
|
32
|
-
def initialize(
|
50
|
+
def initialize(contents: OMIT, timing_milliseconds: OMIT, content: OMIT, conditions: OMIT,
|
51
|
+
additional_properties: nil)
|
52
|
+
@contents = contents if contents != OMIT
|
33
53
|
@timing_milliseconds = timing_milliseconds if timing_milliseconds != OMIT
|
34
|
-
@content = content
|
54
|
+
@content = content if content != OMIT
|
35
55
|
@conditions = conditions if conditions != OMIT
|
36
56
|
@additional_properties = additional_properties
|
37
57
|
@_field_set = {
|
58
|
+
"contents": contents,
|
38
59
|
"timingMilliseconds": timing_milliseconds,
|
39
60
|
"content": content,
|
40
61
|
"conditions": conditions
|
@@ -50,6 +71,10 @@ module Vapi
|
|
50
71
|
def self.from_json(json_object:)
|
51
72
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
52
73
|
parsed_json = JSON.parse(json_object)
|
74
|
+
contents = parsed_json["contents"]&.map do |item|
|
75
|
+
item = item.to_json
|
76
|
+
Vapi::TextContent.from_json(json_object: item)
|
77
|
+
end
|
53
78
|
timing_milliseconds = parsed_json["timingMilliseconds"]
|
54
79
|
content = parsed_json["content"]
|
55
80
|
conditions = parsed_json["conditions"]&.map do |item|
|
@@ -57,6 +82,7 @@ module Vapi
|
|
57
82
|
Vapi::Condition.from_json(json_object: item)
|
58
83
|
end
|
59
84
|
new(
|
85
|
+
contents: contents,
|
60
86
|
timing_milliseconds: timing_milliseconds,
|
61
87
|
content: content,
|
62
88
|
conditions: conditions,
|
@@ -78,8 +104,9 @@ module Vapi
|
|
78
104
|
# @param obj [Object]
|
79
105
|
# @return [Void]
|
80
106
|
def self.validate_raw(obj:)
|
107
|
+
obj.contents&.is_a?(Array) != false || raise("Passed value for field obj.contents is not the expected type, validation failed.")
|
81
108
|
obj.timing_milliseconds&.is_a?(Float) != false || raise("Passed value for field obj.timing_milliseconds is not the expected type, validation failed.")
|
82
|
-
obj.content
|
109
|
+
obj.content&.is_a?(String) != false || raise("Passed value for field obj.content is not the expected type, validation failed.")
|
83
110
|
obj.conditions&.is_a?(Array) != false || raise("Passed value for field obj.conditions is not the expected type, validation failed.")
|
84
111
|
end
|
85
112
|
end
|
@@ -1,11 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "text_content"
|
3
4
|
require_relative "condition"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
7
8
|
module Vapi
|
8
9
|
class ToolMessageFailed
|
10
|
+
# @return [Array<Vapi::TextContent>] This is an alternative to the `content` property. It allows to specify variants
|
11
|
+
# of the same content, one per language.
|
12
|
+
# Usage:
|
13
|
+
# - If your assistants are multilingual, you can provide content for each
|
14
|
+
# language.
|
15
|
+
# - If you don't provide content for a language, the first item in the array will
|
16
|
+
# be automatically translated to the active language at that moment.
|
17
|
+
# This will override the `content` property.
|
18
|
+
attr_reader :contents
|
9
19
|
# @return [Boolean] This is an optional boolean that if true, the call will end after the message is
|
10
20
|
# spoken. Default is false.
|
11
21
|
# @default false
|
@@ -23,6 +33,14 @@ module Vapi
|
|
23
33
|
|
24
34
|
OMIT = Object.new
|
25
35
|
|
36
|
+
# @param contents [Array<Vapi::TextContent>] This is an alternative to the `content` property. It allows to specify variants
|
37
|
+
# of the same content, one per language.
|
38
|
+
# Usage:
|
39
|
+
# - If your assistants are multilingual, you can provide content for each
|
40
|
+
# language.
|
41
|
+
# - If you don't provide content for a language, the first item in the array will
|
42
|
+
# be automatically translated to the active language at that moment.
|
43
|
+
# This will override the `content` property.
|
26
44
|
# @param end_call_after_spoken_enabled [Boolean] This is an optional boolean that if true, the call will end after the message is
|
27
45
|
# spoken. Default is false.
|
28
46
|
# @default false
|
@@ -31,12 +49,15 @@ module Vapi
|
|
31
49
|
# in order for this message to be triggered.
|
32
50
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
51
|
# @return [Vapi::ToolMessageFailed]
|
34
|
-
def initialize(
|
52
|
+
def initialize(contents: OMIT, end_call_after_spoken_enabled: OMIT, content: OMIT, conditions: OMIT,
|
53
|
+
additional_properties: nil)
|
54
|
+
@contents = contents if contents != OMIT
|
35
55
|
@end_call_after_spoken_enabled = end_call_after_spoken_enabled if end_call_after_spoken_enabled != OMIT
|
36
|
-
@content = content
|
56
|
+
@content = content if content != OMIT
|
37
57
|
@conditions = conditions if conditions != OMIT
|
38
58
|
@additional_properties = additional_properties
|
39
59
|
@_field_set = {
|
60
|
+
"contents": contents,
|
40
61
|
"endCallAfterSpokenEnabled": end_call_after_spoken_enabled,
|
41
62
|
"content": content,
|
42
63
|
"conditions": conditions
|
@@ -52,6 +73,10 @@ module Vapi
|
|
52
73
|
def self.from_json(json_object:)
|
53
74
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
54
75
|
parsed_json = JSON.parse(json_object)
|
76
|
+
contents = parsed_json["contents"]&.map do |item|
|
77
|
+
item = item.to_json
|
78
|
+
Vapi::TextContent.from_json(json_object: item)
|
79
|
+
end
|
55
80
|
end_call_after_spoken_enabled = parsed_json["endCallAfterSpokenEnabled"]
|
56
81
|
content = parsed_json["content"]
|
57
82
|
conditions = parsed_json["conditions"]&.map do |item|
|
@@ -59,6 +84,7 @@ module Vapi
|
|
59
84
|
Vapi::Condition.from_json(json_object: item)
|
60
85
|
end
|
61
86
|
new(
|
87
|
+
contents: contents,
|
62
88
|
end_call_after_spoken_enabled: end_call_after_spoken_enabled,
|
63
89
|
content: content,
|
64
90
|
conditions: conditions,
|
@@ -80,8 +106,9 @@ module Vapi
|
|
80
106
|
# @param obj [Object]
|
81
107
|
# @return [Void]
|
82
108
|
def self.validate_raw(obj:)
|
109
|
+
obj.contents&.is_a?(Array) != false || raise("Passed value for field obj.contents is not the expected type, validation failed.")
|
83
110
|
obj.end_call_after_spoken_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.end_call_after_spoken_enabled is not the expected type, validation failed.")
|
84
|
-
obj.content
|
111
|
+
obj.content&.is_a?(String) != false || raise("Passed value for field obj.content is not the expected type, validation failed.")
|
85
112
|
obj.conditions&.is_a?(Array) != false || raise("Passed value for field obj.conditions is not the expected type, validation failed.")
|
86
113
|
end
|
87
114
|
end
|
@@ -1,11 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "text_content"
|
3
4
|
require_relative "condition"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
7
8
|
module Vapi
|
8
9
|
class ToolMessageStart
|
10
|
+
# @return [Array<Vapi::TextContent>] This is an alternative to the `content` property. It allows to specify variants
|
11
|
+
# of the same content, one per language.
|
12
|
+
# Usage:
|
13
|
+
# - If your assistants are multilingual, you can provide content for each
|
14
|
+
# language.
|
15
|
+
# - If you don't provide content for a language, the first item in the array will
|
16
|
+
# be automatically translated to the active language at that moment.
|
17
|
+
# This will override the `content` property.
|
18
|
+
attr_reader :contents
|
9
19
|
# @return [String] This is the content that the assistant says when this message is triggered.
|
10
20
|
attr_reader :content
|
11
21
|
# @return [Array<Vapi::Condition>] This is an optional array of conditions that the tool call arguments must meet
|
@@ -19,16 +29,25 @@ module Vapi
|
|
19
29
|
|
20
30
|
OMIT = Object.new
|
21
31
|
|
32
|
+
# @param contents [Array<Vapi::TextContent>] This is an alternative to the `content` property. It allows to specify variants
|
33
|
+
# of the same content, one per language.
|
34
|
+
# Usage:
|
35
|
+
# - If your assistants are multilingual, you can provide content for each
|
36
|
+
# language.
|
37
|
+
# - If you don't provide content for a language, the first item in the array will
|
38
|
+
# be automatically translated to the active language at that moment.
|
39
|
+
# This will override the `content` property.
|
22
40
|
# @param content [String] This is the content that the assistant says when this message is triggered.
|
23
41
|
# @param conditions [Array<Vapi::Condition>] This is an optional array of conditions that the tool call arguments must meet
|
24
42
|
# in order for this message to be triggered.
|
25
43
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
44
|
# @return [Vapi::ToolMessageStart]
|
27
|
-
def initialize(content
|
28
|
-
@
|
45
|
+
def initialize(contents: OMIT, content: OMIT, conditions: OMIT, additional_properties: nil)
|
46
|
+
@contents = contents if contents != OMIT
|
47
|
+
@content = content if content != OMIT
|
29
48
|
@conditions = conditions if conditions != OMIT
|
30
49
|
@additional_properties = additional_properties
|
31
|
-
@_field_set = { "content": content, "conditions": conditions }.reject do |_k, v|
|
50
|
+
@_field_set = { "contents": contents, "content": content, "conditions": conditions }.reject do |_k, v|
|
32
51
|
v == OMIT
|
33
52
|
end
|
34
53
|
end
|
@@ -40,12 +59,17 @@ module Vapi
|
|
40
59
|
def self.from_json(json_object:)
|
41
60
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
42
61
|
parsed_json = JSON.parse(json_object)
|
62
|
+
contents = parsed_json["contents"]&.map do |item|
|
63
|
+
item = item.to_json
|
64
|
+
Vapi::TextContent.from_json(json_object: item)
|
65
|
+
end
|
43
66
|
content = parsed_json["content"]
|
44
67
|
conditions = parsed_json["conditions"]&.map do |item|
|
45
68
|
item = item.to_json
|
46
69
|
Vapi::Condition.from_json(json_object: item)
|
47
70
|
end
|
48
71
|
new(
|
72
|
+
contents: contents,
|
49
73
|
content: content,
|
50
74
|
conditions: conditions,
|
51
75
|
additional_properties: struct
|
@@ -66,7 +90,8 @@ module Vapi
|
|
66
90
|
# @param obj [Object]
|
67
91
|
# @return [Void]
|
68
92
|
def self.validate_raw(obj:)
|
69
|
-
obj.
|
93
|
+
obj.contents&.is_a?(Array) != false || raise("Passed value for field obj.contents is not the expected type, validation failed.")
|
94
|
+
obj.content&.is_a?(String) != false || raise("Passed value for field obj.content is not the expected type, validation failed.")
|
70
95
|
obj.conditions&.is_a?(Array) != false || raise("Passed value for field obj.conditions is not the expected type, validation failed.")
|
71
96
|
end
|
72
97
|
end
|
@@ -1,12 +1,26 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "transfer_destination_assistant_message"
|
3
4
|
require_relative "transfer_mode"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
7
8
|
module Vapi
|
8
9
|
class TransferDestinationAssistant
|
9
|
-
# @return [Vapi::
|
10
|
+
# @return [Vapi::TransferDestinationAssistantMessage] This is spoken to the customer before connecting them to the destination.
|
11
|
+
# Usage:
|
12
|
+
# - If this is not provided and transfer tool messages is not provided, default is
|
13
|
+
# "Transferring the call now".
|
14
|
+
# - If set to "", nothing is spoken. This is useful when you want to silently
|
15
|
+
# transfer. This is especially useful when transferring between assistants in a
|
16
|
+
# squad. In this scenario, you likely also want to set
|
17
|
+
# `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
|
18
|
+
# for the destination assistant.
|
19
|
+
# This accepts a string or a ToolMessageStart class. Latter is useful if you want
|
20
|
+
# to specify multiple messages for different languages through the `contents`
|
21
|
+
# field.
|
22
|
+
attr_reader :message
|
23
|
+
# @return [Vapi::TransferMode] This is the mode to use for the transfer. Defaults to `rolling-history`.
|
10
24
|
# - `rolling-history`: This is the default mode. It keeps the entire conversation
|
11
25
|
# history and appends the new assistant's system message on transfer.
|
12
26
|
# Example:
|
@@ -25,8 +39,8 @@ module Vapi
|
|
25
39
|
# user: i need help with my account
|
26
40
|
# assistant: (destination.message)
|
27
41
|
# system: assistant2 system message
|
28
|
-
# assistant: assistant2 first message (or model generated if firstMessageMode
|
29
|
-
# set to `assistant-speaks-first-with-model-generated-message`)
|
42
|
+
# assistant: assistant2 first message (or model generated if firstMessageMode
|
43
|
+
# is set to `assistant-speaks-first-with-model-generated-message`)
|
30
44
|
# - `swap-system-message-in-history`: This replaces the original system message
|
31
45
|
# with the new assistant's system message on transfer.
|
32
46
|
# Example:
|
@@ -44,20 +58,27 @@ module Vapi
|
|
44
58
|
# assistant: how can i help?
|
45
59
|
# user: i need help with my account
|
46
60
|
# assistant: (destination.message)
|
47
|
-
# assistant: assistant2 first message (or model generated if firstMessageMode
|
48
|
-
# set to `assistant-speaks-first-with-model-generated-message`)
|
61
|
+
# assistant: assistant2 first message (or model generated if firstMessageMode
|
62
|
+
# is set to `assistant-speaks-first-with-model-generated-message`)
|
63
|
+
# - `delete-history`: This deletes the entire conversation history on transfer.
|
64
|
+
# Example:
|
65
|
+
# Pre-transfer:
|
66
|
+
# system: assistant1 system message
|
67
|
+
# assistant: assistant1 first message
|
68
|
+
# user: hey, good morning
|
69
|
+
# assistant: how can i help?
|
70
|
+
# user: i need help with my account
|
71
|
+
# assistant: (destination.message)
|
72
|
+
# Post-transfer:
|
73
|
+
# system: assistant2 system message
|
74
|
+
# assistant: assistant2 first message
|
75
|
+
# user: Yes, please
|
76
|
+
# assistant: how can i help?
|
77
|
+
# user: i need help with my account
|
78
|
+
# @default 'rolling-history'
|
49
79
|
attr_reader :transfer_mode
|
50
80
|
# @return [String] This is the assistant to transfer the call to.
|
51
81
|
attr_reader :assistant_name
|
52
|
-
# @return [String] This is the message to say before transferring the call to the destination.
|
53
|
-
# If this is not provided and transfer tool messages is not provided, default is
|
54
|
-
# "Transferring the call now".
|
55
|
-
# If set to "", nothing is spoken. This is useful when you want to silently
|
56
|
-
# transfer. This is especially useful when transferring between assistants in a
|
57
|
-
# squad. In this scenario, you likely also want to set
|
58
|
-
# `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
|
59
|
-
# for the destination assistant.
|
60
|
-
attr_reader :message
|
61
82
|
# @return [String] This is the description of the destination, used by the AI to choose when and
|
62
83
|
# how to transfer the call.
|
63
84
|
attr_reader :description
|
@@ -69,7 +90,19 @@ module Vapi
|
|
69
90
|
|
70
91
|
OMIT = Object.new
|
71
92
|
|
72
|
-
# @param
|
93
|
+
# @param message [Vapi::TransferDestinationAssistantMessage] This is spoken to the customer before connecting them to the destination.
|
94
|
+
# Usage:
|
95
|
+
# - If this is not provided and transfer tool messages is not provided, default is
|
96
|
+
# "Transferring the call now".
|
97
|
+
# - If set to "", nothing is spoken. This is useful when you want to silently
|
98
|
+
# transfer. This is especially useful when transferring between assistants in a
|
99
|
+
# squad. In this scenario, you likely also want to set
|
100
|
+
# `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
|
101
|
+
# for the destination assistant.
|
102
|
+
# This accepts a string or a ToolMessageStart class. Latter is useful if you want
|
103
|
+
# to specify multiple messages for different languages through the `contents`
|
104
|
+
# field.
|
105
|
+
# @param transfer_mode [Vapi::TransferMode] This is the mode to use for the transfer. Defaults to `rolling-history`.
|
73
106
|
# - `rolling-history`: This is the default mode. It keeps the entire conversation
|
74
107
|
# history and appends the new assistant's system message on transfer.
|
75
108
|
# Example:
|
@@ -88,8 +121,8 @@ module Vapi
|
|
88
121
|
# user: i need help with my account
|
89
122
|
# assistant: (destination.message)
|
90
123
|
# system: assistant2 system message
|
91
|
-
# assistant: assistant2 first message (or model generated if firstMessageMode
|
92
|
-
# set to `assistant-speaks-first-with-model-generated-message`)
|
124
|
+
# assistant: assistant2 first message (or model generated if firstMessageMode
|
125
|
+
# is set to `assistant-speaks-first-with-model-generated-message`)
|
93
126
|
# - `swap-system-message-in-history`: This replaces the original system message
|
94
127
|
# with the new assistant's system message on transfer.
|
95
128
|
# Example:
|
@@ -107,31 +140,39 @@ module Vapi
|
|
107
140
|
# assistant: how can i help?
|
108
141
|
# user: i need help with my account
|
109
142
|
# assistant: (destination.message)
|
110
|
-
# assistant: assistant2 first message (or model generated if firstMessageMode
|
111
|
-
# set to `assistant-speaks-first-with-model-generated-message`)
|
143
|
+
# assistant: assistant2 first message (or model generated if firstMessageMode
|
144
|
+
# is set to `assistant-speaks-first-with-model-generated-message`)
|
145
|
+
# - `delete-history`: This deletes the entire conversation history on transfer.
|
146
|
+
# Example:
|
147
|
+
# Pre-transfer:
|
148
|
+
# system: assistant1 system message
|
149
|
+
# assistant: assistant1 first message
|
150
|
+
# user: hey, good morning
|
151
|
+
# assistant: how can i help?
|
152
|
+
# user: i need help with my account
|
153
|
+
# assistant: (destination.message)
|
154
|
+
# Post-transfer:
|
155
|
+
# system: assistant2 system message
|
156
|
+
# assistant: assistant2 first message
|
157
|
+
# user: Yes, please
|
158
|
+
# assistant: how can i help?
|
159
|
+
# user: i need help with my account
|
160
|
+
# @default 'rolling-history'
|
112
161
|
# @param assistant_name [String] This is the assistant to transfer the call to.
|
113
|
-
# @param message [String] This is the message to say before transferring the call to the destination.
|
114
|
-
# If this is not provided and transfer tool messages is not provided, default is
|
115
|
-
# "Transferring the call now".
|
116
|
-
# If set to "", nothing is spoken. This is useful when you want to silently
|
117
|
-
# transfer. This is especially useful when transferring between assistants in a
|
118
|
-
# squad. In this scenario, you likely also want to set
|
119
|
-
# `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
|
120
|
-
# for the destination assistant.
|
121
162
|
# @param description [String] This is the description of the destination, used by the AI to choose when and
|
122
163
|
# how to transfer the call.
|
123
164
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
124
165
|
# @return [Vapi::TransferDestinationAssistant]
|
125
|
-
def initialize(assistant_name:,
|
166
|
+
def initialize(assistant_name:, message: OMIT, transfer_mode: OMIT, description: OMIT, additional_properties: nil)
|
167
|
+
@message = message if message != OMIT
|
126
168
|
@transfer_mode = transfer_mode if transfer_mode != OMIT
|
127
169
|
@assistant_name = assistant_name
|
128
|
-
@message = message if message != OMIT
|
129
170
|
@description = description if description != OMIT
|
130
171
|
@additional_properties = additional_properties
|
131
172
|
@_field_set = {
|
173
|
+
"message": message,
|
132
174
|
"transferMode": transfer_mode,
|
133
175
|
"assistantName": assistant_name,
|
134
|
-
"message": message,
|
135
176
|
"description": description
|
136
177
|
}.reject do |_k, v|
|
137
178
|
v == OMIT
|
@@ -145,14 +186,19 @@ module Vapi
|
|
145
186
|
def self.from_json(json_object:)
|
146
187
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
147
188
|
parsed_json = JSON.parse(json_object)
|
189
|
+
if parsed_json["message"].nil?
|
190
|
+
message = nil
|
191
|
+
else
|
192
|
+
message = parsed_json["message"].to_json
|
193
|
+
message = Vapi::TransferDestinationAssistantMessage.from_json(json_object: message)
|
194
|
+
end
|
148
195
|
transfer_mode = parsed_json["transferMode"]
|
149
196
|
assistant_name = parsed_json["assistantName"]
|
150
|
-
message = parsed_json["message"]
|
151
197
|
description = parsed_json["description"]
|
152
198
|
new(
|
199
|
+
message: message,
|
153
200
|
transfer_mode: transfer_mode,
|
154
201
|
assistant_name: assistant_name,
|
155
|
-
message: message,
|
156
202
|
description: description,
|
157
203
|
additional_properties: struct
|
158
204
|
)
|
@@ -172,9 +218,9 @@ module Vapi
|
|
172
218
|
# @param obj [Object]
|
173
219
|
# @return [Void]
|
174
220
|
def self.validate_raw(obj:)
|
221
|
+
obj.message.nil? || Vapi::TransferDestinationAssistantMessage.validate_raw(obj: obj.message)
|
175
222
|
obj.transfer_mode&.is_a?(Vapi::TransferMode) != false || raise("Passed value for field obj.transfer_mode is not the expected type, validation failed.")
|
176
223
|
obj.assistant_name.is_a?(String) != false || raise("Passed value for field obj.assistant_name is not the expected type, validation failed.")
|
177
|
-
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
178
224
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
179
225
|
end
|
180
226
|
end
|