事件

user_message

{ type: "user_message", id, text, images }

队列中的一条消息刚刚进入对话。它出现在读取它的那一轮之前——正是在对话记录中显示这条消息的位置。

from queue()before the next turnSDK 0.5.4+
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

idstring

queue() 返回的 ID。

textstring

消息内容。

imagesnumber

随附的图片数量。

在它前后拆分回答

代理在此事件之前写下的内容回答的是上一条消息;之后的内容回答的是这一条。界面会结束当前回复、显示用户的消息,并在下方开启新的回复。