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 Type
    Method
    Description
     
     
     
    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.
    If present, this uri links to the source of the fact.
    Deprecated.
    google.cloud.aiplatform.v1.Fact.vector_distance is deprecated.
    If present, chunk properties.
    If present, chunk properties.
    If present, chunk properties.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    Query that is used to retrieve this fact.
    com.google.protobuf.ByteString
    Query that is used to retrieve this fact.
    double
    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.ByteString
    If present, the summary/snippet of the fact.
    If present, it refers to the title of this fact.
    com.google.protobuf.ByteString
    If present, it refers to the title of this fact.
    If present, this uri links to the source of the fact.
    com.google.protobuf.ByteString
    If present, this uri links to the source of the fact.
    double
    Deprecated.
    google.cloud.aiplatform.v1.Fact.vector_distance is deprecated.
    boolean
    If present, chunk properties.
    boolean
    Query that is used to retrieve this fact.
    boolean
    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.
    boolean
    If present, the summary/snippet of the fact.
    boolean
    If present, it refers to the title of this fact.
    boolean
    If present, this uri links to the source of the fact.
    boolean
    Deprecated.
    google.cloud.aiplatform.v1.Fact.vector_distance is deprecated.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    If present, chunk properties.
    mergeFrom(Fact other)
     
    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.
    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.
    setUri(String value)
    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, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Fact.Builder>
    • clear

      public Fact.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Fact.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Fact.Builder>
    • getDefaultInstanceForType

      public Fact getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Fact build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Fact buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Fact.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Fact.Builder>
    • mergeFrom

      public Fact.Builder mergeFrom(Fact other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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:
      hasQuery in interface FactOrBuilder
      Returns:
      Whether the query field is set.
    • getQuery

      public String getQuery()
       Query that is used to retrieve this fact.
       
      optional string query = 1;
      Specified by:
      getQuery in interface FactOrBuilder
      Returns:
      The query.
    • getQueryBytes

      public com.google.protobuf.ByteString getQueryBytes()
       Query that is used to retrieve this fact.
       
      optional string query = 1;
      Specified by:
      getQueryBytes in interface FactOrBuilder
      Returns:
      The bytes for query.
    • setQuery

      public Fact.Builder setQuery(String value)
       Query that is used to retrieve this fact.
       
      optional string query = 1;
      Parameters:
      value - The query to set.
      Returns:
      This builder for chaining.
    • clearQuery

      public Fact.Builder clearQuery()
       Query that is used to retrieve this fact.
       
      optional string query = 1;
      Returns:
      This builder for chaining.
    • setQueryBytes

      public Fact.Builder setQueryBytes(com.google.protobuf.ByteString value)
       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:
      hasTitle in interface FactOrBuilder
      Returns:
      Whether the title field is set.
    • getTitle

      public String getTitle()
       If present, it refers to the title of this fact.
       
      optional string title = 2;
      Specified by:
      getTitle in interface FactOrBuilder
      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:
      getTitleBytes in interface FactOrBuilder
      Returns:
      The bytes for title.
    • setTitle

      public Fact.Builder setTitle(String value)
       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

      public Fact.Builder clearTitle()
       If present, it refers to the title of this fact.
       
      optional string title = 2;
      Returns:
      This builder for chaining.
    • setTitleBytes

      public Fact.Builder setTitleBytes(com.google.protobuf.ByteString value)
       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:
      hasUri in interface FactOrBuilder
      Returns:
      Whether the uri field is set.
    • getUri

      public String getUri()
       If present, this uri links to the source of the fact.
       
      optional string uri = 3;
      Specified by:
      getUri in interface FactOrBuilder
      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:
      getUriBytes in interface FactOrBuilder
      Returns:
      The bytes for uri.
    • setUri

      public Fact.Builder setUri(String value)
       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

      public Fact.Builder clearUri()
       If present, this uri links to the source of the fact.
       
      optional string uri = 3;
      Returns:
      This builder for chaining.
    • setUriBytes

      public Fact.Builder setUriBytes(com.google.protobuf.ByteString value)
       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:
      hasSummary in interface FactOrBuilder
      Returns:
      Whether the summary field is set.
    • getSummary

      public String getSummary()
       If present, the summary/snippet of the fact.
       
      optional string summary = 4;
      Specified by:
      getSummary in interface FactOrBuilder
      Returns:
      The summary.
    • getSummaryBytes

      public com.google.protobuf.ByteString getSummaryBytes()
       If present, the summary/snippet of the fact.
       
      optional string summary = 4;
      Specified by:
      getSummaryBytes in interface FactOrBuilder
      Returns:
      The bytes for summary.
    • setSummary

      public Fact.Builder setSummary(String value)
       If present, the summary/snippet of the fact.
       
      optional string summary = 4;
      Parameters:
      value - The summary to set.
      Returns:
      This builder for chaining.
    • clearSummary

      public Fact.Builder clearSummary()
       If present, the summary/snippet of the fact.
       
      optional string summary = 4;
      Returns:
      This builder for chaining.
    • setSummaryBytes

      public Fact.Builder setSummaryBytes(com.google.protobuf.ByteString value)
       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 public boolean hasVectorDistance()
      Deprecated.
      google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See google/cloud/aiplatform/v1/vertex_rag_service.proto;l=313
       If present, the distance between the query vector and this fact vector.
       
      optional double vector_distance = 5 [deprecated = true];
      Specified by:
      hasVectorDistance in interface FactOrBuilder
      Returns:
      Whether the vectorDistance field is set.
    • getVectorDistance

      @Deprecated public double getVectorDistance()
      Deprecated.
      google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See google/cloud/aiplatform/v1/vertex_rag_service.proto;l=313
       If present, the distance between the query vector and this fact vector.
       
      optional double vector_distance = 5 [deprecated = true];
      Specified by:
      getVectorDistance in interface FactOrBuilder
      Returns:
      The vectorDistance.
    • setVectorDistance

      @Deprecated public Fact.Builder setVectorDistance(double value)
      Deprecated.
      google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See google/cloud/aiplatform/v1/vertex_rag_service.proto;l=313
       If 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 public Fact.Builder clearVectorDistance()
      Deprecated.
      google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See google/cloud/aiplatform/v1/vertex_rag_service.proto;l=313
       If 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:
      hasScore in interface FactOrBuilder
      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:
      getScore in interface FactOrBuilder
      Returns:
      The score.
    • setScore

      public Fact.Builder 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.
      
       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

      public Fact.Builder 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:
      hasChunk in interface FactOrBuilder
      Returns:
      Whether the chunk field is set.
    • getChunk

      public RagChunk getChunk()
       If present, chunk properties.
       
      optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;
      Specified by:
      getChunk in interface FactOrBuilder
      Returns:
      The chunk.
    • setChunk

      public Fact.Builder setChunk(RagChunk value)
       If present, chunk properties.
       
      optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;
    • setChunk

      public Fact.Builder setChunk(RagChunk.Builder builderForValue)
       If present, chunk properties.
       
      optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;
    • mergeChunk

      public Fact.Builder mergeChunk(RagChunk value)
       If present, chunk properties.
       
      optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;
    • clearChunk

      public Fact.Builder clearChunk()
       If present, chunk properties.
       
      optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;
    • getChunkBuilder

      public RagChunk.Builder getChunkBuilder()
       If present, chunk properties.
       
      optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;
    • getChunkOrBuilder

      public RagChunkOrBuilder getChunkOrBuilder()
       If present, chunk properties.
       
      optional .google.cloud.aiplatform.v1.RagChunk chunk = 7;
      Specified by:
      getChunkOrBuilder in interface FactOrBuilder