Package com.google.cloud.aiplatform.v1
Class Fact.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Fact.Builder>
com.google.cloud.aiplatform.v1.Fact.Builder
- All Implemented Interfaces:
FactOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Fact
public static final class Fact.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Fact.Builder>
implements FactOrBuilder
The fact used in grounding.Protobuf type
google.cloud.aiplatform.v1.Fact-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()If present, chunk properties.Query that is used to retrieve this fact.If present, 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 fact and its range depends on the metric type.If present, the summary/snippet of the fact.If present, it refers to the title of this fact.clearUri()If present, this uri links to the source of the fact.Deprecated.google.cloud.aiplatform.v1.Fact.vector_distance is deprecated.getChunk()If present, chunk properties.If present, chunk properties.If present, chunk properties.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetQuery()Query that is used to retrieve this fact.com.google.protobuf.ByteStringQuery that is used to retrieve this fact.doublegetScore()If present, 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 fact and its range depends on the metric type.If present, the summary/snippet of the fact.com.google.protobuf.ByteStringIf present, the summary/snippet of the fact.getTitle()If present, it refers to the title of this fact.com.google.protobuf.ByteStringIf present, it refers to the title of this fact.getUri()If present, this uri links to the source of the fact.com.google.protobuf.ByteStringIf present, this uri links to the source of the fact.doubleDeprecated.google.cloud.aiplatform.v1.Fact.vector_distance is deprecated.booleanhasChunk()If present, chunk properties.booleanhasQuery()Query that is used to retrieve this fact.booleanhasScore()If present, 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 fact and its range depends on the metric type.booleanIf present, the summary/snippet of the fact.booleanhasTitle()If present, it refers to the title of this fact.booleanhasUri()If present, this uri links to the source of the fact.booleanDeprecated.google.cloud.aiplatform.v1.Fact.vector_distance is deprecated.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeChunk(RagChunk value) If present, chunk properties.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) If present, chunk properties.setChunk(RagChunk.Builder builderForValue) If present, chunk properties.Query that is used to retrieve this fact.setQueryBytes(com.google.protobuf.ByteString value) Query that is used to retrieve this fact.setScore(double value) If present, 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 fact and its range depends on the metric type.setSummary(String value) If present, the summary/snippet of the fact.setSummaryBytes(com.google.protobuf.ByteString value) If present, the summary/snippet of the fact.If present, it refers to the title of this fact.setTitleBytes(com.google.protobuf.ByteString value) If present, it refers to the title of this fact.If present, this uri links to the source of the fact.setUriBytes(com.google.protobuf.ByteString value) If present, this uri links to the source of the fact.setVectorDistance(double value) Deprecated.google.cloud.aiplatform.v1.Fact.vector_distance is deprecated.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Fact.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Fact.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Fact.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Fact.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Fact.Builder>
-
mergeFrom
public Fact.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Fact.Builder>- Throws:
IOException
-
hasQuery
public boolean hasQuery()Query that is used to retrieve this fact.
optional string query = 1;- Specified by:
hasQueryin interfaceFactOrBuilder- Returns:
- Whether the query field is set.
-
getQuery
Query that is used to retrieve this fact.
optional string query = 1;- Specified by:
getQueryin interfaceFactOrBuilder- Returns:
- The query.
-
getQueryBytes
public com.google.protobuf.ByteString getQueryBytes()Query that is used to retrieve this fact.
optional string query = 1;- Specified by:
getQueryBytesin interfaceFactOrBuilder- Returns:
- The bytes for query.
-
setQuery
Query that is used to retrieve this fact.
optional string query = 1;- Parameters:
value- The query to set.- Returns:
- This builder for chaining.
-
clearQuery
Query that is used to retrieve this fact.
optional string query = 1;- Returns:
- This builder for chaining.
-
setQueryBytes
Query that is used to retrieve this fact.
optional string query = 1;- Parameters:
value- The bytes for query to set.- Returns:
- This builder for chaining.
-
hasTitle
public boolean hasTitle()If present, it refers to the title of this fact.
optional string title = 2;- Specified by:
hasTitlein interfaceFactOrBuilder- Returns:
- Whether the title field is set.
-
getTitle
If present, it refers to the title of this fact.
optional string title = 2;- Specified by:
getTitlein interfaceFactOrBuilder- Returns:
- The title.
-
getTitleBytes
public com.google.protobuf.ByteString getTitleBytes()If present, it refers to the title of this fact.
optional string title = 2;- Specified by:
getTitleBytesin interfaceFactOrBuilder- Returns:
- The bytes for title.
-
setTitle
If present, it refers to the title of this fact.
optional string title = 2;- Parameters:
value- The title to set.- Returns:
- This builder for chaining.
-
clearTitle
If present, it refers to the title of this fact.
optional string title = 2;- Returns:
- This builder for chaining.
-
setTitleBytes
If present, it refers to the title of this fact.
optional string title = 2;- Parameters:
value- The bytes for title to set.- Returns:
- This builder for chaining.
-
hasUri
public boolean hasUri()If present, this uri links to the source of the fact.
optional string uri = 3;- Specified by:
hasUriin interfaceFactOrBuilder- Returns:
- Whether the uri field is set.
-
getUri
If present, this uri links to the source of the fact.
optional string uri = 3;- Specified by:
getUriin interfaceFactOrBuilder- Returns:
- The uri.
-
getUriBytes
public com.google.protobuf.ByteString getUriBytes()If present, this uri links to the source of the fact.
optional string uri = 3;- Specified by:
getUriBytesin interfaceFactOrBuilder- Returns:
- The bytes for uri.
-
setUri
If present, this uri links to the source of the fact.
optional string uri = 3;- Parameters:
value- The uri to set.- Returns:
- This builder for chaining.
-
clearUri
If present, this uri links to the source of the fact.
optional string uri = 3;- Returns:
- This builder for chaining.
-
setUriBytes
If present, this uri links to the source of the fact.
optional string uri = 3;- Parameters:
value- The bytes for uri to set.- Returns:
- This builder for chaining.
-
hasSummary
public boolean hasSummary()If present, the summary/snippet of the fact.
optional string summary = 4;- Specified by:
hasSummaryin interfaceFactOrBuilder- Returns:
- Whether the summary field is set.
-
getSummary
If present, the summary/snippet of the fact.
optional string summary = 4;- Specified by:
getSummaryin interfaceFactOrBuilder- Returns:
- The summary.
-
getSummaryBytes
public com.google.protobuf.ByteString getSummaryBytes()If present, the summary/snippet of the fact.
optional string summary = 4;- Specified by:
getSummaryBytesin interfaceFactOrBuilder- Returns:
- The bytes for summary.
-
setSummary
If present, the summary/snippet of the fact.
optional string summary = 4;- Parameters:
value- The summary to set.- Returns:
- This builder for chaining.
-
clearSummary
If present, the summary/snippet of the fact.
optional string summary = 4;- Returns:
- This builder for chaining.
-
setSummaryBytes
If present, the summary/snippet of the fact.
optional string summary = 4;- Parameters:
value- The bytes for summary to set.- Returns:
- This builder for chaining.
-
hasVectorDistance
Deprecated.google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See google/cloud/aiplatform/v1/vertex_rag_service.proto;l=313If present, the distance between the query vector and this fact vector.
optional double vector_distance = 5 [deprecated = true];- Specified by:
hasVectorDistancein interfaceFactOrBuilder- Returns:
- Whether the vectorDistance field is set.
-
getVectorDistance
Deprecated.google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See google/cloud/aiplatform/v1/vertex_rag_service.proto;l=313If present, the distance between the query vector and this fact vector.
optional double vector_distance = 5 [deprecated = true];- Specified by:
getVectorDistancein interfaceFactOrBuilder- Returns:
- The vectorDistance.
-
setVectorDistance
Deprecated.google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See google/cloud/aiplatform/v1/vertex_rag_service.proto;l=313If present, the distance between the query vector and this fact vector.
optional double vector_distance = 5 [deprecated = true];- Parameters:
value- The vectorDistance to set.- Returns:
- This builder for chaining.
-
clearVectorDistance
Deprecated.google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See google/cloud/aiplatform/v1/vertex_rag_service.proto;l=313If present, the distance between the query vector and this fact vector.
optional double vector_distance = 5 [deprecated = true];- Returns:
- This builder for chaining.
-
hasScore
public boolean hasScore()If present, 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 fact 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 fact. The larger the distance, the less relevant the fact 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;- Specified by:
hasScorein interfaceFactOrBuilder- Returns:
- Whether the score field is set.
-
getScore
public double getScore()If present, 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 fact 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 fact. The larger the distance, the less relevant the fact 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;- Specified by:
getScorein interfaceFactOrBuilder- Returns:
- The score.
-
setScore
If present, 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 fact 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 fact. The larger the distance, the less relevant the fact 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;- Parameters:
value- The score to set.- Returns:
- This builder for chaining.
-
clearScore
If present, 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 fact 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 fact. The larger the distance, the less relevant the fact 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;- Returns:
- This builder for chaining.
-
hasChunk
public boolean hasChunk()If present, chunk properties.
optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;- Specified by:
hasChunkin interfaceFactOrBuilder- Returns:
- Whether the chunk field is set.
-
getChunk
If present, chunk properties.
optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;- Specified by:
getChunkin interfaceFactOrBuilder- Returns:
- The chunk.
-
setChunk
If present, chunk properties.
optional .google.cloud.aiplatform.v1.RagChunk chunk = 7; -
setChunk
If present, chunk properties.
optional .google.cloud.aiplatform.v1.RagChunk chunk = 7; -
mergeChunk
If present, chunk properties.
optional .google.cloud.aiplatform.v1.RagChunk chunk = 7; -
clearChunk
If present, chunk properties.
optional .google.cloud.aiplatform.v1.RagChunk chunk = 7; -
getChunkBuilder
If present, chunk properties.
optional .google.cloud.aiplatform.v1.RagChunk chunk = 7; -
getChunkOrBuilder
If present, chunk properties.
optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;- Specified by:
getChunkOrBuilderin interfaceFactOrBuilder
-