Class: Assistant::TechnicalSupport::ResponseGroundingAnswerSegments::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/assistant/technical_support/response_grounding_answer_segments.rb

Overview

Immutable value object returned by #call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entries: [], truncated: nil) ⇒ Result

Builds an immutable answer-segmentation result.

Parameters:

  • entries (Array<Hash>) (defaults to: [])

    stable segment IDs and exact answer text

  • truncated (Boolean, nil) (defaults to: nil)

    whether answer text exceeded the audit budget



79
# File 'app/services/assistant/technical_support/response_grounding_answer_segments.rb', line 79

def initialize(entries: [], truncated: nil) = super

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries

Returns:

  • (Object)

    the current value of entries



74
75
76
# File 'app/services/assistant/technical_support/response_grounding_answer_segments.rb', line 74

def entries
  @entries
end

#truncatedObject (readonly)

Returns the value of attribute truncated

Returns:

  • (Object)

    the current value of truncated



74
75
76
# File 'app/services/assistant/technical_support/response_grounding_answer_segments.rb', line 74

def truncated
  @truncated
end

Instance Method Details

#truncated?Boolean?

Returns whether the answer text exceeded the audit budget.

Returns:

  • (Boolean, nil)

    whether the answer text exceeded the audit budget



82
# File 'app/services/assistant/technical_support/response_grounding_answer_segments.rb', line 82

def truncated? = truncated