Class: Assistant::TechnicalSupport::ResponseGroundingEvidence::Result
- Inherits:
-
Data
- Object
- Data
- Assistant::TechnicalSupport::ResponseGroundingEvidence::Result
- Defined in:
- app/services/assistant/technical_support/response_grounding_evidence.rb
Instance Attribute Summary collapse
-
#citation_urls ⇒ Object
readonly
Returns the value of attribute citation_urls.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#tool_call_ids ⇒ Object
readonly
Returns the value of attribute tool_call_ids.
-
#truncated ⇒ Object
readonly
Returns the value of attribute truncated.
Class Method Summary collapse
-
.from_h(value) ⇒ Result
Rehydrates a pending JSONB evidence snapshot for asynchronous grading.
Instance Method Summary collapse
-
#initialize(entries: [], citation_urls: [], tool_call_ids: [], truncated: nil) ⇒ Result
constructor
Builds immutable bounded conversation evidence.
-
#truncated? ⇒ Boolean?
Reports whether any evidence input exceeded a policy bound.
Constructor Details
#initialize(entries: [], citation_urls: [], tool_call_ids: [], truncated: nil) ⇒ Result
Builds immutable bounded conversation evidence.
33 |
# File 'app/services/assistant/technical_support/response_grounding_evidence.rb', line 33 def initialize(entries: [], citation_urls: [], tool_call_ids: [], truncated: nil) = super |
Instance Attribute Details
#citation_urls ⇒ Object (readonly)
Returns the value of attribute citation_urls
26 27 28 |
# File 'app/services/assistant/technical_support/response_grounding_evidence.rb', line 26 def citation_urls @citation_urls end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries
26 27 28 |
# File 'app/services/assistant/technical_support/response_grounding_evidence.rb', line 26 def entries @entries end |
#tool_call_ids ⇒ Object (readonly)
Returns the value of attribute tool_call_ids
26 27 28 |
# File 'app/services/assistant/technical_support/response_grounding_evidence.rb', line 26 def tool_call_ids @tool_call_ids end |
#truncated ⇒ Object (readonly)
Returns the value of attribute truncated
26 27 28 |
# File 'app/services/assistant/technical_support/response_grounding_evidence.rb', line 26 def truncated @truncated end |
Class Method Details
.from_h(value) ⇒ Result
Rehydrates a pending JSONB evidence snapshot for asynchronous grading.
44 45 46 47 48 49 50 51 52 |
# File 'app/services/assistant/technical_support/response_grounding_evidence.rb', line 44 def self.from_h(value) data = value.to_h.stringify_keys new( entries: Array(data['entries']).map { |entry| normalized_entry(entry) }, citation_urls: Array(data['citation_urls']).map(&:to_s), tool_call_ids: Array(data['tool_call_ids']).map(&:to_i), truncated: data['truncated'] == true ) end |
Instance Method Details
#truncated? ⇒ Boolean?
Reports whether any evidence input exceeded a policy bound.
38 |
# File 'app/services/assistant/technical_support/response_grounding_evidence.rb', line 38 def truncated? = truncated |