Package com.tnsai.rag
Record Class RetrievedContextRenderer.Segment
java.lang.Object
java.lang.Record
com.tnsai.rag.RetrievedContextRenderer.Segment
- Record Components:
turn- the owner's DIRECT blocksresult- the owner's SEARCH evidence, ornullwhen nothing was searchedcontextWindow- maximum estimated tokens devoted to this owner's evidence
- Enclosing class:
RetrievedContextRenderer
public static record RetrievedContextRenderer.Segment(ChatKnowledgeContext.Turn turn, RetrievalResult result, int contextWindow)
extends Record
One chat owner's knowledge for a turn: its DIRECT blocks and its
SEARCH evidence, fitted to its own context window.
- Since:
- 0.18.4
-
Constructor Summary
ConstructorsConstructorDescriptionSegment(ChatKnowledgeContext.Turn turn, RetrievalResult result, int contextWindow) Rejects a missing turn. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecontextWindowrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.turn()Returns the value of theturnrecord component.
-
Constructor Details
-
Segment
Rejects a missing turn.
-
-
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 '=='. -
turn
Returns the value of theturnrecord component.- Returns:
- the value of the
turnrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
contextWindow
public int contextWindow()Returns the value of thecontextWindowrecord component.- Returns:
- the value of the
contextWindowrecord component
-