Package ai.nexconn.chat.message
Class StreamMessage
-
- All Implemented Interfaces:
public final class StreamMessage extends MessageContent
Stream message.
Inherits MessageContent. Used for streaming content such as AI-generated text. This message will store and count toward unread message count.
-
-
Field Summary
Fields Modifier and Type Field Description private Stringcontentprivate Stringtypeprivate BooleanisCompleteprivate IntegercompleteReasonprivate IntegerstopReasonprivate Booleansyncprivate StreamReferenceInforeferenceInfoprivate Stringextraprivate MentionedInfomentionedInfoprivate BooleanisDestructprivate LongdestructTime
-
Constructor Summary
Constructors Constructor Description StreamMessage()
-
Method Summary
Modifier and Type Method Description final StringgetContent()Aggregated stream text content. final UnitsetContent(String content)Aggregated stream text content. final StringgetType()Text format type. final UnitsetType(String type)Text format type. final BooleanisComplete()Whether generation is complete. final UnitsetComplete(Boolean isComplete)Whether generation is complete. final IntegergetCompleteReason()Business-side completion reason. final UnitsetCompleteReason(Integer completeReason)Business-side completion reason. final IntegergetStopReason()IM-side completion reason. final UnitsetStopReason(Integer stopReason)IM-side completion reason. final BooleangetSync()Whether the client has finished pulling the stream. final UnitsetSync(Boolean sync)Whether the client has finished pulling the stream. final StreamReferenceInfogetReferenceInfo()Reference message information. final UnitsetReferenceInfo(StreamReferenceInfo referenceInfo)Reference message information. StringtoString()-
Methods inherited from class ai.nexconn.chat.message.MessageContent
getDestructTime, getExtra, getMentionedInfo, isDestruct, setDestruct, setDestructTime, setExtra, setMentionedInfo -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getContent
final String getContent()
Aggregated stream text content.
-
setContent
final Unit setContent(String content)
Aggregated stream text content.
-
getType
final String getType()
Text format type.
-
isComplete
final Boolean isComplete()
Whether generation is complete.
-
setComplete
final Unit setComplete(Boolean isComplete)
Whether generation is complete.
-
getCompleteReason
final Integer getCompleteReason()
Business-side completion reason. 0 indicates normal.
-
setCompleteReason
final Unit setCompleteReason(Integer completeReason)
Business-side completion reason. 0 indicates normal.
-
getStopReason
final Integer getStopReason()
IM-side completion reason. 0 indicates normal.
-
setStopReason
final Unit setStopReason(Integer stopReason)
IM-side completion reason. 0 indicates normal.
-
getSync
final Boolean getSync()
Whether the client has finished pulling the stream.
-
getReferenceInfo
final StreamReferenceInfo getReferenceInfo()
Reference message information.
-
setReferenceInfo
final Unit setReferenceInfo(StreamReferenceInfo referenceInfo)
Reference message information.
-
toString
String toString()
-
-
-
-