Info Type

(Autogenerated transcript)

 Another rich response which is available in the Dialogflow Messenger is the information response type, the info response type. It's a card type that is it has an image and a title and some information sort of like some other text below that. And it will also usually be able to, it's sort of like an active card in the sense that you can click on it and it will take you to another page. So you can see that there is a title, subtitle and then there is an image object which has a source that is the URL for the image and the URL is actually in another field called raw URL. And then you can also see that there is an action link which is the URL that it's going to navigate to when you click on it. So let's copy this. Go to our Dialogflow agent, add show info type and I'm just going to say show me info

 and once again delete that, add a custom payload, paste what you copied from over there. But remember that these are now going to be like inactive or incorrect URLs. So you, it will not just work just like that. So let's just change this to and as for the raw URL, I'm going to leave it as it is and just see what happens. I think it's not going to work properly. So let's try this. Now show me info should return this intent which it does and let's go to the WebStorm, return it, wait for it to load, show me info. So it did come back with the response and the title is fine, the subtitle is fine. Notice that the image is missing and also notice that when I have my cursor over it,

 it actually turns into something which is like a clickable object. So you click on it and you can see that it's actually going to just like we had provided the information. So this is the basic concept. I'm not going to go into too much detail into this. You can figure out how to add the URL for the image by yourself. It just has to be image to some known public URL which is accessible. You know if you were to type that URL into the browser, you should be able to see that image. You know that's the basic idea. So that's pretty much all there is to this particular type of response and what I'll also encourage you to do is just to see if you can remove certain elements to find out whether all of them are actually mandatory. So what I'm going to do now is let's see if I can delete the action link and if it still works as expected. Will it just show something or will it just error out completely?

 So let's open this and let's come with show me info and it's working and just you can see that instead of this card being active even when my cursor is over it, it doesn't turn into like a hyperlink or link-able thing. It just remains like a piece of information which is static. So you can see that it's possible to omit the action link. That's one thing and also you already know that this URL does not actually have to be, I mean even if it's pointing to some image which doesn't even exist anywhere on the internet, it seems to be just looking to see if that image format is okay. Now let's see if we remove the subtitle also. Let's see if that still works. So we remove the subtitle now. Let's go to this page and go there, show me info.

 Still works. So you have a title and there's this non-existent image and it still seems to work quite fine. Now what happens if I remove this image object entirely? So that's my next question. Will it still work? So all we are left with is the title and then the type, both of which, I would think that both of which are actually mandatory. So we save it, go back to WebStorm, open the page again and show me info. So it still works in fact. So in fact all that is needed it looks like is the title and that's it. You have to specify the type. So just for my curiosity I'm also going to remove the title and see if that works.

 I hope it doesn't because that means it will come back as a blank thing like which nobody can understand what's going on. So there it is. I have saved it. So now let's go to the page, show me info. Yeah see it did actually have some kind of weird behavior. It's pretty clear that it's not able to do something which can, it's not coming back with what you might see is a sensible response. So let's go back and add the title back into this. Let's save the title and save it. Let's try this now. There you go.

 So this is the bare minimum that you need. You need to have the type and which is info and you need to specify the title. So this is one of the things that I would encourage you to do which is to see which of these are mandatory requirements and which of these can be omitted because obviously you have to like hand write or hand code this information. So the less stuff you need to put in here the less chances that you will actually make a mistake. So if you can figure out like the bare minimum JSON object which is required for you to see the results that you want that will make things a lot easier for you. So let's go ahead and save that and that's it for the info response type.

About this website

BotFlo1 was created by Aravind Mohanoor as a website which provided training and tools for non-programmers who were2 building Dialogflow chatbots.

This website has now expanded into other topics in Natural Language Processing, including the recent Large Language Models (GPT etc.) with a special focus on helping non-programmers identify and use the right tool for their specific NLP task. 

For example, when not to use GPT

1 BotFlo was previously called MiningBusinessData. That is why you see that name in many videos

2 And still are building Dialogflow chatbots. Dialogflow ES first evolved into Dialogflow CX, and Dialogflow CX itself evolved to add Generative AI features in mid-2023