Class: Agent::SessionContext::TranscriptEntry

Inherits:
Data
  • Object
show all
Defined in:
lib/agent/session_context/transcript.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index:, role:, at:, parts:) ⇒ TranscriptEntry

Returns a new instance of TranscriptEntry.



65
66
67
68
69
70
71
72
# File 'lib/agent/session_context/transcript.rb', line 65

def initialize(index:, role:, at:, parts:)
  super(
    index: normalize_positive_index(index, :index),
    role: normalize_symbol(role, :role),
    at: at,
    parts: normalize_parts(parts)
  )
end

Instance Attribute Details

#at ⇒ Object (readonly)

Returns the value of attribute at

Returns:

  • (Object) —

    the current value of at



64
65
66
# File 'lib/agent/session_context/transcript.rb', line 64

def at
  @at
end

#index ⇒ Object (readonly)

Returns the value of attribute index

Returns:

  • (Object) —

    the current value of index



64
65
66
# File 'lib/agent/session_context/transcript.rb', line 64

def index
  @index
end

#parts ⇒ Object (readonly)

Returns the value of attribute parts

Returns:

  • (Object) —

    the current value of parts



64
65
66
# File 'lib/agent/session_context/transcript.rb', line 64

def parts
  @parts
end

#role ⇒ Object (readonly)

Returns the value of attribute role

Returns:

  • (Object) —

    the current value of role



64
65
66
# File 'lib/agent/session_context/transcript.rb', line 64

def role
  @role
end