Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1CheckGroundingResponse

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

Response message for the GroundedGenerationService.CheckGrounding method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1CheckGroundingResponse

Returns a new instance of GoogleCloudDiscoveryengineV1CheckGroundingResponse.



2112
2113
2114
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2112

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

Instance Attribute Details

#cited_chunksArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1CheckGroundingResponseFactChunk>

List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request. Corresponds to the JSON property citedChunks



2098
2099
2100
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2098

def cited_chunks
  @cited_chunks
end

#claimsArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim>

Claim texts and citation info across all claims in the answer candidate. Corresponds to the JSON property claims



2103
2104
2105
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2103

def claims
  @claims
end

#support_scoreFloat

The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned. Corresponds to the JSON property supportScore

Returns:

  • (Float)


2110
2111
2112
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2110

def support_score
  @support_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2117
2118
2119
2120
2121
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 2117

def update!(**args)
  @cited_chunks = args[:cited_chunks] if args.key?(:cited_chunks)
  @claims = args[:claims] if args.key?(:claims)
  @support_score = args[:support_score] if args.key?(:support_score)
end