Package com.tnsai.rag.files
Record Class RecordParser.ParsedRecord
java.lang.Object
java.lang.Record
com.tnsai.rag.files.RecordParser.ParsedRecord
- Record Components:
timestamp- the time it was written,yyyy-MM-dd HH:mm:sslevel- the log level; empty in a historyepisodeState- the episode state it was written inconversationField- the conversation field as written; empty on a line without itwriter- the logger name in a log; in a history the agent's name, or empty when the line does not start with itmessage- what follows the writer
- Enclosing class:
RecordParser
public static record RecordParser.ParsedRecord(String timestamp, Optional<String> level, String episodeState, Optional<String> conversationField, String writer, String message)
extends Record
The first line of a record.
- Since:
- 0.18.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconversationFieldrecord component.The conversation the line belongs to.Returns the value of theepisodeStaterecord component.final booleanIndicates whether some other object is "equal to" this one.booleanWhether the line carries the conversation field, as every line written withAgentRecordFormat's patterns does.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.message()Returns the value of themessagerecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.writer()Returns the value of thewriterrecord component.
-
Constructor Details
-
Method Details
-
hasConversationField
public boolean hasConversationField()Whether the line carries the conversation field, as every line written withAgentRecordFormat's patterns does.- Returns:
truewhen the field is present
-
conversationId
The conversation the line belongs to.- Returns:
- the id; empty when the field is absent, blank or "-"
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
episodeState
Returns the value of theepisodeStaterecord component.- Returns:
- the value of the
episodeStaterecord component
-
conversationField
Returns the value of theconversationFieldrecord component.- Returns:
- the value of the
conversationFieldrecord component
-
writer
Returns the value of thewriterrecord component.- Returns:
- the value of the
writerrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-