简体   繁体   中英

IBM Watson Assistant: How can I send an image as chatbot response

I want to attach an image as IBM Watson Assistant response.

It must be placed in a public repository, but I want to know if it is possible to have it on IBM Cloud Object Storage because I have my images there.

If I could not make it possible. How can I send an image as response in watson assistant? I could not find anything in the documentation .

You can define image responses in Watson Assistant . This can be done either through the dialog builder or by using the JSON response editor. When using the dialog builder, there is a form for the image title, description and the URL .

To access an image on IBM Cloud Object Storage from within Watson Assistant and to display it, the image needs to be publicly accessible. You can either enable public access on the entire bucket or on individual storage objects . The first could be a security concern, the latter is more work.

The URL for the image would be composed of the public endpoint, the bucket and the image name, eg, https://s3.eu.cloud-object-storage.appdomain.cloud/your-bucket-name/this-is-the-image.png .

Here is how in my test it looks in the Try it out window with the image coming from my public IBM COS bucket:

Watson Assistant 显示图像响应

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM