Package com.axelor.ai.chat
Record Class ChatTurnPersistence.Prepared
java.lang.Object
java.lang.Record
com.axelor.ai.chat.ChatTurnPersistence.Prepared
- Enclosing class:
ChatTurnPersistence
public static record ChatTurnPersistence.Prepared(ChatRequest request, Turn turn, String resumedConsultCallId)
extends Record
Result of preparing a stream: a
Turn to thread through the frames plus a possibly
modified request (with history preloaded, the user message saved, or — for sub-agent resume —
an isolated child context). For top-level sub-agent resume resumedConsultCallId carries
the parent's consult_agent call id (read off the loaded turn) so the streamer can push
a child frame that re-attaches updates to the same tool without a DB lookup.-
Constructor Summary
ConstructorsConstructorDescriptionPrepared(ChatRequest request, Turn turn) Prepared(ChatRequest request, Turn turn, String resumedConsultCallId) Creates an instance of aPreparedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.request()Returns the value of therequestrecord component.Returns the value of theresumedConsultCallIdrecord component.final StringtoString()Returns a string representation of this record class.turn()Returns the value of theturnrecord component.
-
Constructor Details
-
Prepared
-
Prepared
Creates an instance of aPreparedrecord class.- Parameters:
request- the value for therequestrecord componentturn- the value for theturnrecord componentresumedConsultCallId- the value for theresumedConsultCallIdrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
request
Returns the value of therequestrecord component.- Returns:
- the value of the
requestrecord component
-
turn
Returns the value of theturnrecord component.- Returns:
- the value of the
turnrecord component
-
resumedConsultCallId
Returns the value of theresumedConsultCallIdrecord component.- Returns:
- the value of the
resumedConsultCallIdrecord component
-