Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAssistantGroundedContentTextGroundingMetadataSegment

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 information for a segment of the text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaAssistantGroundedContentTextGroundingMetadataSegment

Returns a new instance of GoogleCloudDiscoveryengineV1betaAssistantGroundedContentTextGroundingMetadataSegment.



20901
20902
20903
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20901

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

Instance Attribute Details

#end_indexFixnum

End of the segment, exclusive. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


20877
20878
20879
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20877

def end_index
  @end_index
end

#grounding_scoreFloat

Score for the segment. Corresponds to the JSON property groundingScore

Returns:

  • (Float)


20882
20883
20884
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20882

def grounding_score
  @grounding_score
end

#reference_indicesArray<Fixnum>

References for the segment. Corresponds to the JSON property referenceIndices

Returns:

  • (Array<Fixnum>)


20887
20888
20889
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20887

def reference_indices
  @reference_indices
end

#start_indexFixnum

Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one). Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


20894
20895
20896
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20894

def start_index
  @start_index
end

#textString

The text segment itself. Corresponds to the JSON property text

Returns:

  • (String)


20899
20900
20901
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20899

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



20906
20907
20908
20909
20910
20911
20912
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20906

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