Class RetrievalMetadata.Builder (3.84.0)

public static final class RetrievalMetadata.Builder extends GeneratedMessage.Builder<RetrievalMetadata.Builder> implements RetrievalMetadataOrBuilder

Metadata related to retrieval in the grounding flow.

Protobuf type google.cloud.aiplatform.v1beta1.RetrievalMetadata

Static Methods

getDescriptor()

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

Methods

build()

public RetrievalMetadata build()
Returns
Type Description
RetrievalMetadata

buildPartial()

public RetrievalMetadata buildPartial()
Returns
Type Description
RetrievalMetadata

clear()

public RetrievalMetadata.Builder clear()
Returns
Type Description
RetrievalMetadata.Builder
Overrides

clearGoogleSearchDynamicRetrievalScore()

public RetrievalMetadata.Builder clearGoogleSearchDynamicRetrievalScore()

Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search.

float google_search_dynamic_retrieval_score = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RetrievalMetadata.Builder

This builder for chaining.

getDefaultInstanceForType()

public RetrievalMetadata getDefaultInstanceForType()
Returns
Type Description
RetrievalMetadata

getDescriptorForType()

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

getGoogleSearchDynamicRetrievalScore()

public float getGoogleSearchDynamicRetrievalScore()

Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search.

float google_search_dynamic_retrieval_score = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
float

The googleSearchDynamicRetrievalScore.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RetrievalMetadata other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setGoogleSearchDynamicRetrievalScore(float value)

public RetrievalMetadata.Builder setGoogleSearchDynamicRetrievalScore(float value)

Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search.

float google_search_dynamic_retrieval_score = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value float

The googleSearchDynamicRetrievalScore to set.

Returns
Type Description
RetrievalMetadata.Builder

This builder for chaining.