Package com.tnsai.rag

Record Class ChunkContextGenerator.Request

java.lang.Object
java.lang.Record
com.tnsai.rag.ChunkContextGenerator.Request
Record Components:
model - generating model identifier
body - original chunk body
origin - human-readable source label
structuralPath - format-native path, possibly blank
startLine - 1-based start line
endLine - 1-based end line
documentId - stable chunk id
surrounding - bounded adjacent-chunk text, possibly blank
sourceName - canonical @Knowledge name
Enclosing interface:
ChunkContextGenerator

public static record ChunkContextGenerator.Request(String model, String body, String origin, String structuralPath, int startLine, int endLine, String documentId, String surrounding, String sourceName) extends Record
  • Constructor Details

    • Request

      public Request(String model, String body, String origin, String structuralPath, int startLine, int endLine, String documentId, String surrounding, String sourceName)
      Creates an instance of a Request record class.
      Parameters:
      model - the value for the model record component
      body - the value for the body record component
      origin - the value for the origin record component
      structuralPath - the value for the structuralPath record component
      startLine - the value for the startLine record component
      endLine - the value for the endLine record component
      documentId - the value for the documentId record component
      surrounding - the value for the surrounding record component
      sourceName - the value for the sourceName record component
    • Request

      public Request(String model, String body, String origin, String structuralPath, int startLine, int endLine, String documentId)
      Compatibility constructor without surrounding/source identity.
      Since:
      0.15.0
  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • model

      public String model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • body

      public String body()
      Returns the value of the body record component.
      Returns:
      the value of the body record component
    • origin

      public String origin()
      Returns the value of the origin record component.
      Returns:
      the value of the origin record component
    • structuralPath

      public String structuralPath()
      Returns the value of the structuralPath record component.
      Returns:
      the value of the structuralPath record component
    • startLine

      public int startLine()
      Returns the value of the startLine record component.
      Returns:
      the value of the startLine record component
    • endLine

      public int endLine()
      Returns the value of the endLine record component.
      Returns:
      the value of the endLine record component
    • documentId

      public String documentId()
      Returns the value of the documentId record component.
      Returns:
      the value of the documentId record component
    • surrounding

      public String surrounding()
      Returns the value of the surrounding record component.
      Returns:
      the value of the surrounding record component
    • sourceName

      public String sourceName()
      Returns the value of the sourceName record component.
      Returns:
      the value of the sourceName record component