Class: Telnyx::Models::AI::Conversation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/ai/conversation.rb

Overview

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(id:, created_at:, last_message_at:, metadata:, name: nil) ⇒ Object

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

Parameters:

  • id (String)
  • created_at (Time)

    The datetime the conversation was created.

  • last_message_at (Time)

    The datetime of the latest message in the conversation.

  • metadata (Hash{Symbol=>String})

    Metadata associated with the conversation. Telnyx provides several pieces of met

  • name (String) (defaults to: nil)


# File 'lib/telnyx/models/ai/conversation.rb', line 42

Instance Attribute Details

#created_atTime

The datetime the conversation was created.

Returns:

  • (Time)


17
# File 'lib/telnyx/models/ai/conversation.rb', line 17

required :created_at, Time

#idString

Returns:

  • (String)


11
# File 'lib/telnyx/models/ai/conversation.rb', line 11

required :id, String

#last_message_atTime

The datetime of the latest message in the conversation.

Returns:

  • (Time)


23
# File 'lib/telnyx/models/ai/conversation.rb', line 23

required :last_message_at, Time

#metadataHash{Symbol=>String}

Metadata associated with the conversation. Telnyx provides several pieces of metadata, but customers can also add their own. The reserved field ‘ai_disabled` (boolean) can be set to `true` to prevent AI-generated responses on this conversation. When `ai_disabled` is `true`, calls to the chat endpoint will return a 400 error. Set to `false` or remove the field to re-enable AI responses. This is useful when a human agent needs to take over the conversation mid-stream (e.g., a technician stepping in while AI was messaging a resident).

Returns:

  • (Hash{Symbol=>String})


35
# File 'lib/telnyx/models/ai/conversation.rb', line 35

required :metadata, Telnyx::Internal::Type::HashOf[String]

#nameString?

Returns:

  • (String, nil)


40
# File 'lib/telnyx/models/ai/conversation.rb', line 40

optional :name, String