image_received

image_received(img_buf: Vec<u8>, image_key: String, user_info: String, step_data: String) -> String

When the user sends an image message to the bot, the Host will call Wasm's image_received function, parse the return value, and return the result to the user.

Parameters

  • img_buf - The binary string of the original picture sent by the user
  • image_key - Feishu image_key corresponding to the picture sent by the user, which can be stored in the step information for subsequent use in a multi-step session
  • 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