I tried your approach but still no luck. In Rasa x, I am not able to see the image. This is how I am using the code:
for article in resp["articles"]:
dispatcher.utter_message(image="https://miro.medium.com/max/4500/1*6azAYcduaPk8alIjkB53rg.jpeg")
dispatcher.utter_message(text=article["description"])
hey @kshitiz12345, I checked the above code and it didn’t worked for me too in Rasa X but it’s able to show me the image reponse when I test it in the postman and it’s rendering the image If I send it from domain.yml file:
@erohmensing, is there any problem for rendering images in Rasa X if we send the image from custom actions since it works if we send the images registered in domain.yml?
@JiteshGaikwad I’m not sure. It might be that the response format is coming strangely from the rasachat connector. Can you post the ouput you’re seeing in Rasa X?
Also , What if I have an image on in a seperate folder, inside data. How will I retutn that image?
I’m using ngrok, to host via localhost and using telegram.
My try was :
> dispatcher.utter_message(image="/p38.png")
raise BadRequest(message)
telegram.error.BadRequest: Url host is empty
2020-04-18 14:05:32 ERROR rasa.core.channels.telegram - Exception when trying to handle message.Url host is empty
Anyone solved this.
I try this: dispatcher.utter_message(image = "https://i.imgur.com/nGF1K8f.jpg")
but nothing display on Rasa X.
This is my version:
rasa 1.10.10
rasa-sdk 1.10.2
rasa-x 0.31.4
Found this thread searching for a solution for that issue and even if it is probably outdated by now I found a fix for this issue.
Apparently you cannot respond with only an image. You have to respond with text and image in the same dispatch namely
dispatcher.utter_message(
text="Look at that baby tiger !",
image = "https://i.imgur.com/nGF1K8f.jpg"
)