All Products
Search
Document Center

Intelligent Media Services:Data structure

Last Updated:Jun 17, 2026

The Android SDK uses the following enumerations and classes for AI-powered chat interactions.

Overview

Structure type

Data type

Description

Enum

ARTCAIChatEngineState

Engine state.

ARTCAIChatAgentState

Agent state.

ARTCAIChatMessageType

Message type.

ARTCAIChatMessageState

Agent message state.

ARTCAIChatErrorCode

Agent error code.

ARTCAIChatMessagePlayState

Chatbot agent message playback state.

Class

ARTCAIChatMessage

Message structure for a chat conversation.

ARTCAIChatAttachment

Attachment structure.

ARTCAIChatSendMessageRequest

Request object for sending a message.

ARTCAIChatMessageListRequest

Request object for querying message history.

ARTCAIChatUserInfo

User information.

ARTCAIChatAgentInfo

Agent information.

ARTCAIChatAuthToken

Authentication information.

ARTCAIChatTemplateConfig

Configuration parameters for chat conversations.

Data structure details

Enum

ARTCAIChatEngineState

Engine state.

Enum value

Description

Init

Unconnected.

Connecting

Connecting.

Connected

Connected.

Disconnected

Disconnected.

ConnectFailed

Connection failed.

ARTCAIChatAgentState

Agent state.

Enum value

Description

Listening

Listening.

Thinking

Thinking.

Replaying

Replying.

ARTCAIChatMessageType

Message type.

Enum value

Description

Text

Text message.

Voice

Voice message (push-to-talk).

ARTCAIChatMessageState

Agent message state.

Enum value

Description

Init

Initial state.

Transfering

Transferring (sending/receiving).

Printing

Printing (streaming response).

Interrupted

Interrupted.

Finished

Finished.

Failed

Failed.

ARTCAIChatErrorCode

Agent error code.

Enum value

Description

None

No error.

UnknownError

Unknown error.

InvalidEngineState

Invalid engine state.

InvalidParam

Invalid API parameter.

InvalidUserInfo

Invalid user information parameter.

InvalidAuthInfo

Invalid authentication information.

SendMessageFailed

Failed to send messages.

InterruptAgentFailed

Failed to interrupt the agent.

DeleteMessageFailed

Failed to delete message.

AgentNotFound

Agent not found.

ChatInternalError

Unknown error.

StartPlayMessageFailed

Failed to start message playback.

StopPlayMessageFailed

Failed to stop message playback.

VoiceMessageRecordFailed

Failed to record voice message.

VoiceMessageSendFailed

Failed to send voice message.

KickedOutBySystem

Kicked out by the system.

KickedByUserReplace

Kicked out due to login on another device with the same user ID.

AgentError

Error reported by the agent.

AttachmentNotAllUploadSuccess

Failed to upload one or more attachments.

ARTCAIChatMessagePlayState

Chatbot agent message playback state.

Enum value

Description

Init

Initial state.

Playing

Playing.

Stopped

Playback stopped.

Failed

Playback failed.

Class

ARTCAIChatMessage

Message structure for a chat conversation.

Parameter

Type

Description

dialogueId

String

Message ID.

requestId

String

Request ID for the conversation turn.

messageState

int

Message state.

messageType

String

Message type.

sendTime

long

Timestamp when the message was sent or received.

text

String

Message content.

senderId

String

Message sender.

isEnd

boolean

Whether the corresponding sentence has finished.

isDialogueEnd

boolean

Whether the agent has finished answering the current question. If a response consists of multiple sub-messages, isDialogueEnd=true marks the end of the complete answer.

reasoningText

String

Text generated during the agent's reasoning process. A non-empty value indicates the agent is in a thinking state.

isReasoningEnd

boolean

Whether the reasoning process has ended.

source

String

Message source:

  • chat: chatbot agent

  • call: A/V call agent

sourceType

String

Message type, which varies by scenario

  • Call scenario:

    • greeting: Welcome message

    • normal: Voice reply

    • speech: Proactive broadcast

  • Message conversation scenario:

    • normal: Text reply

    • announcement: Proactive message

    • custom: Custom message

nodeID

String

Node information for the message chunk.

extend

String

Custom extended information.

ARTCAIChatAttachment

Attachment structure.

Parameter

Type

Description

attachmentId

String

Attachment ID.

attachmentType

String

Attachment type: Image, Audio, Video, Other.

attachmentName

String

Attachment name.

path

String

Full file path of the attachment.

extra

String

Additional attachment information.

progress

float

Upload progress of the attachment, as a percentage (0.00-100.00).

ARTCAIChatSendMessageRequest

Request object for sending a message.

Parameter

Type

Description

requestId

String

Request ID.

messageType

ARTCAIChatMessageType

Message type. Can be Text or Voice (push-to-talk).

text

String

Message content.

ARTCAIChatMessageListRequest

Request object for querying message history.

Parameter

Type

Description

startTime

long

Start Unix timestamp (exclusive), in seconds.

endTime

long

End Unix timestamp (exclusive), in seconds.

pageNumber

int

Page number.

pageSize

int

Page size. Max: 100, Default: 20.

isDesc

boolean

Whether to sort results in descending order.

ARTCAIChatUserInfo

User information.

Parameter

Type

Description

userId

String

User ID.

deviceId

String

Device ID. Optional.

ARTCAIChatAgentInfo

Agent information.

Parameter

Type

Description

agentId

String

Agent ID.

region

String

The region where the agent service is located. Defaults to the China (Shanghai) region.

ARTCAIChatAuthToken

Authentication information.

Parameter

Type

Description

appId

String

Application ID for the interactive messaging application.

appSign

String

Application signature for the interactive messaging application.

token

String

Authentication token.

timestamp

long

Expiration timestamp.

role

String

User role. Set to "admin" to allow the user to call management APIs. Optional.

nonce

String

Max length of 64 bytes. Allowed characters: letters, digits, and underscores (_). Optional.

ARTCAIChatTemplateConfig

Configuration parameters for chat conversations.

Parameter

Type

Description

bailianAppParams

String

Parameters for the Alibaba Cloud Model Studio application.

agentVoiceId

String

Voice ID for the agent's speech. If left empty, the agent uses its default configured voice.