Class WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder (0.99.0)

public static final class WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder extends GeneratedMessage.Builder<WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder> implements WidgetConfig.UiSettings.GenerativeAnswerConfigOrBuilder

Describes configuration for generative answer.

Protobuf type google.cloud.discoveryengine.v1.WidgetConfig.UiSettings.GenerativeAnswerConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public WidgetConfig.UiSettings.GenerativeAnswerConfig build()
Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig

buildPartial()

public WidgetConfig.UiSettings.GenerativeAnswerConfig buildPartial()
Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig

clear()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clear()
Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder
Overrides

clearDisableRelatedQuestions()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearDisableRelatedQuestions()

Whether generated answer contains suggested related questions.

bool disable_related_questions = 8;

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

clearIgnoreAdversarialQuery()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearIgnoreAdversarialQuery()

Optional. Specifies whether to filter out queries that are adversarial.

bool ignore_adversarial_query = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

clearIgnoreLowRelevantContent()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearIgnoreLowRelevantContent()

Optional. Specifies whether to filter out queries that are not relevant to the content.

bool ignore_low_relevant_content = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

clearIgnoreNonAnswerSeekingQuery()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearIgnoreNonAnswerSeekingQuery()

Optional. Specifies whether to filter out queries that are not answer-seeking. The default value is false.

No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to true, we skip generating answers for non-answer seeking queries and return fallback messages instead.

bool ignore_non_answer_seeking_query = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

clearImageSource()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearImageSource()

Optional. Source of image returned in the answer.

.google.cloud.discoveryengine.v1.WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource image_source = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

clearLanguageCode()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearLanguageCode()

Language code for Summary. Use language tags defined by BCP47. Note: This is an experimental feature.

string language_code = 7;

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

clearMaxRephraseSteps()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearMaxRephraseSteps()

Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.

int32 max_rephrase_steps = 6;

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

clearModelPromptPreamble()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearModelPromptPreamble()

Text at the beginning of the prompt that instructs the model that generates the answer.

string model_prompt_preamble = 5;

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

clearModelVersion()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearModelVersion()

The model version used to generate the answer.

string model_version = 4;

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

clearResultCount()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder clearResultCount()

The number of top results to generate the answer from. Up to 10.

int32 result_count = 3;

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

getDefaultInstanceForType()

public WidgetConfig.UiSettings.GenerativeAnswerConfig getDefaultInstanceForType()
Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisableRelatedQuestions()

public boolean getDisableRelatedQuestions()

Whether generated answer contains suggested related questions.

bool disable_related_questions = 8;

Returns
Type Description
boolean

The disableRelatedQuestions.

getIgnoreAdversarialQuery()

public boolean getIgnoreAdversarialQuery()

Optional. Specifies whether to filter out queries that are adversarial.

bool ignore_adversarial_query = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The ignoreAdversarialQuery.

getIgnoreLowRelevantContent()

public boolean getIgnoreLowRelevantContent()

Optional. Specifies whether to filter out queries that are not relevant to the content.

bool ignore_low_relevant_content = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The ignoreLowRelevantContent.

getIgnoreNonAnswerSeekingQuery()

public boolean getIgnoreNonAnswerSeekingQuery()

Optional. Specifies whether to filter out queries that are not answer-seeking. The default value is false.

No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to true, we skip generating answers for non-answer seeking queries and return fallback messages instead.

bool ignore_non_answer_seeking_query = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The ignoreNonAnswerSeekingQuery.

getImageSource()

public WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource getImageSource()

Optional. Source of image returned in the answer.

.google.cloud.discoveryengine.v1.WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource image_source = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource

The imageSource.

getImageSourceValue()

public int getImageSourceValue()

Optional. Source of image returned in the answer.

.google.cloud.discoveryengine.v1.WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource image_source = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for imageSource.

getLanguageCode()

public String getLanguageCode()

Language code for Summary. Use language tags defined by BCP47. Note: This is an experimental feature.

string language_code = 7;

Returns
Type Description
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

Language code for Summary. Use language tags defined by BCP47. Note: This is an experimental feature.

string language_code = 7;

Returns
Type Description
ByteString

The bytes for languageCode.

getMaxRephraseSteps()

public int getMaxRephraseSteps()

Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.

int32 max_rephrase_steps = 6;

Returns
Type Description
int

The maxRephraseSteps.

getModelPromptPreamble()

public String getModelPromptPreamble()

Text at the beginning of the prompt that instructs the model that generates the answer.

string model_prompt_preamble = 5;

Returns
Type Description
String

The modelPromptPreamble.

getModelPromptPreambleBytes()

public ByteString getModelPromptPreambleBytes()

Text at the beginning of the prompt that instructs the model that generates the answer.

string model_prompt_preamble = 5;

Returns
Type Description
ByteString

The bytes for modelPromptPreamble.

getModelVersion()

public String getModelVersion()

The model version used to generate the answer.

string model_version = 4;

Returns
Type Description
String

The modelVersion.

getModelVersionBytes()

public ByteString getModelVersionBytes()

The model version used to generate the answer.

string model_version = 4;

Returns
Type Description
ByteString

The bytes for modelVersion.

getResultCount()

public int getResultCount()

The number of top results to generate the answer from. Up to 10.

int32 result_count = 3;

Returns
Type Description
int

The resultCount.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(WidgetConfig.UiSettings.GenerativeAnswerConfig other)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder mergeFrom(WidgetConfig.UiSettings.GenerativeAnswerConfig other)
Parameter
Name Description
other WidgetConfig.UiSettings.GenerativeAnswerConfig
Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder
Overrides

setDisableRelatedQuestions(boolean value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setDisableRelatedQuestions(boolean value)

Whether generated answer contains suggested related questions.

bool disable_related_questions = 8;

Parameter
Name Description
value boolean

The disableRelatedQuestions to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setIgnoreAdversarialQuery(boolean value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setIgnoreAdversarialQuery(boolean value)

Optional. Specifies whether to filter out queries that are adversarial.

bool ignore_adversarial_query = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The ignoreAdversarialQuery to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setIgnoreLowRelevantContent(boolean value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setIgnoreLowRelevantContent(boolean value)

Optional. Specifies whether to filter out queries that are not relevant to the content.

bool ignore_low_relevant_content = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The ignoreLowRelevantContent to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setIgnoreNonAnswerSeekingQuery(boolean value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setIgnoreNonAnswerSeekingQuery(boolean value)

Optional. Specifies whether to filter out queries that are not answer-seeking. The default value is false.

No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to true, we skip generating answers for non-answer seeking queries and return fallback messages instead.

bool ignore_non_answer_seeking_query = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The ignoreNonAnswerSeekingQuery to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setImageSource(WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setImageSource(WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource value)

Optional. Source of image returned in the answer.

.google.cloud.discoveryengine.v1.WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource image_source = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource

The imageSource to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setImageSourceValue(int value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setImageSourceValue(int value)

Optional. Source of image returned in the answer.

.google.cloud.discoveryengine.v1.WidgetConfig.UiSettings.GenerativeAnswerConfig.ImageSource image_source = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for imageSource to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setLanguageCode(String value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setLanguageCode(String value)

Language code for Summary. Use language tags defined by BCP47. Note: This is an experimental feature.

string language_code = 7;

Parameter
Name Description
value String

The languageCode to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setLanguageCodeBytes(ByteString value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setLanguageCodeBytes(ByteString value)

Language code for Summary. Use language tags defined by BCP47. Note: This is an experimental feature.

string language_code = 7;

Parameter
Name Description
value ByteString

The bytes for languageCode to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setMaxRephraseSteps(int value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setMaxRephraseSteps(int value)

Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.

int32 max_rephrase_steps = 6;

Parameter
Name Description
value int

The maxRephraseSteps to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setModelPromptPreamble(String value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setModelPromptPreamble(String value)

Text at the beginning of the prompt that instructs the model that generates the answer.

string model_prompt_preamble = 5;

Parameter
Name Description
value String

The modelPromptPreamble to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setModelPromptPreambleBytes(ByteString value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setModelPromptPreambleBytes(ByteString value)

Text at the beginning of the prompt that instructs the model that generates the answer.

string model_prompt_preamble = 5;

Parameter
Name Description
value ByteString

The bytes for modelPromptPreamble to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setModelVersion(String value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setModelVersion(String value)

The model version used to generate the answer.

string model_version = 4;

Parameter
Name Description
value String

The modelVersion to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setModelVersionBytes(ByteString value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setModelVersionBytes(ByteString value)

The model version used to generate the answer.

string model_version = 4;

Parameter
Name Description
value ByteString

The bytes for modelVersion to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.

setResultCount(int value)

public WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder setResultCount(int value)

The number of top results to generate the answer from. Up to 10.

int32 result_count = 3;

Parameter
Name Description
value int

The resultCount to set.

Returns
Type Description
WidgetConfig.UiSettings.GenerativeAnswerConfig.Builder

This builder for chaining.