Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaFactChunk

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

Overview

Fact Chunk.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaFactChunk

Returns a new instance of GoogleCloudDiscoveryengineV1alphaFactChunk.



5389
5390
5391
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5389

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

Instance Attribute Details

#chunk_textString

Text content of the fact chunk. Can be at most 10K characters long. Corresponds to the JSON property chunkText

Returns:

  • (String)


5370
5371
5372
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5370

def chunk_text
  @chunk_text
end

#indexFixnum

The index of this chunk. Currently, only used for the streaming mode. Corresponds to the JSON property index

Returns:

  • (Fixnum)


5375
5376
5377
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5375

def index
  @index
end

#sourceString

Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved. Corresponds to the JSON property source

Returns:

  • (String)


5382
5383
5384
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5382

def source
  @source
end

#source_metadataHash<String,String>

More fine-grained information for the source reference. Corresponds to the JSON property sourceMetadata

Returns:

  • (Hash<String,String>)


5387
5388
5389
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5387

def 
  @source_metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5394
5395
5396
5397
5398
5399
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5394

def update!(**args)
  @chunk_text = args[:chunk_text] if args.key?(:chunk_text)
  @index = args[:index] if args.key?(:index)
  @source = args[:source] if args.key?(:source)
  @source_metadata = args[:source_metadata] if args.key?(:source_metadata)
end