Class: Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingSupport

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

Overview

A collection of supporting references for a segment of the model's response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GroundingSupport

Returns a new instance of GoogleCloudAiplatformV1beta1GroundingSupport.



2192
2193
2194
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2192

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

Instance Attribute Details

#confidence_scoresArray<Float>

The confidence scores for the support references. This list is parallel to the grounding_chunk_indices list. A score is a value between 0.0 and 1.0, with a higher score indicating a higher confidence that the reference supports the claim. For Gemini 2.0 and before, this list has the same size as grounding_chunk_indices. For Gemini 2.5 and later, this list is empty and should be ignored. Corresponds to the JSON property confidenceScores

Returns:

  • (Array<Float>)


2176
2177
2178
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2176

def confidence_scores
  @confidence_scores
end

#grounding_chunk_indicesArray<Fixnum>

A list of indices into the grounding_chunks field of the GroundingMetadata message. These indices specify which grounding chunks support the claim made in the content segment. For example, if this field has the values [1, 3], it means that grounding_chunks[1] and grounding_chunks[3] are the sources for the claim in the content segment. Corresponds to the JSON property groundingChunkIndices

Returns:

  • (Array<Fixnum>)


2185
2186
2187
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2185

def grounding_chunk_indices
  @grounding_chunk_indices
end

#segmentGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Segment

A segment of the content. Corresponds to the JSON property segment



2190
2191
2192
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2190

def segment
  @segment
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2197
2198
2199
2200
2201
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2197

def update!(**args)
  @confidence_scores = args[:confidence_scores] if args.key?(:confidence_scores)
  @grounding_chunk_indices = args[:grounding_chunk_indices] if args.key?(:grounding_chunk_indices)
  @segment = args[:segment] if args.key?(:segment)
end