All Products
Search
Document Center

Intelligent Media Services:Data structure

Last Updated:Dec 09, 2025

This topic provides an overview of the data types used in the iOS SDK.

Overview

Structure type

Data type

Description

Enum

ARTCAIChatEngineState

Agent connection state.

ARTCAIChatAgentResponseState

Agent response state.

ARTCAIChatMessageState

Agent message state.

ARTCAIChatMessageType

Message type.

ARTCAIChatMessagePlayState

Message playback state.

Class

ARTCAIChatUserInfo

User information.

ARTCAIChatAgentInfo

Agent information.

ARTCAIChatAuthToken

Authentication information obejct.

ARTCAIChatTemplateConfig

TemplateConfig parameters for message conversations.

ARTCAIChatAgentShareConfig

Shared configuration for the agent.

ARTCAIChatMessage

Definition of an agent message.

ARTCAIChatSendMessageRequest

Send message request object.

ARTCAIChatMessageListRequest

Message list request object.

Data structure details

Enum

ARTCAIChatEngineState

Agent connection state.

Enum value

Value

Description

Init

0

Unconnected.

Connecting

1

Connecting.

Connected

2

Connected.

Disconnect

3

Disconnected.

ARTCAIChatAgentResponseState

Agent response state.

Enum value

Value

Description

Listening

1

Listening.

Thinking

2

Thinking.

Replying

3

Replying.

ARTCAIChatMessageState

Agent message state.

Enum value

Value

Description

Init

1

Initial state.

Transfering

2

Transferring (sending/receiving).

Printing

3

Printing (streaming response).

Interrupted

4

Interrupted.

Finished

5

Finished.

Failed

6

Failed.

ARTCAIChatMessageType

Message type.

Enum value

Value

Description

Text

0

Text message.

Voice

1

Voice message (push-to-talk).

ARTCAIChatMessagePlayState

Message playback state.

Enum value

Value

Description

Init

0

Initial state.

Playing

1

Playing.

Stopped

2

Playback stopped.

Failed

3

Playback failed.

Class

ARTCAIChatUserInfo

User information object.

Property name

Type

Description

userId

String

The user ID.

deviceId

String?

The device ID.

ARTCAIChatAgentInfo

Agent information object.

Property name

Type

Description

agentId

String

The agent ID.

region

String

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

ARTCAIChatAuthToken

Authentication information obejct.

Property name

Type

Description

appId

String

Application ID.

appSign

String

Application signature.

token

String

Authentication token.

timestamp

Int

Expiration timestamp.

role

String?

Role. If "admin", the user can call management APIs.

nonce

String?

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

ARTCAIChatTemplateConfig

TemplateConfig parameters for a message conversation.

Property name

Type

Description

bailianAppParams

[String: Any]?

Alibaba Cloud Model Studio application center parameters.

agentVoiceId

String?

Voice ID for the agent's speech. If empty, the agent's default configured voice is used.

ARTCAIChatAgentShareConfig

Shared configuration for the agent.

Property name

Type

Description

shareId

String?

Agent share ID.

expireTime

Date?

Expiration time.

region

String?

Service region.

ARTCAIChatMessage

Definition of an agent message.

Property name

Type

Description

dialogueId

String

Message ID.

isDialogueEnd

Bool

Indicates if the current dialogue turn has finished.

nodeId

String?

For a sub-message, this is its Node ID.

requestId

String

Conversation turn ID.

messageState

ARTCAIChatMessageState

Message state.

messageType

ARTCAIChatMessageType

Message type.

text

String

Original text content.

isEnd

Bool

Indicates if the current message has finished.

senderId

String?

Sender's identifier: user or agent.

sendTime

TimeInterval

Message send time.

source

String?

Message source: "chat" (chatbot) or "call" (A/V call agent).

sourceType

String?

Message type, which varies by scenario.

A/V call: greeting / normal / speech

Message conversation: normal / announcement / custom

reasoningText

String?

Content generated during the reasoning process.

isReasoningEnd

Bool

Indicates if the reasoning process has ended.

attachmentList

[ARTCAIChatAttachment]?

List of attachments.

extend

String?

User-defined extended information.

ARTCAIChatSendMessageRequest

Send message request object.

Property name

Type

Description

requestId

String

Request ID.

messageType

ARTCAIChatMessageType

Message type.

text

String

Raw text content. Cannot be nil if messageType is Text.

attachmentUploader

ARTCAIChatAttachmentUploader?

Attachment uploader.

ARTCAIChatMessageListRequest

Message list request object.

Property name

Type

Description

startTime

TimeInterval

Start Unix timestamp (exclusive), in seconds.

endTime

TimeInterval

End Unix timestamp (inclusive), in seconds

pageNumber

Int

The page number.

pageSize

Int

Page size. Max: 100, Default: 20.

isDesc

Bool

Whether to sort in descending order. Default is true.