Method: Vapi::CreateSmsToolDto#initialize

Defined in:
lib/vapi_server_sdk/types/create_sms_tool_dto.rb

#initialize(messages: OMIT, function: OMIT, additional_properties: nil) ⇒ Vapi::CreateSmsToolDto

Parameters:

  • messages (Array<Vapi::CreateSmsToolDtoMessagesItem>) (defaults to: OMIT)

    These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like tool.destinations. For others like the function tool, these can be custom configured.

  • function (Vapi::OpenAiFunction) (defaults to: OMIT)

    This is the function definition of the tool. For endCall, transferCall, and dtmf tools, this is auto-filled based on tool-specific fields like tool.destinations. But, even in those cases, you can provide a custom function definition for advanced use cases. An example of an advanced use case is if you want to customize the message that’s spoken for endCall tool. You can specify a function where it returns an argument “reason”. Then, in messages array, you can have many “request-complete” messages. One of these messages will be triggered if the messages[].conditions matches the “reason” argument.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



48
49
50
51
52
53
54
55
# File 'lib/vapi_server_sdk/types/create_sms_tool_dto.rb', line 48

def initialize(messages: OMIT, function: OMIT, additional_properties: nil)
  @messages = messages if messages != OMIT
  @function = function if function != OMIT
  @additional_properties = additional_properties
  @_field_set = { "messages": messages, "function": function }.reject do |_k, v|
    v == OMIT
  end
end