Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec
- 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
A specification for configuring the extractive content in a search response.
Instance Attribute Summary collapse
-
#max_extractive_answer_count ⇒ Fixnum
The maximum number of extractive answers returned in each search result.
-
#max_extractive_segment_count ⇒ Fixnum
The max number of extractive segments returned in each search result.
-
#num_next_segments ⇒ Fixnum
Return at most
num_next_segments
segments after each selected segments. -
#num_previous_segments ⇒ Fixnum
Specifies whether to also include the adjacent from each selected segments.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec
constructor
A new instance of GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec
Returns a new instance of GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec.
5598 5599 5600 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5598 def initialize(**args) update!(**args) end |
Instance Attribute Details
#max_extractive_answer_count ⇒ Fixnum
The maximum number of extractive answers returned in each search result. An
extractive answer is a verbatim answer extracted from the original document,
which provides a precise and contextually relevant answer to the search query.
If the number of matching answers is less than the
max_extractive_answer_count
, return all of the answers. Otherwise, return the
max_extractive_answer_count
. At most five answers are returned for each
SearchResult.
Corresponds to the JSON property maxExtractiveAnswerCount
5572 5573 5574 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5572 def max_extractive_answer_count @max_extractive_answer_count end |
#max_extractive_segment_count ⇒ Fixnum
The max number of extractive segments returned in each search result. Only
applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or
DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a
text segment extracted from the original document that is relevant to the
search query, and, in general, more verbose than an extractive answer. The
segment could then be used as input for LLMs to generate summaries and answers.
If the number of matching segments is less than max_extractive_segment_count
, return all of the segments. Otherwise, return the
max_extractive_segment_count
.
Corresponds to the JSON property maxExtractiveSegmentCount
5585 5586 5587 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5585 def max_extractive_segment_count @max_extractive_segment_count end |
#num_next_segments ⇒ Fixnum
Return at most num_next_segments
segments after each selected segments.
Corresponds to the JSON property numNextSegments
5590 5591 5592 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5590 def num_next_segments @num_next_segments end |
#num_previous_segments ⇒ Fixnum
Specifies whether to also include the adjacent from each selected segments.
Return at most num_previous_segments
segments before each selected segments.
Corresponds to the JSON property numPreviousSegments
5596 5597 5598 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5596 def num_previous_segments @num_previous_segments end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5603 5604 5605 5606 5607 5608 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 5603 def update!(**args) @max_extractive_answer_count = args[:max_extractive_answer_count] if args.key?(:max_extractive_answer_count) @max_extractive_segment_count = args[:max_extractive_segment_count] if args.key?(:max_extractive_segment_count) @num_next_segments = args[:num_next_segments] if args.key?(:num_next_segments) @num_previous_segments = args[:num_previous_segments] if args.key?(:num_previous_segments) end |