Class: Telnyx::Models::Calls::ToolMessage

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

Defined Under Namespace

Modules: Role

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(content:, role:, tool_call_id:, metadata: nil) ⇒ Object

Parameters:

  • content (String)

    The contents of the tool message.

  • role (Symbol, Telnyx::Models::Calls::ToolMessage::Role)

    The role of the messages author, in this case ‘tool`.

  • tool_call_id (String)

    Tool call that this message is responding to.

  • metadata (Hash{Symbol=>Object}) (defaults to: nil)

    Metadata to add to the message



# File 'lib/telnyx/models/calls/tool_message.rb', line 31

Instance Attribute Details

#contentString

The contents of the tool message.

Returns:

  • (String)


11
# File 'lib/telnyx/models/calls/tool_message.rb', line 11

required :content, String

#metadataHash{Symbol=>Object}?

Metadata to add to the message

Returns:

  • (Hash{Symbol=>Object}, nil)


29
# File 'lib/telnyx/models/calls/tool_message.rb', line 29

optional :metadata, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#roleSymbol, Telnyx::Models::Calls::ToolMessage::Role

The role of the messages author, in this case ‘tool`.



17
# File 'lib/telnyx/models/calls/tool_message.rb', line 17

required :role, enum: -> { Telnyx::Calls::ToolMessage::Role }

#tool_call_idString

Tool call that this message is responding to.

Returns:

  • (String)


23
# File 'lib/telnyx/models/calls/tool_message.rb', line 23

required :tool_call_id, String