Package com.tnsai.events
Record Class ThoughtEvent
java.lang.Object
java.lang.Record
com.tnsai.events.ThoughtEvent
- Record Components:
eventId- unique identifier for this eventtimestamp- when the event occurredcontent- the thought content/reasoning textstep- optional step name/number in the reasoning chain
- All Implemented Interfaces:
TnsAIEvent
public record ThoughtEvent(String eventId, Instant timestamp, String content, String step)
extends Record
implements TnsAIEvent
Event representing an agent's internal reasoning or thinking process.
ThoughtEvent captures the agent's chain-of-thought reasoning, which can be displayed to users for transparency or used for debugging.
Example thoughts:
- "I need to search for information about this topic"
- "The user seems to want a detailed explanation"
- "I should verify this data before presenting it"
-
Constructor Summary
ConstructorsConstructorDescriptionThoughtEvent(String eventId, Instant timestamp, String content, String step) Creates an instance of aThoughtEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.eventId()Returns the value of theeventIdrecord component.final inthashCode()Returns a hash code value for this object.static ThoughtEventCreates a thought event with current timestamp and auto-generated ID.static ThoughtEventCreates a thought event with a step identifier.step()Returns the value of thesteprecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface com.tnsai.events.TnsAIEvent
eventType
-
Constructor Details
-
Method Details
-
of
Creates a thought event with current timestamp and auto-generated ID.- Parameters:
content- the thought content- Returns:
- new ThoughtEvent
-
of
Creates a thought event with a step identifier.- Parameters:
content- the thought contentstep- the reasoning step name- Returns:
- new ThoughtEvent
-
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). -
eventId
Returns the value of theeventIdrecord component.- Specified by:
eventIdin interfaceTnsAIEvent- Returns:
- the value of the
eventIdrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceTnsAIEvent- Returns:
- the value of the
timestamprecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
step
Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-