Class DataStoreTool.GroundingConfig.Builder (0.1.0)

public static final class DataStoreTool.GroundingConfig.Builder extends GeneratedMessage.Builder<DataStoreTool.GroundingConfig.Builder> implements DataStoreTool.GroundingConfigOrBuilder

Grounding configuration.

Protobuf type google.cloud.ces.v1.DataStoreTool.GroundingConfig

Static Methods

getDescriptor()

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

Methods

build()

public DataStoreTool.GroundingConfig build()
Returns
Type Description
DataStoreTool.GroundingConfig

buildPartial()

public DataStoreTool.GroundingConfig buildPartial()
Returns
Type Description
DataStoreTool.GroundingConfig

clear()

public DataStoreTool.GroundingConfig.Builder clear()
Returns
Type Description
DataStoreTool.GroundingConfig.Builder
Overrides

clearDisabled()

public DataStoreTool.GroundingConfig.Builder clearDisabled()

Optional. Whether grounding is disabled.

bool disabled = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DataStoreTool.GroundingConfig.Builder

This builder for chaining.

clearGroundingLevel()

public DataStoreTool.GroundingConfig.Builder clearGroundingLevel()

Optional. The groundedness threshold of the answer based on the retrieved sources. The value has a configurable range of [1, 5]. The level is used to threshold the groundedness of the answer, meaning that all responses with a groundedness score below the threshold will fall back to returning relevant snippets only.

For example, a level of 3 means that the groundedness score must be 3 or higher for the response to be returned.

float grounding_level = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DataStoreTool.GroundingConfig.Builder

This builder for chaining.

getDefaultInstanceForType()

public DataStoreTool.GroundingConfig getDefaultInstanceForType()
Returns
Type Description
DataStoreTool.GroundingConfig

getDescriptorForType()

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

getDisabled()

public boolean getDisabled()

Optional. Whether grounding is disabled.

bool disabled = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The disabled.

getGroundingLevel()

public float getGroundingLevel()

Optional. The groundedness threshold of the answer based on the retrieved sources. The value has a configurable range of [1, 5]. The level is used to threshold the groundedness of the answer, meaning that all responses with a groundedness score below the threshold will fall back to returning relevant snippets only.

For example, a level of 3 means that the groundedness score must be 3 or higher for the response to be returned.

float grounding_level = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
float

The groundingLevel.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(DataStoreTool.GroundingConfig other)

public DataStoreTool.GroundingConfig.Builder mergeFrom(DataStoreTool.GroundingConfig other)
Parameter
Name Description
other DataStoreTool.GroundingConfig
Returns
Type Description
DataStoreTool.GroundingConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public DataStoreTool.GroundingConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
DataStoreTool.GroundingConfig.Builder
Overrides

setDisabled(boolean value)

public DataStoreTool.GroundingConfig.Builder setDisabled(boolean value)

Optional. Whether grounding is disabled.

bool disabled = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The disabled to set.

Returns
Type Description
DataStoreTool.GroundingConfig.Builder

This builder for chaining.

setGroundingLevel(float value)

public DataStoreTool.GroundingConfig.Builder setGroundingLevel(float value)

Optional. The groundedness threshold of the answer based on the retrieved sources. The value has a configurable range of [1, 5]. The level is used to threshold the groundedness of the answer, meaning that all responses with a groundedness score below the threshold will fall back to returning relevant snippets only.

For example, a level of 3 means that the groundedness score must be 3 or higher for the response to be returned.

float grounding_level = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value float

The groundingLevel to set.

Returns
Type Description
DataStoreTool.GroundingConfig.Builder

This builder for chaining.