Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1/classes.rb,
lib/google/apis/discoveryengine_v1/representations.rb,
lib/google/apis/discoveryengine_v1/representations.rb

Overview

Text and citation info for a claim in the answer candidate.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim

Returns a new instance of GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim.



2150
2151
2152
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2150

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#citation_indicesArray<Fixnum>

A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[ 3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact. Corresponds to the JSON property citationIndices

Returns:

  • (Array<Fixnum>)


2121
2122
2123
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2121

def citation_indices
  @citation_indices
end

#claim_textString

Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found. Corresponds to the JSON property claimText

Returns:

  • (String)


2127
2128
2129
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2127

def claim_text
  @claim_text
end

#end_posFixnum

Position indicating the end of the claim in the answer candidate, exclusive. Corresponds to the JSON property endPos

Returns:

  • (Fixnum)


2132
2133
2134
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2132

def end_pos
  @end_pos
end

#grounding_check_requiredBoolean Also known as: grounding_check_required?

Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, anti_citation_indices, and score should not be returned. Corresponds to the JSON property groundingCheckRequired

Returns:

  • (Boolean)


2141
2142
2143
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2141

def grounding_check_required
  @grounding_check_required
end

#start_posFixnum

Position indicating the start of the claim in the answer candidate, measured in bytes. Corresponds to the JSON property startPos

Returns:

  • (Fixnum)


2148
2149
2150
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2148

def start_pos
  @start_pos
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2155
2156
2157
2158
2159
2160
2161
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2155

def update!(**args)
  @citation_indices = args[:citation_indices] if args.key?(:citation_indices)
  @claim_text = args[:claim_text] if args.key?(:claim_text)
  @end_pos = args[:end_pos] if args.key?(:end_pos)
  @grounding_check_required = args[:grounding_check_required] if args.key?(:grounding_check_required)
  @start_pos = args[:start_pos] if args.key?(:start_pos)
end