public static final class GroundingChunk.RetrievedContext.Builder extends GeneratedMessage.Builder<GroundingChunk.RetrievedContext.Builder> implements GroundingChunk.RetrievedContextOrBuilderContext retrieved from a data source to ground the model's response. This is used when a retrieval tool fetches information from a user-provided corpus or a public dataset.
Protobuf type google.cloud.dialogflow.v2.GroundingChunk.RetrievedContext
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > GroundingChunk.RetrievedContext.BuilderImplements
GroundingChunk.RetrievedContextOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public GroundingChunk.RetrievedContext build()| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext |
|
buildPartial()
public GroundingChunk.RetrievedContext buildPartial()| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext |
|
clear()
public GroundingChunk.RetrievedContext.Builder clear()| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
|
clearText()
public GroundingChunk.RetrievedContext.Builder clearText()Output only. The content of the retrieved data source.
string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
This builder for chaining. |
clearTitle()
public GroundingChunk.RetrievedContext.Builder clearTitle()Output only. The title of the retrieved data source.
string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
This builder for chaining. |
clearUri()
public GroundingChunk.RetrievedContext.Builder clearUri()Output only. The URI of the retrieved data source.
string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public GroundingChunk.RetrievedContext getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getText()
public String getText()Output only. The content of the retrieved data source.
string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The text. |
getTextBytes()
public ByteString getTextBytes()Output only. The content of the retrieved data source.
string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for text. |
getTitle()
public String getTitle()Output only. The title of the retrieved data source.
string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The title. |
getTitleBytes()
public ByteString getTitleBytes()Output only. The title of the retrieved data source.
string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for title. |
getUri()
public String getUri()Output only. The URI of the retrieved data source.
string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The uri. |
getUriBytes()
public ByteString getUriBytes()Output only. The URI of the retrieved data source.
string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for uri. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(GroundingChunk.RetrievedContext other)
public GroundingChunk.RetrievedContext.Builder mergeFrom(GroundingChunk.RetrievedContext other)| Parameter | |
|---|---|
| Name | Description |
other |
GroundingChunk.RetrievedContext |
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public GroundingChunk.RetrievedContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public GroundingChunk.RetrievedContext.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
|
setText(String value)
public GroundingChunk.RetrievedContext.Builder setText(String value)Output only. The content of the retrieved data source.
string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe text to set. |
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
This builder for chaining. |
setTextBytes(ByteString value)
public GroundingChunk.RetrievedContext.Builder setTextBytes(ByteString value)Output only. The content of the retrieved data source.
string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for text to set. |
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
This builder for chaining. |
setTitle(String value)
public GroundingChunk.RetrievedContext.Builder setTitle(String value)Output only. The title of the retrieved data source.
string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe title to set. |
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
This builder for chaining. |
setTitleBytes(ByteString value)
public GroundingChunk.RetrievedContext.Builder setTitleBytes(ByteString value)Output only. The title of the retrieved data source.
string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for title to set. |
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
This builder for chaining. |
setUri(String value)
public GroundingChunk.RetrievedContext.Builder setUri(String value)Output only. The URI of the retrieved data source.
string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe uri to set. |
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
This builder for chaining. |
setUriBytes(ByteString value)
public GroundingChunk.RetrievedContext.Builder setUriBytes(ByteString value)Output only. The URI of the retrieved data source.
string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for uri to set. |
| Returns | |
|---|---|
| Type | Description |
GroundingChunk.RetrievedContext.Builder |
This builder for chaining. |