Package com.tnsai.channels.model
Record Class ResponseHints
java.lang.Object
java.lang.Record
com.tnsai.channels.model.ResponseHints
- Record Components:
streaming- request token-by-token delivery if the channel supports itshowTyping- send a typing indicator before the responsesplitLongMessages- automatically split text exceeding channel's max lengthreplyToMessageId- native message id to reply to (null for standalone messages)
public record ResponseHints(boolean streaming, boolean showTyping, boolean splitLongMessages, String replyToMessageId)
extends Record
Hints for how the channel adapter should deliver a response.
-
Constructor Summary
ConstructorsConstructorDescriptionResponseHints(boolean streaming, boolean showTyping, boolean splitLongMessages, String replyToMessageId) Creates an instance of aResponseHintsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResponseHintsdefaults()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ResponseHintsReturns the value of thereplyToMessageIdrecord component.booleanReturns the value of theshowTypingrecord component.booleanReturns the value of thesplitLongMessagesrecord component.booleanReturns the value of thestreamingrecord component.final StringtoString()Returns a string representation of this record class.static ResponseHints
-
Constructor Details
-
ResponseHints
public ResponseHints(boolean streaming, boolean showTyping, boolean splitLongMessages, String replyToMessageId) Creates an instance of aResponseHintsrecord class.- Parameters:
streaming- the value for thestreamingrecord componentshowTyping- the value for theshowTypingrecord componentsplitLongMessages- the value for thesplitLongMessagesrecord componentreplyToMessageId- the value for thereplyToMessageIdrecord component
-
-
Method Details
-
defaults
-
withStreaming
-
replyTo
-
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 '=='. -
streaming
public boolean streaming()Returns the value of thestreamingrecord component.- Returns:
- the value of the
streamingrecord component
-
showTyping
public boolean showTyping()Returns the value of theshowTypingrecord component.- Returns:
- the value of the
showTypingrecord component
-
splitLongMessages
public boolean splitLongMessages()Returns the value of thesplitLongMessagesrecord component.- Returns:
- the value of the
splitLongMessagesrecord component
-
replyToMessageId
Returns the value of thereplyToMessageIdrecord component.- Returns:
- the value of the
replyToMessageIdrecord component
-