ListAIAgentDialogues

更新时间:
复制 MD 格式

Returns the session history.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:ListAIAgentDialogues

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

SessionId

string

Yes

The session ID.

f27f9b9be28642a88e18****

RoundLimit

string

No

The number of most recent dialogue rounds to return. This value must be a positive integer. This parameter is mutually exclusive with pagination parameters; if specified, it overrides them.

5

StartTime

integer

Yes

The start Unix timestamp (inclusive), in milliseconds.

0

EndTime

integer

Yes

The end Unix timestamp (inclusive), in milliseconds.

17358082464030

PageNumber

integer

No

The page number. Default value: 1.

1

PageSize

integer

No

The number of items per page. Maximum value: 100. Default value: 20.

20

Order

string

No

The sort order. Valid values: ASC (ascending) and DESC (descending). Default value: DESC.

DESC

Response elements

Element

Type

Description

Example

object

Response schema

RequestId

string

The request ID.

7B117AF5-***************

Dialogues

array<object>

A list of dialogues.

array<object>

DialogueId

string

The unique ID of the dialogue.

19de81b3b3d94abda22****

RoundId

string

The ID of the dialogue round.

f27f9b9be28642a88e18****

Producer

string

The producer of this message.

  • user: A message from the user.

  • agent: A message from the agent.

Valid values:

  • agent :

    agent

  • user :

    user

user

Text

string

The text content of the dialogue entry.

你好

ReasoningText

string

The agent's reasoning text, which can reveal its thought process.

我在思考

AttachedFileList

array<object>

A list of file attachments referenced in the dialogue.

object

Url

string

The URL of the attachment.

https://media.w3.org/2010/05/sintel/trailer.mp3

Id

string

The unique identifier of the attachment.

7B117AF5-***************

Format

string

The format of the attachment, such as mp3, wav, or pdf.

mp3

Type

integer

The attachment type, represented by a numeric value. The meaning of this value is defined by your business logic.

1

Name

string

The file name of the attachment.

MusicDemix

Time

integer

The Unix timestamp (in milliseconds) when the dialogue entry was created.

1734511087000

Type

string

The type of the message. Valid values include:

For a call:

  1. greeting: A welcome message.

  2. normal: A standard voice response.

  3. speech: A proactive voice broadcast.

For a chat:

  1. normal: A standard text response.

  2. announcement: A proactive text push.

  3. custom: A custom message.

announcement

Source

string

The source channel of the message. Valid values:

chat: The message is from a text chat.

call: The message is from a voice call.

chat

NodeId

string

The ID of the workflow node that generated the dialogue entry, which you can use for tracing.

e01-cn-to345ikn62o

Extend

string

A JSON-formatted string for extended information. Use this field to store custom data, such as sentiment labels or intent recognition results.

{\"addTransferLock\":true}

Examples

Success response

JSON format

{
  "RequestId": "7B117AF5-***************",
  "Dialogues": [
    {
      "DialogueId": "19de81b3b3d94abda22****",
      "RoundId": "f27f9b9be28642a88e18****",
      "Producer": "user",
      "Text": "你好",
      "ReasoningText": "我在思考",
      "AttachedFileList": [
        {
          "Url": "https://media.w3.org/2010/05/sintel/trailer.mp3",
          "Id": "7B117AF5-***************\n",
          "Format": "mp3",
          "Type": 1,
          "Name": "MusicDemix"
        }
      ],
      "Time": 1734511087000,
      "Type": "announcement",
      "Source": "chat",
      "NodeId": "e01-cn-to345ikn62o",
      "Extend": "{\\\"addTransferLock\\\":true}"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.