Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport

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

Overview

Grounding support for a claim in answer_text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport

Returns a new instance of GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport.



7473
7474
7475
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 7473

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

Instance Attribute Details

#end_indexFixnum

Required. End of the claim, exclusive. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


7444
7445
7446
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 7444

def end_index
  @end_index
end

#grounding_check_requiredBoolean Also known as: grounding_check_required?

Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore grounding_score, sources is not returned. Corresponds to the JSON property groundingCheckRequired

Returns:

  • (Boolean)


7452
7453
7454
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 7452

def grounding_check_required
  @grounding_check_required
end

#grounding_scoreFloat

A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. Corresponds to the JSON property groundingScore

Returns:

  • (Float)


7460
7461
7462
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 7460

def grounding_score
  @grounding_score
end

#sourcesArray<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaAnswerCitationSource>

Optional. Citation sources for the claim. Corresponds to the JSON property sources



7465
7466
7467
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 7465

def sources
  @sources
end

#start_indexFixnum

Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


7471
7472
7473
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 7471

def start_index
  @start_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7478
7479
7480
7481
7482
7483
7484
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 7478

def update!(**args)
  @end_index = args[:end_index] if args.key?(:end_index)
  @grounding_check_required = args[:grounding_check_required] if args.key?(:grounding_check_required)
  @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
  @sources = args[:sources] if args.key?(:sources)
  @start_index = args[:start_index] if args.key?(:start_index)
end