Class Assistant.GenerationConfig.Builder (0.90.0)

public static final class Assistant.GenerationConfig.Builder extends GeneratedMessage.Builder<Assistant.GenerationConfig.Builder> implements Assistant.GenerationConfigOrBuilder

Configuration for the generation of the assistant response.

Protobuf type google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig

Static Methods

getDescriptor()

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

Methods

addAllAllowedModelIds(Iterable<String> values)

public Assistant.GenerationConfig.Builder addAllAllowedModelIds(Iterable<String> values)

Optional. The list of models that are allowed to be used for assistant.

repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The allowedModelIds to add.

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

addAllowedModelIds(String value)

public Assistant.GenerationConfig.Builder addAllowedModelIds(String value)

Optional. The list of models that are allowed to be used for assistant.

repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The allowedModelIds to add.

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

addAllowedModelIdsBytes(ByteString value)

public Assistant.GenerationConfig.Builder addAllowedModelIdsBytes(ByteString value)

Optional. The list of models that are allowed to be used for assistant.

repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the allowedModelIds to add.

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

build()

public Assistant.GenerationConfig build()
Returns
Type Description
Assistant.GenerationConfig

buildPartial()

public Assistant.GenerationConfig buildPartial()
Returns
Type Description
Assistant.GenerationConfig

clear()

public Assistant.GenerationConfig.Builder clear()
Returns
Type Description
Assistant.GenerationConfig.Builder
Overrides

clearAllowedModelIds()

public Assistant.GenerationConfig.Builder clearAllowedModelIds()

Optional. The list of models that are allowed to be used for assistant.

repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

clearDefaultLanguage()

public Assistant.GenerationConfig.Builder clearDefaultLanguage()

The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as en. If not specified, the language will be automatically detected.

string default_language = 4;

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

clearDefaultModelId()

public Assistant.GenerationConfig.Builder clearDefaultModelId()

Optional. The default model to use for assistant.

string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

clearSystemInstruction()

public Assistant.GenerationConfig.Builder clearSystemInstruction()

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3;

Returns
Type Description
Assistant.GenerationConfig.Builder

getAllowedModelIds(int index)

public String getAllowedModelIds(int index)

Optional. The list of models that are allowed to be used for assistant.

repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The allowedModelIds at the given index.

getAllowedModelIdsBytes(int index)

public ByteString getAllowedModelIdsBytes(int index)

Optional. The list of models that are allowed to be used for assistant.

repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedModelIds at the given index.

getAllowedModelIdsCount()

public int getAllowedModelIdsCount()

Optional. The list of models that are allowed to be used for assistant.

repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of allowedModelIds.

getAllowedModelIdsList()

public ProtocolStringList getAllowedModelIdsList()

Optional. The list of models that are allowed to be used for assistant.

repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the allowedModelIds.

getDefaultInstanceForType()

public Assistant.GenerationConfig getDefaultInstanceForType()
Returns
Type Description
Assistant.GenerationConfig

getDefaultLanguage()

public String getDefaultLanguage()

The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as en. If not specified, the language will be automatically detected.

string default_language = 4;

Returns
Type Description
String

The defaultLanguage.

getDefaultLanguageBytes()

public ByteString getDefaultLanguageBytes()

The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as en. If not specified, the language will be automatically detected.

string default_language = 4;

Returns
Type Description
ByteString

The bytes for defaultLanguage.

getDefaultModelId()

public String getDefaultModelId()

Optional. The default model to use for assistant.

string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The defaultModelId.

getDefaultModelIdBytes()

public ByteString getDefaultModelIdBytes()

Optional. The default model to use for assistant.

string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for defaultModelId.

getDescriptorForType()

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

getSystemInstruction()

public Assistant.GenerationConfig.SystemInstruction getSystemInstruction()

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3;

Returns
Type Description
Assistant.GenerationConfig.SystemInstruction

The systemInstruction.

getSystemInstructionBuilder()

public Assistant.GenerationConfig.SystemInstruction.Builder getSystemInstructionBuilder()

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3;

Returns
Type Description
Assistant.GenerationConfig.SystemInstruction.Builder

getSystemInstructionOrBuilder()

public Assistant.GenerationConfig.SystemInstructionOrBuilder getSystemInstructionOrBuilder()

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3;

Returns
Type Description
Assistant.GenerationConfig.SystemInstructionOrBuilder

hasSystemInstruction()

public boolean hasSystemInstruction()

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3;

Returns
Type Description
boolean

Whether the systemInstruction field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Assistant.GenerationConfig other)

public Assistant.GenerationConfig.Builder mergeFrom(Assistant.GenerationConfig other)
Parameter
Name Description
other Assistant.GenerationConfig
Returns
Type Description
Assistant.GenerationConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Assistant.GenerationConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Assistant.GenerationConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Assistant.GenerationConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Assistant.GenerationConfig.Builder
Overrides

mergeSystemInstruction(Assistant.GenerationConfig.SystemInstruction value)

public Assistant.GenerationConfig.Builder mergeSystemInstruction(Assistant.GenerationConfig.SystemInstruction value)

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3;

Parameter
Name Description
value Assistant.GenerationConfig.SystemInstruction
Returns
Type Description
Assistant.GenerationConfig.Builder

setAllowedModelIds(int index, String value)

public Assistant.GenerationConfig.Builder setAllowedModelIds(int index, String value)

Optional. The list of models that are allowed to be used for assistant.

repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The allowedModelIds to set.

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

setDefaultLanguage(String value)

public Assistant.GenerationConfig.Builder setDefaultLanguage(String value)

The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as en. If not specified, the language will be automatically detected.

string default_language = 4;

Parameter
Name Description
value String

The defaultLanguage to set.

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

setDefaultLanguageBytes(ByteString value)

public Assistant.GenerationConfig.Builder setDefaultLanguageBytes(ByteString value)

The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as en. If not specified, the language will be automatically detected.

string default_language = 4;

Parameter
Name Description
value ByteString

The bytes for defaultLanguage to set.

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

setDefaultModelId(String value)

public Assistant.GenerationConfig.Builder setDefaultModelId(String value)

Optional. The default model to use for assistant.

string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The defaultModelId to set.

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

setDefaultModelIdBytes(ByteString value)

public Assistant.GenerationConfig.Builder setDefaultModelIdBytes(ByteString value)

Optional. The default model to use for assistant.

string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for defaultModelId to set.

Returns
Type Description
Assistant.GenerationConfig.Builder

This builder for chaining.

setSystemInstruction(Assistant.GenerationConfig.SystemInstruction value)

public Assistant.GenerationConfig.Builder setSystemInstruction(Assistant.GenerationConfig.SystemInstruction value)

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3;

Parameter
Name Description
value Assistant.GenerationConfig.SystemInstruction
Returns
Type Description
Assistant.GenerationConfig.Builder

setSystemInstruction(Assistant.GenerationConfig.SystemInstruction.Builder builderForValue)

public Assistant.GenerationConfig.Builder setSystemInstruction(Assistant.GenerationConfig.SystemInstruction.Builder builderForValue)

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3;

Parameter
Name Description
builderForValue Assistant.GenerationConfig.SystemInstruction.Builder
Returns
Type Description
Assistant.GenerationConfig.Builder