expect_image
expect_image(img_buf: Vec<u8>, user_info: String, step_data: String, resp_index: i32) -> Vec<u8>
When the bot needs to call Wasm's functions multiple times in a reply to the user, except for the first call to text_received
or image_received
,it will then decide whether to call expect_text
or expect_image
based on the return information of the first call.
Parameters
img_buf
- The binary string of the original picture sent by the useruser_info
- Slack user information, Json string{open_id: "Slack User Id", tenant_key: "Slack Workspace Identity", "name": "User Name"}
step_data
- Thestep
data of the previous chat between the user and the botresp_index
-expect_text
orexpect_image
being called multiple times’ order index