public static final class Answer.GroundingSupport.Builder extends GeneratedMessageV3.Builder<Answer.GroundingSupport.Builder> implements Answer.GroundingSupportOrBuilder Grounding support for a claim in answer_text.
Protobuf type google.cloud.discoveryengine.v1.Answer.GroundingSupport
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Answer.GroundingSupport.BuilderImplements
Answer.GroundingSupportOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllSources(Iterable<? extends Answer.CitationSource> values)
public Answer.GroundingSupport.Builder addAllSources(Iterable<? extends Answer.CitationSource> values)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.discoveryengine.v1.Answer.CitationSource> |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Answer.GroundingSupport.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
addSources(Answer.CitationSource value)
public Answer.GroundingSupport.Builder addSources(Answer.CitationSource value)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Answer.CitationSource |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
addSources(Answer.CitationSource.Builder builderForValue)
public Answer.GroundingSupport.Builder addSources(Answer.CitationSource.Builder builderForValue)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Answer.CitationSource.Builder |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
addSources(int index, Answer.CitationSource value)
public Answer.GroundingSupport.Builder addSources(int index, Answer.CitationSource value)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Answer.CitationSource |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
addSources(int index, Answer.CitationSource.Builder builderForValue)
public Answer.GroundingSupport.Builder addSources(int index, Answer.CitationSource.Builder builderForValue)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Answer.CitationSource.Builder |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
addSourcesBuilder()
public Answer.CitationSource.Builder addSourcesBuilder()Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Answer.CitationSource.Builder |
|
addSourcesBuilder(int index)
public Answer.CitationSource.Builder addSourcesBuilder(int index)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Answer.CitationSource.Builder |
|
build()
public Answer.GroundingSupport build()| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport |
|
buildPartial()
public Answer.GroundingSupport buildPartial()| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport |
|
clear()
public Answer.GroundingSupport.Builder clear()| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
clearEndIndex()
public Answer.GroundingSupport.Builder clearEndIndex()Required. End of the claim, exclusive.
int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Answer.GroundingSupport.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
clearGroundingCheckRequired()
public Answer.GroundingSupport.Builder clearGroundingCheckRequired() Indicates that this claim required grounding check. When the
system decided this claim didn't require attribution/grounding check,
this field is set to false. In that case, no grounding check was
done for the claim and therefore grounding_score, sources is not
returned.
optional bool grounding_check_required = 4;
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
This builder for chaining. |
clearGroundingScore()
public Answer.GroundingSupport.Builder clearGroundingScore()A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
optional double grounding_score = 3;
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Answer.GroundingSupport.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
clearSources()
public Answer.GroundingSupport.Builder clearSources()Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
clearStartIndex()
public Answer.GroundingSupport.Builder clearStartIndex()Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
This builder for chaining. |
clone()
public Answer.GroundingSupport.Builder clone()| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
getDefaultInstanceForType()
public Answer.GroundingSupport getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getEndIndex()
public long getEndIndex()Required. End of the claim, exclusive.
int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
long |
The endIndex. |
getGroundingCheckRequired()
public boolean getGroundingCheckRequired() Indicates that this claim required grounding check. When the
system decided this claim didn't require attribution/grounding check,
this field is set to false. In that case, no grounding check was
done for the claim and therefore grounding_score, sources is not
returned.
optional bool grounding_check_required = 4;
| Returns | |
|---|---|
| Type | Description |
boolean |
The groundingCheckRequired. |
getGroundingScore()
public double getGroundingScore()A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
optional double grounding_score = 3;
| Returns | |
|---|---|
| Type | Description |
double |
The groundingScore. |
getSources(int index)
public Answer.CitationSource getSources(int index)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Answer.CitationSource |
|
getSourcesBuilder(int index)
public Answer.CitationSource.Builder getSourcesBuilder(int index)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Answer.CitationSource.Builder |
|
getSourcesBuilderList()
public List<Answer.CitationSource.Builder> getSourcesBuilderList()Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getSourcesCount()
public int getSourcesCount()Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
|
getSourcesList()
public List<Answer.CitationSource> getSourcesList()Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<CitationSource> |
|
getSourcesOrBuilder(int index)
public Answer.CitationSourceOrBuilder getSourcesOrBuilder(int index)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Answer.CitationSourceOrBuilder |
|
getSourcesOrBuilderList()
public List<? extends Answer.CitationSourceOrBuilder> getSourcesOrBuilderList()Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.discoveryengine.v1.Answer.CitationSourceOrBuilder> |
|
getStartIndex()
public long getStartIndex()Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
long |
The startIndex. |
hasGroundingCheckRequired()
public boolean hasGroundingCheckRequired() Indicates that this claim required grounding check. When the
system decided this claim didn't require attribution/grounding check,
this field is set to false. In that case, no grounding check was
done for the claim and therefore grounding_score, sources is not
returned.
optional bool grounding_check_required = 4;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the groundingCheckRequired field is set. |
hasGroundingScore()
public boolean hasGroundingScore()A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
optional double grounding_score = 3;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the groundingScore field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Answer.GroundingSupport other)
public Answer.GroundingSupport.Builder mergeFrom(Answer.GroundingSupport other)| Parameter | |
|---|---|
| Name | Description |
other |
Answer.GroundingSupport |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Answer.GroundingSupport.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Answer.GroundingSupport.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Answer.GroundingSupport.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
removeSources(int index)
public Answer.GroundingSupport.Builder removeSources(int index)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
setEndIndex(long value)
public Answer.GroundingSupport.Builder setEndIndex(long value)Required. End of the claim, exclusive.
int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
longThe endIndex to set. |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Answer.GroundingSupport.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
setGroundingCheckRequired(boolean value)
public Answer.GroundingSupport.Builder setGroundingCheckRequired(boolean value) Indicates that this claim required grounding check. When the
system decided this claim didn't require attribution/grounding check,
this field is set to false. In that case, no grounding check was
done for the claim and therefore grounding_score, sources is not
returned.
optional bool grounding_check_required = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
booleanThe groundingCheckRequired to set. |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
This builder for chaining. |
setGroundingScore(double value)
public Answer.GroundingSupport.Builder setGroundingScore(double value)A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
optional double grounding_score = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
doubleThe groundingScore to set. |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Answer.GroundingSupport.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
setSources(int index, Answer.CitationSource value)
public Answer.GroundingSupport.Builder setSources(int index, Answer.CitationSource value)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Answer.CitationSource |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
setSources(int index, Answer.CitationSource.Builder builderForValue)
public Answer.GroundingSupport.Builder setSources(int index, Answer.CitationSource.Builder builderForValue)Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Answer.CitationSource.Builder |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|
setStartIndex(long value)
public Answer.GroundingSupport.Builder setStartIndex(long value)Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
longThe startIndex to set. |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Answer.GroundingSupport.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Answer.GroundingSupport.Builder |
|