StreamMessage

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.

Constructors

Link copied to clipboard

Properties

Link copied to clipboard
private Integer completeReason

Business-side completion reason. 0 indicates normal.

Link copied to clipboard
private String content

Aggregated stream text content.

Link copied to clipboard
private Boolean isComplete

Whether generation is complete.

Link copied to clipboard

Reference message information.

Link copied to clipboard
private Integer stopReason

IM-side completion reason. 0 indicates normal.

Link copied to clipboard
private Boolean sync

Whether the client has finished pulling the stream.

Link copied to clipboard
private String type

Text format type.

Inherited properties

Link copied to clipboard
private Long destructTime

Auto-destruct duration in seconds after the message is read.

Link copied to clipboard
private String extra

Extra data attached to the message content (sent along with the message, synced remotely).

Link copied to clipboard
private Boolean isDestruct

Whether this is a burn-after-reading message.

Link copied to clipboard

Mention (@) info.

Functions

Link copied to clipboard
public final Integer getCompleteReason()

Business-side completion reason. 0 indicates normal.

Link copied to clipboard
public final String getContent()

Aggregated stream text content.

Link copied to clipboard

Reference message information.

Link copied to clipboard
public final Integer getStopReason()

IM-side completion reason. 0 indicates normal.

Link copied to clipboard
public final Boolean getSync()

Whether the client has finished pulling the stream.

Link copied to clipboard
public final String getType()

Text format type.

Link copied to clipboard
public final Boolean isComplete()

Whether generation is complete.

Link copied to clipboard
public final Unit setComplete(Boolean isComplete)

Whether generation is complete.

Link copied to clipboard
public final Unit setCompleteReason(Integer completeReason)

Business-side completion reason. 0 indicates normal.

Link copied to clipboard
public final Unit setContent(String content)

Aggregated stream text content.

Link copied to clipboard
public final Unit setReferenceInfo(StreamReferenceInfo referenceInfo)

Reference message information.

Link copied to clipboard
public final Unit setStopReason(Integer stopReason)

IM-side completion reason. 0 indicates normal.

Link copied to clipboard
public final Unit setSync(Boolean sync)

Whether the client has finished pulling the stream.

Link copied to clipboard
public final Unit setType(String type)

Text format type.

Link copied to clipboard
public String toString()

Inherited functions

Link copied to clipboard
public final Long getDestructTime()

Auto-destruct duration in seconds after the message is read.

Link copied to clipboard
public final String getExtra()

Extra data attached to the message content (sent along with the message, synced remotely).

Link copied to clipboard

Mention (@) info.

Link copied to clipboard
public final Boolean isDestruct()

Whether this is a burn-after-reading message.

Link copied to clipboard
public final Unit setDestruct(Boolean isDestruct)

Whether this is a burn-after-reading message.

Link copied to clipboard
public final Unit setDestructTime(Long destructTime)

Auto-destruct duration in seconds after the message is read.

Link copied to clipboard
public final Unit setExtra(String extra)

Extra data attached to the message content (sent along with the message, synced remotely).

Link copied to clipboard
public final Unit setMentionedInfo(MentionedInfo mentionedInfo)

Mention (@) info.