Class: Telnyx::Models::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/calls/action_add_ai_assistant_messages_params.rb

Defined Under Namespace

Modules: Type Classes: Function

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(name:) ⇒ Object

The function that the model called.

Parameters:

  • name (String)

    The name of the function to call.



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/telnyx/models/calls/action_add_ai_assistant_messages_params.rb', line 137

class ToolCall < Telnyx::Internal::Type::BaseModel
  # @!attribute id
  #   The ID of the tool call.
  #
  #   @return [String]
  required :id, String

  # @!attribute function
  #   The function that the model called.
  #
  #   @return [Telnyx::Models::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Function]
  required :function,
           -> { Telnyx::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Function }

  # @!attribute type
  #   The type of the tool. Currently, only `function` is supported.
  #
  #   @return [Symbol, Telnyx::Models::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Type]
  required :type,
           enum: -> { Telnyx::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Type }

  # @!method initialize(id:, function:, type:)
  #   A call to a function tool created by the model.
  #
  #   @param id [String] The ID of the tool call.
  #
  #   @param function [Telnyx::Models::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Function] The function that the model called.
  #
  #   @param type [Symbol, Telnyx::Models::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Type] The type of the tool. Currently, only `function` is supported.

  # @see Telnyx::Models::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall#function
  class Function < Telnyx::Internal::Type::BaseModel
    # @!attribute name
    #   The name of the function to call.
    #
    #   @return [String]
    required :name, String

    # @!method initialize(name:)
    #   The function that the model called.
    #
    #   @param name [String] The name of the function to call.
  end

  # The type of the tool. Currently, only `function` is supported.
  #
  # @see Telnyx::Models::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall#type
  module Type
    extend Telnyx::Internal::Type::Enum

    FUNCTION = :function

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#functionTelnyx::Models::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Function

The function that the model called.



148
149
# File 'lib/telnyx/models/calls/action_add_ai_assistant_messages_params.rb', line 148

required :function,
-> { Telnyx::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Function }

#idString

The ID of the tool call.

Returns:

  • (String)


142
# File 'lib/telnyx/models/calls/action_add_ai_assistant_messages_params.rb', line 142

required :id, String

#typeSymbol, Telnyx::Models::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Type

The type of the tool. Currently, only ‘function` is supported.



155
156
# File 'lib/telnyx/models/calls/action_add_ai_assistant_messages_params.rb', line 155

required :type,
enum: -> { Telnyx::Calls::ActionAddAIAssistantMessagesParams::Message::Assistant::ToolCall::Type }