Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaChunk

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

Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaChunk

Returns a new instance of GoogleCloudDiscoveryengineV1betaChunk.



21574
21575
21576
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21574

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

Instance Attribute Details

#annotation_contentsArray<String>

Output only. Annotation contents if the current chunk contains annotations. Corresponds to the JSON property annotationContents

Returns:

  • (Array<String>)


21511
21512
21513
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21511

def annotation_contents
  @annotation_contents
end

#annotation_metadataArray<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaChunkAnnotationMetadata>

Output only. The annotation metadata includes structured content in the current chunk. Corresponds to the JSON property annotationMetadata



21517
21518
21519
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21517

def 
  @annotation_metadata
end

#chunk_metadataGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaChunkChunkMetadata

Metadata of the current chunk. This field is only populated on SearchService. Search API. Corresponds to the JSON property chunkMetadata



21523
21524
21525
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21523

def 
  @chunk_metadata
end

#contentString

Content is a string from a document (parsed content). Corresponds to the JSON property content

Returns:

  • (String)


21528
21529
21530
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21528

def content
  @content
end

#data_urlsArray<String>

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:, Corresponds to the JSON property dataUrls

Returns:

  • (Array<String>)


21535
21536
21537
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21535

def data_urls
  @data_urls
end

#derived_struct_dataHash<String,Object>

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. Corresponds to the JSON property derivedStructData

Returns:

  • (Hash<String,Object>)


21541
21542
21543
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21541

def derived_struct_data
  @derived_struct_data
end

#document_metadataGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata

Document metadata contains the information of the document of the current chunk. Corresponds to the JSON property documentMetadata



21547
21548
21549
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21547

def 
  @document_metadata
end

#idString

Unique chunk ID of the current chunk. Corresponds to the JSON property id

Returns:

  • (String)


21552
21553
21554
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21552

def id
  @id
end

#nameString

The full resource name of the chunk. Format: projects/project/locations/ location/collections/collection/dataStores/data_store/branches/branch/ documents/document_id/chunks/chunk_id`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Corresponds to the JSON propertyname`

Returns:

  • (String)


21560
21561
21562
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21560

def name
  @name
end

#page_spanGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaChunkPageSpan

Page span of the chunk. Corresponds to the JSON property pageSpan



21565
21566
21567
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21565

def page_span
  @page_span
end

#relevance_scoreFloat

Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchResponse. Corresponds to the JSON property relevanceScore

Returns:

  • (Float)


21572
21573
21574
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21572

def relevance_score
  @relevance_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 21579

def update!(**args)
  @annotation_contents = args[:annotation_contents] if args.key?(:annotation_contents)
  @annotation_metadata = args[:annotation_metadata] if args.key?(:annotation_metadata)
  @chunk_metadata = args[:chunk_metadata] if args.key?(:chunk_metadata)
  @content = args[:content] if args.key?(:content)
  @data_urls = args[:data_urls] if args.key?(:data_urls)
  @derived_struct_data = args[:derived_struct_data] if args.key?(:derived_struct_data)
  @document_metadata = args[:document_metadata] if args.key?(:document_metadata)
  @id = args[:id] if args.key?(:id)
  @name = args[:name] if args.key?(:name)
  @page_span = args[:page_span] if args.key?(:page_span)
  @relevance_score = args[:relevance_score] if args.key?(:relevance_score)
end