expect_text

expect_text(img_buf: Vec<u8>, user_info: String, step_data: String, resp_index: i32) -> String

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 user
  • user_info - Slack user information, Json string {open_id: "Slack User Id", tenant_key: "Slack Workspace Identity", "name": "User Name"}
  • step_data - The step data of the previous chat between the user and the bot
  • resp_index - expect_text or expect_image being called multiple times’ order index