Package com.tnsai.rag
Record Class ChunkContextGenerator.Request
java.lang.Object
java.lang.Record
com.tnsai.rag.ChunkContextGenerator.Request
- Record Components:
model- generating model identifierbody- original chunk bodyorigin- human-readable source labelstructuralPath- format-native path, possibly blankstartLine- 1-based start lineendLine- 1-based end linedocumentId- stable chunk idsurrounding- bounded adjacent-chunk text, possibly blanksourceName- canonical@Knowledgename
- Enclosing interface:
ChunkContextGenerator
-
Constructor Summary
ConstructorsConstructorDescriptionRequest(String model, String body, String origin, String structuralPath, int startLine, int endLine, String documentId) Compatibility constructor without surrounding/source identity.Request(String model, String body, String origin, String structuralPath, int startLine, int endLine, String documentId, String surrounding, String sourceName) Creates an instance of aRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.Returns the value of thedocumentIdrecord component.intendLine()Returns the value of theendLinerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.origin()Returns the value of theoriginrecord component.Returns the value of thesourceNamerecord component.intReturns the value of thestartLinerecord component.Returns the value of thestructuralPathrecord component.Returns the value of thesurroundingrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aRequestrecord class.- Parameters:
model- the value for themodelrecord componentbody- the value for thebodyrecord componentorigin- the value for theoriginrecord componentstructuralPath- the value for thestructuralPathrecord componentstartLine- the value for thestartLinerecord componentendLine- the value for theendLinerecord componentdocumentId- the value for thedocumentIdrecord componentsurrounding- the value for thesurroundingrecord componentsourceName- the value for thesourceNamerecord 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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
structuralPath
Returns the value of thestructuralPathrecord component.- Returns:
- the value of the
structuralPathrecord component
-
startLine
public int startLine()Returns the value of thestartLinerecord component.- Returns:
- the value of the
startLinerecord component
-
endLine
public int endLine()Returns the value of theendLinerecord component.- Returns:
- the value of the
endLinerecord component
-
documentId
Returns the value of thedocumentIdrecord component.- Returns:
- the value of the
documentIdrecord component
-
surrounding
Returns the value of thesurroundingrecord component.- Returns:
- the value of the
surroundingrecord component
-
sourceName
Returns the value of thesourceNamerecord component.- Returns:
- the value of the
sourceNamerecord component
-