Class: Telnyx::Models::AI::Conversations::MessageListResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/ai/conversations/message_list_response.rb,
sig/telnyx/models/ai/conversations/message_list_response.rbs

Overview

See Also:

  • Telnyx::Resources::AI::Conversations::Messages#list

Defined Under Namespace

Modules: Metadata, Role Classes: ToolCall

Instance Attribute Summary collapse

Class Method 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(role:, text:, created_at: nil, metadata: nil, sent_at: nil, tool_calls: nil) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::AI::Conversations::MessageListResponse for more details.

Parameters:

  • role (Symbol, Telnyx::Models::AI::Conversations::MessageListResponse::Role)

    The role of the message sender.

  • text (String)

    The message content. Can be null for tool calls.

  • created_at (Time) (defaults to: nil)

    The datetime the message was created on the conversation. This does not necesari

  • metadata (Hash{Symbol=>String, Integer, Boolean, Array<String, Integer, Boolean>}) (defaults to: nil)
  • sent_at (Time) (defaults to: nil)

    The datetime the message was sent to the end user.

  • tool_calls (Array<Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall>) (defaults to: nil)

    Optional tool calls made by the assistant.



# File 'lib/telnyx/models/ai/conversations/message_list_response.rb', line 48

Instance Attribute Details

#created_atTime?

The datetime the message was created on the conversation. This does not necesarily correspond to the time the message was sent. The best field to use to determine the time the end user experienced the message is sent_at.

Parameters:

  • (Time)

Returns:

  • (Time, nil)


27
# File 'lib/telnyx/models/ai/conversations/message_list_response.rb', line 27

optional :created_at, Time

#metadataHash{Symbol=>String, Integer, Boolean, Array<String, Integer, Boolean>}?

Returns:

  • (Hash{Symbol=>String, Integer, Boolean, Array<String, Integer, Boolean>}, nil)


32
33
# File 'lib/telnyx/models/ai/conversations/message_list_response.rb', line 32

optional :metadata,
-> { Telnyx::Internal::Type::HashOf[union: Telnyx::Models::AI::Conversations::MessageListResponse::Metadata] }

#roleSymbol, Telnyx::Models::AI::Conversations::MessageListResponse::Role

The role of the message sender.

Parameters:

  • value (Telnyx::Models::AI::Conversations::MessageListResponse::role)

Returns:



13
# File 'lib/telnyx/models/ai/conversations/message_list_response.rb', line 13

required :role, enum: -> { Telnyx::Models::AI::Conversations::MessageListResponse::Role }

#sent_atTime?

The datetime the message was sent to the end user.

Parameters:

  • (Time)

Returns:

  • (Time, nil)


39
# File 'lib/telnyx/models/ai/conversations/message_list_response.rb', line 39

optional :sent_at, Time

#textString

The message content. Can be null for tool calls.

Parameters:

  • value (String)

Returns:

  • (String)


19
# File 'lib/telnyx/models/ai/conversations/message_list_response.rb', line 19

required :text, String

#tool_callsArray<Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall>?

Optional tool calls made by the assistant.



45
46
# File 'lib/telnyx/models/ai/conversations/message_list_response.rb', line 45

optional :tool_calls,
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall] }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/ai/conversations/message_list_response.rb', line 74

Instance Method Details

#to_hash{

Returns:

  • ({)


49
# File 'sig/telnyx/models/ai/conversations/message_list_response.rbs', line 49

def to_hash: -> {