public static final class RagContexts.Context.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder> implements RagContexts.ContextOrBuilder
A context of the query.Protobuf type
google.cloud.aiplatform.v1beta1.RagContexts.Context| Modifier and Type | Method and Description |
|---|---|
RagContexts.Context.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
RagContexts.Context |
build() |
RagContexts.Context |
buildPartial() |
RagContexts.Context.Builder |
clear() |
RagContexts.Context.Builder |
clearDistance()
Deprecated.
google.cloud.aiplatform.v1beta1.RagContexts.Context.distance is deprecated. See
google/cloud/aiplatform/v1beta1/vertex_rag_service.proto;l=181
|
RagContexts.Context.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
RagContexts.Context.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
RagContexts.Context.Builder |
clearScore()
According to the underlying Vector DB and the selected metric type, the
score can be either the distance or the similarity between the query and
the context and its range depends on the metric type.
|
RagContexts.Context.Builder |
clearSourceDisplayName()
The file display name.
|
RagContexts.Context.Builder |
clearSourceUri()
If the file is imported from Cloud Storage or Google Drive, source_uri
will be original file URI in Cloud Storage or Google Drive; if file is
uploaded, source_uri will be file display name.
|
RagContexts.Context.Builder |
clearSparseDistance()
Deprecated.
google.cloud.aiplatform.v1beta1.RagContexts.Context.sparse_distance is
deprecated. See google/cloud/aiplatform/v1beta1/vertex_rag_service.proto;l=185
|
RagContexts.Context.Builder |
clearText()
The text chunk.
|
RagContexts.Context.Builder |
clone() |
RagContexts.Context |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
double |
getDistance()
Deprecated.
google.cloud.aiplatform.v1beta1.RagContexts.Context.distance is deprecated. See
google/cloud/aiplatform/v1beta1/vertex_rag_service.proto;l=181
|
double |
getScore()
According to the underlying Vector DB and the selected metric type, the
score can be either the distance or the similarity between the query and
the context and its range depends on the metric type.
|
String |
getSourceDisplayName()
The file display name.
|
com.google.protobuf.ByteString |
getSourceDisplayNameBytes()
The file display name.
|
String |
getSourceUri()
If the file is imported from Cloud Storage or Google Drive, source_uri
will be original file URI in Cloud Storage or Google Drive; if file is
uploaded, source_uri will be file display name.
|
com.google.protobuf.ByteString |
getSourceUriBytes()
If the file is imported from Cloud Storage or Google Drive, source_uri
will be original file URI in Cloud Storage or Google Drive; if file is
uploaded, source_uri will be file display name.
|
double |
getSparseDistance()
Deprecated.
google.cloud.aiplatform.v1beta1.RagContexts.Context.sparse_distance is
deprecated. See google/cloud/aiplatform/v1beta1/vertex_rag_service.proto;l=185
|
String |
getText()
The text chunk.
|
com.google.protobuf.ByteString |
getTextBytes()
The text chunk.
|
boolean |
hasScore()
According to the underlying Vector DB and the selected metric type, the
score can be either the distance or the similarity between the query and
the context and its range depends on the metric type.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
RagContexts.Context.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
RagContexts.Context.Builder |
mergeFrom(com.google.protobuf.Message other) |
RagContexts.Context.Builder |
mergeFrom(RagContexts.Context other) |
RagContexts.Context.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
RagContexts.Context.Builder |
setDistance(double value)
Deprecated.
google.cloud.aiplatform.v1beta1.RagContexts.Context.distance is deprecated. See
google/cloud/aiplatform/v1beta1/vertex_rag_service.proto;l=181
|
RagContexts.Context.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
RagContexts.Context.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
RagContexts.Context.Builder |
setScore(double value)
According to the underlying Vector DB and the selected metric type, the
score can be either the distance or the similarity between the query and
the context and its range depends on the metric type.
|
RagContexts.Context.Builder |
setSourceDisplayName(String value)
The file display name.
|
RagContexts.Context.Builder |
setSourceDisplayNameBytes(com.google.protobuf.ByteString value)
The file display name.
|
RagContexts.Context.Builder |
setSourceUri(String value)
If the file is imported from Cloud Storage or Google Drive, source_uri
will be original file URI in Cloud Storage or Google Drive; if file is
uploaded, source_uri will be file display name.
|
RagContexts.Context.Builder |
setSourceUriBytes(com.google.protobuf.ByteString value)
If the file is imported from Cloud Storage or Google Drive, source_uri
will be original file URI in Cloud Storage or Google Drive; if file is
uploaded, source_uri will be file display name.
|
RagContexts.Context.Builder |
setSparseDistance(double value)
Deprecated.
google.cloud.aiplatform.v1beta1.RagContexts.Context.sparse_distance is
deprecated. See google/cloud/aiplatform/v1beta1/vertex_rag_service.proto;l=185
|
RagContexts.Context.Builder |
setText(String value)
The text chunk.
|
RagContexts.Context.Builder |
setTextBytes(com.google.protobuf.ByteString value)
The text chunk.
|
RagContexts.Context.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public RagContexts.Context.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public RagContexts.Context getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic RagContexts.Context build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic RagContexts.Context buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic RagContexts.Context.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public RagContexts.Context.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public RagContexts.Context.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public RagContexts.Context.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public RagContexts.Context.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public RagContexts.Context.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public RagContexts.Context.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RagContexts.Context.Builder>public RagContexts.Context.Builder mergeFrom(RagContexts.Context other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public RagContexts.Context.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RagContexts.Context.Builder>IOExceptionpublic String getSourceUri()
If the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name.
string source_uri = 1;getSourceUri in interface RagContexts.ContextOrBuilderpublic com.google.protobuf.ByteString getSourceUriBytes()
If the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name.
string source_uri = 1;getSourceUriBytes in interface RagContexts.ContextOrBuilderpublic RagContexts.Context.Builder setSourceUri(String value)
If the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name.
string source_uri = 1;value - The sourceUri to set.public RagContexts.Context.Builder clearSourceUri()
If the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name.
string source_uri = 1;public RagContexts.Context.Builder setSourceUriBytes(com.google.protobuf.ByteString value)
If the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name.
string source_uri = 1;value - The bytes for sourceUri to set.public String getSourceDisplayName()
The file display name.
string source_display_name = 5;getSourceDisplayName in interface RagContexts.ContextOrBuilderpublic com.google.protobuf.ByteString getSourceDisplayNameBytes()
The file display name.
string source_display_name = 5;getSourceDisplayNameBytes in interface RagContexts.ContextOrBuilderpublic RagContexts.Context.Builder setSourceDisplayName(String value)
The file display name.
string source_display_name = 5;value - The sourceDisplayName to set.public RagContexts.Context.Builder clearSourceDisplayName()
The file display name.
string source_display_name = 5;public RagContexts.Context.Builder setSourceDisplayNameBytes(com.google.protobuf.ByteString value)
The file display name.
string source_display_name = 5;value - The bytes for sourceDisplayName to set.public String getText()
The text chunk.
string text = 2;getText in interface RagContexts.ContextOrBuilderpublic com.google.protobuf.ByteString getTextBytes()
The text chunk.
string text = 2;getTextBytes in interface RagContexts.ContextOrBuilderpublic RagContexts.Context.Builder setText(String value)
The text chunk.
string text = 2;value - The text to set.public RagContexts.Context.Builder clearText()
The text chunk.
string text = 2;public RagContexts.Context.Builder setTextBytes(com.google.protobuf.ByteString value)
The text chunk.
string text = 2;value - The bytes for text to set.@Deprecated public double getDistance()
The distance between the query dense embedding vector and the context text vector.
double distance = 3 [deprecated = true];getDistance in interface RagContexts.ContextOrBuilder@Deprecated public RagContexts.Context.Builder setDistance(double value)
The distance between the query dense embedding vector and the context text vector.
double distance = 3 [deprecated = true];value - The distance to set.@Deprecated public RagContexts.Context.Builder clearDistance()
The distance between the query dense embedding vector and the context text vector.
double distance = 3 [deprecated = true];@Deprecated public double getSparseDistance()
The distance between the query sparse embedding vector and the context text vector.
double sparse_distance = 4 [deprecated = true];getSparseDistance in interface RagContexts.ContextOrBuilder@Deprecated public RagContexts.Context.Builder setSparseDistance(double value)
The distance between the query sparse embedding vector and the context text vector.
double sparse_distance = 4 [deprecated = true];value - The sparseDistance to set.@Deprecated public RagContexts.Context.Builder clearSparseDistance()
The distance between the query sparse embedding vector and the context text vector.
double sparse_distance = 4 [deprecated = true];public boolean hasScore()
According to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the context and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the context. The larger the distance, the less relevant the context is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant.
optional double score = 6;hasScore in interface RagContexts.ContextOrBuilderpublic double getScore()
According to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the context and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the context. The larger the distance, the less relevant the context is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant.
optional double score = 6;getScore in interface RagContexts.ContextOrBuilderpublic RagContexts.Context.Builder setScore(double value)
According to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the context and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the context. The larger the distance, the less relevant the context is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant.
optional double score = 6;value - The score to set.public RagContexts.Context.Builder clearScore()
According to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the context and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the context. The larger the distance, the less relevant the context is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant.
optional double score = 6;public final RagContexts.Context.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>public final RagContexts.Context.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RagContexts.Context.Builder>Copyright © 2025 Google LLC. All rights reserved.