Record Class PromptLayerBoundaries

java.lang.Object
java.lang.Record
com.agentforge4j.llm.api.PromptLayerBoundaries

public record PromptLayerBoundaries(Integer layer1EndOffset, Integer layer2EndOffset, Integer layer3EndOffset) extends Record
Byte offsets marking the end of each prompt layer in an assembled provider request body.

Layers are ordered most-stable-first: layer 1 is the most stable prefix, layer 2 follows layer 1, and layer 3 follows layer 2. Each component is the cumulative byte offset at the end of that layer in the assembled prompt (exclusive end index in the UTF-8 byte sequence). A null component means that layer is not present in the assembled prompt.

  • Constructor Details

    • PromptLayerBoundaries

      public PromptLayerBoundaries(Integer layer1EndOffset, Integer layer2EndOffset, Integer layer3EndOffset)
      Creates an instance of a PromptLayerBoundaries record class.
      Parameters:
      layer1EndOffset - the value for the layer1EndOffset record component
      layer2EndOffset - the value for the layer2EndOffset record component
      layer3EndOffset - the value for the layer3EndOffset record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • layer1EndOffset

      public Integer layer1EndOffset()
      Returns the value of the layer1EndOffset record component.
      Returns:
      the value of the layer1EndOffset record component
    • layer2EndOffset

      public Integer layer2EndOffset()
      Returns the value of the layer2EndOffset record component.
      Returns:
      the value of the layer2EndOffset record component
    • layer3EndOffset

      public Integer layer3EndOffset()
      Returns the value of the layer3EndOffset record component.
      Returns:
      the value of the layer3EndOffset record component