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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamMessage()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getContent() Aggregated stream text content.
      final Unit setContent(String content) Aggregated stream text content.
      final String getType() Text format type.
      final Unit setType(String type) Text format type.
      final Boolean isComplete() Whether generation is complete.
      final Unit setComplete(Boolean isComplete) Whether generation is complete.
      final Integer getCompleteReason() Business-side completion reason.
      final Unit setCompleteReason(Integer completeReason) Business-side completion reason.
      final Integer getStopReason() IM-side completion reason.
      final Unit setStopReason(Integer stopReason) IM-side completion reason.
      final Boolean getSync() Whether the client has finished pulling the stream.
      final Unit setSync(Boolean sync) Whether the client has finished pulling the stream.
      final StreamReferenceInfo getReferenceInfo() Reference message information.
      final Unit setReferenceInfo(StreamReferenceInfo referenceInfo) Reference message information.
      String toString()
      • 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
    • Constructor Detail

      • StreamMessage

        StreamMessage()
    • 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.

      • setType

         final Unit setType(String type)

        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.

      • setSync

         final Unit setSync(Boolean sync)

        Whether the client has finished pulling the stream.