Class ChunkEmbedding.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<ChunkEmbedding.Builder>
com.google.protobuf.GeneratedMessage.Builder<ChunkEmbedding.Builder>
ai.pipestream.data.v1.ChunkEmbedding.Builder
All Implemented Interfaces:
ChunkEmbeddingOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ChunkEmbedding

public static final class ChunkEmbedding.Builder extends com.google.protobuf.GeneratedMessage.Builder<ChunkEmbedding.Builder> implements ChunkEmbeddingOrBuilder
 Text content and vector embedding for a single chunk.
 
Protobuf type ai.pipestream.data.v1.ChunkEmbedding
  • 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<ChunkEmbedding.Builder>
    • clear

      public ChunkEmbedding.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<ChunkEmbedding.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<ChunkEmbedding.Builder>
    • getDefaultInstanceForType

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

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

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

      public ChunkEmbedding.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<ChunkEmbedding.Builder>
    • mergeFrom

      public ChunkEmbedding.Builder mergeFrom(ChunkEmbedding other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ChunkEmbedding.Builder>
    • mergeFrom

      public ChunkEmbedding.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<ChunkEmbedding.Builder>
      Throws:
      IOException
    • getTextContent

      public String getTextContent()
       Actual text content of the chunk.
       
      string text_content = 1;
      Specified by:
      getTextContent in interface ChunkEmbeddingOrBuilder
      Returns:
      The textContent.
    • getTextContentBytes

      public com.google.protobuf.ByteString getTextContentBytes()
       Actual text content of the chunk.
       
      string text_content = 1;
      Specified by:
      getTextContentBytes in interface ChunkEmbeddingOrBuilder
      Returns:
      The bytes for textContent.
    • setTextContent

      public ChunkEmbedding.Builder setTextContent(String value)
       Actual text content of the chunk.
       
      string text_content = 1;
      Parameters:
      value - The textContent to set.
      Returns:
      This builder for chaining.
    • clearTextContent

      public ChunkEmbedding.Builder clearTextContent()
       Actual text content of the chunk.
       
      string text_content = 1;
      Returns:
      This builder for chaining.
    • setTextContentBytes

      public ChunkEmbedding.Builder setTextContentBytes(com.google.protobuf.ByteString value)
       Actual text content of the chunk.
       
      string text_content = 1;
      Parameters:
      value - The bytes for textContent to set.
      Returns:
      This builder for chaining.
    • getVectorList

      public List<Float> getVectorList()
       Vector embedding for this chunk's text.
       
      repeated float vector = 2;
      Specified by:
      getVectorList in interface ChunkEmbeddingOrBuilder
      Returns:
      A list containing the vector.
    • getVectorCount

      public int getVectorCount()
       Vector embedding for this chunk's text.
       
      repeated float vector = 2;
      Specified by:
      getVectorCount in interface ChunkEmbeddingOrBuilder
      Returns:
      The count of vector.
    • getVector

      public float getVector(int index)
       Vector embedding for this chunk's text.
       
      repeated float vector = 2;
      Specified by:
      getVector in interface ChunkEmbeddingOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The vector at the given index.
    • setVector

      public ChunkEmbedding.Builder setVector(int index, float value)
       Vector embedding for this chunk's text.
       
      repeated float vector = 2;
      Parameters:
      index - The index to set the value at.
      value - The vector to set.
      Returns:
      This builder for chaining.
    • addVector

      public ChunkEmbedding.Builder addVector(float value)
       Vector embedding for this chunk's text.
       
      repeated float vector = 2;
      Parameters:
      value - The vector to add.
      Returns:
      This builder for chaining.
    • addAllVector

      public ChunkEmbedding.Builder addAllVector(Iterable<? extends Float> values)
       Vector embedding for this chunk's text.
       
      repeated float vector = 2;
      Parameters:
      values - The vector to add.
      Returns:
      This builder for chaining.
    • clearVector

      public ChunkEmbedding.Builder clearVector()
       Vector embedding for this chunk's text.
       
      repeated float vector = 2;
      Returns:
      This builder for chaining.
    • hasChunkId

      public boolean hasChunkId()
       Unique identifier for this chunk.
       
      optional string chunk_id = 3;
      Specified by:
      hasChunkId in interface ChunkEmbeddingOrBuilder
      Returns:
      Whether the chunkId field is set.
    • getChunkId

      public String getChunkId()
       Unique identifier for this chunk.
       
      optional string chunk_id = 3;
      Specified by:
      getChunkId in interface ChunkEmbeddingOrBuilder
      Returns:
      The chunkId.
    • getChunkIdBytes

      public com.google.protobuf.ByteString getChunkIdBytes()
       Unique identifier for this chunk.
       
      optional string chunk_id = 3;
      Specified by:
      getChunkIdBytes in interface ChunkEmbeddingOrBuilder
      Returns:
      The bytes for chunkId.
    • setChunkId

      public ChunkEmbedding.Builder setChunkId(String value)
       Unique identifier for this chunk.
       
      optional string chunk_id = 3;
      Parameters:
      value - The chunkId to set.
      Returns:
      This builder for chaining.
    • clearChunkId

      public ChunkEmbedding.Builder clearChunkId()
       Unique identifier for this chunk.
       
      optional string chunk_id = 3;
      Returns:
      This builder for chaining.
    • setChunkIdBytes

      public ChunkEmbedding.Builder setChunkIdBytes(com.google.protobuf.ByteString value)
       Unique identifier for this chunk.
       
      optional string chunk_id = 3;
      Parameters:
      value - The bytes for chunkId to set.
      Returns:
      This builder for chaining.
    • hasOriginalCharStartOffset

      public boolean hasOriginalCharStartOffset()
       Character offset where chunk starts in original document.
       
      optional int32 original_char_start_offset = 4;
      Specified by:
      hasOriginalCharStartOffset in interface ChunkEmbeddingOrBuilder
      Returns:
      Whether the originalCharStartOffset field is set.
    • getOriginalCharStartOffset

      public int getOriginalCharStartOffset()
       Character offset where chunk starts in original document.
       
      optional int32 original_char_start_offset = 4;
      Specified by:
      getOriginalCharStartOffset in interface ChunkEmbeddingOrBuilder
      Returns:
      The originalCharStartOffset.
    • setOriginalCharStartOffset

      public ChunkEmbedding.Builder setOriginalCharStartOffset(int value)
       Character offset where chunk starts in original document.
       
      optional int32 original_char_start_offset = 4;
      Parameters:
      value - The originalCharStartOffset to set.
      Returns:
      This builder for chaining.
    • clearOriginalCharStartOffset

      public ChunkEmbedding.Builder clearOriginalCharStartOffset()
       Character offset where chunk starts in original document.
       
      optional int32 original_char_start_offset = 4;
      Returns:
      This builder for chaining.
    • hasOriginalCharEndOffset

      public boolean hasOriginalCharEndOffset()
       Character offset where chunk ends in original document.
       
      optional int32 original_char_end_offset = 5;
      Specified by:
      hasOriginalCharEndOffset in interface ChunkEmbeddingOrBuilder
      Returns:
      Whether the originalCharEndOffset field is set.
    • getOriginalCharEndOffset

      public int getOriginalCharEndOffset()
       Character offset where chunk ends in original document.
       
      optional int32 original_char_end_offset = 5;
      Specified by:
      getOriginalCharEndOffset in interface ChunkEmbeddingOrBuilder
      Returns:
      The originalCharEndOffset.
    • setOriginalCharEndOffset

      public ChunkEmbedding.Builder setOriginalCharEndOffset(int value)
       Character offset where chunk ends in original document.
       
      optional int32 original_char_end_offset = 5;
      Parameters:
      value - The originalCharEndOffset to set.
      Returns:
      This builder for chaining.
    • clearOriginalCharEndOffset

      public ChunkEmbedding.Builder clearOriginalCharEndOffset()
       Character offset where chunk ends in original document.
       
      optional int32 original_char_end_offset = 5;
      Returns:
      This builder for chaining.
    • hasChunkGroupId

      public boolean hasChunkGroupId()
       Identifier for a group of related chunks.
       
      optional string chunk_group_id = 6;
      Specified by:
      hasChunkGroupId in interface ChunkEmbeddingOrBuilder
      Returns:
      Whether the chunkGroupId field is set.
    • getChunkGroupId

      public String getChunkGroupId()
       Identifier for a group of related chunks.
       
      optional string chunk_group_id = 6;
      Specified by:
      getChunkGroupId in interface ChunkEmbeddingOrBuilder
      Returns:
      The chunkGroupId.
    • getChunkGroupIdBytes

      public com.google.protobuf.ByteString getChunkGroupIdBytes()
       Identifier for a group of related chunks.
       
      optional string chunk_group_id = 6;
      Specified by:
      getChunkGroupIdBytes in interface ChunkEmbeddingOrBuilder
      Returns:
      The bytes for chunkGroupId.
    • setChunkGroupId

      public ChunkEmbedding.Builder setChunkGroupId(String value)
       Identifier for a group of related chunks.
       
      optional string chunk_group_id = 6;
      Parameters:
      value - The chunkGroupId to set.
      Returns:
      This builder for chaining.
    • clearChunkGroupId

      public ChunkEmbedding.Builder clearChunkGroupId()
       Identifier for a group of related chunks.
       
      optional string chunk_group_id = 6;
      Returns:
      This builder for chaining.
    • setChunkGroupIdBytes

      public ChunkEmbedding.Builder setChunkGroupIdBytes(com.google.protobuf.ByteString value)
       Identifier for a group of related chunks.
       
      optional string chunk_group_id = 6;
      Parameters:
      value - The bytes for chunkGroupId to set.
      Returns:
      This builder for chaining.
    • hasChunkConfigId

      public boolean hasChunkConfigId()
       Identifier for the chunking configuration used.
       
      optional string chunk_config_id = 7;
      Specified by:
      hasChunkConfigId in interface ChunkEmbeddingOrBuilder
      Returns:
      Whether the chunkConfigId field is set.
    • getChunkConfigId

      public String getChunkConfigId()
       Identifier for the chunking configuration used.
       
      optional string chunk_config_id = 7;
      Specified by:
      getChunkConfigId in interface ChunkEmbeddingOrBuilder
      Returns:
      The chunkConfigId.
    • getChunkConfigIdBytes

      public com.google.protobuf.ByteString getChunkConfigIdBytes()
       Identifier for the chunking configuration used.
       
      optional string chunk_config_id = 7;
      Specified by:
      getChunkConfigIdBytes in interface ChunkEmbeddingOrBuilder
      Returns:
      The bytes for chunkConfigId.
    • setChunkConfigId

      public ChunkEmbedding.Builder setChunkConfigId(String value)
       Identifier for the chunking configuration used.
       
      optional string chunk_config_id = 7;
      Parameters:
      value - The chunkConfigId to set.
      Returns:
      This builder for chaining.
    • clearChunkConfigId

      public ChunkEmbedding.Builder clearChunkConfigId()
       Identifier for the chunking configuration used.
       
      optional string chunk_config_id = 7;
      Returns:
      This builder for chaining.
    • setChunkConfigIdBytes

      public ChunkEmbedding.Builder setChunkConfigIdBytes(com.google.protobuf.ByteString value)
       Identifier for the chunking configuration used.
       
      optional string chunk_config_id = 7;
      Parameters:
      value - The bytes for chunkConfigId to set.
      Returns:
      This builder for chaining.