Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig

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

Configuration for the layout based chunking.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig

Returns a new instance of GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig.



1373
1374
1375
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1373

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

Instance Attribute Details

#chunk_sizeFixnum

The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500. Corresponds to the JSON property chunkSize

Returns:

  • (Fixnum)


1364
1365
1366
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1364

def chunk_size
  @chunk_size
end

#include_ancestor_headingsBoolean Also known as: include_ancestor_headings?

Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False. Corresponds to the JSON property includeAncestorHeadings

Returns:

  • (Boolean)


1370
1371
1372
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1370

def include_ancestor_headings
  @include_ancestor_headings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1378
1379
1380
1381
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1378

def update!(**args)
  @chunk_size = args[:chunk_size] if args.key?(:chunk_size)
  @include_ancestor_headings = args[:include_ancestor_headings] if args.key?(:include_ancestor_headings)
end