Can you create a fully custom entity in google Dialogflow? - dialogflow-es

I have a python telegram bot which I want to integrate with dialogflow. The python script outputs financial data for a given stock ticker. Can dialogflow recognize stock tickers? It does't show up in the built in entities.

You can create custom entities: https://cloud.google.com/dialogflow/es/docs/entities-custom.
I think you can recognize the stock tickers using regexp:
https://cloud.google.com/dialogflow/es/docs/entities-regexp

Related

Dialogflow - Business Hours if open or closed

I am trying to set the bot to where it will tell users if the business is opened or closed if asked the questions in the intent.
I have training phrases such as: "when do you close, are you open tomorrow, what time do you open tomorrow morning, are you open now, what are your business hours."
I was thinking that there would need to be code in the Fulfillment section that lists the business hours/days so the bot will essentially "scan" it and then spit back the answer to a user. I can't seem to find a tutorial on something that seems to be so basic.
This bot is just a basic bot using Dialogflow Messenger Integration.
Instead of using Fulfillment, you can create an Entity and then create an Intent that uses the entity you just created.
In your case, the entity I created is to have a synonym for the word "close", "open" and "business hours". You may try and create your own based on my sample entity below by following this creation of custom entities documentation.
Next is to create an intent that uses the created entity on the above sample.
On my sample, I used the training phrases you provided on your post. This will automatically detect the entity we earlier defined because we used the words "open", "close", and "business hours" in the training phrases.
Last is to configure the Responses and use the value of theentity we created as a response.
You may refer to this creation of custom intent documentation for complete reference.
Below is the final Dialogflow Messenger Integration sample.

How to handle Dialogflow list response

I am developing an app for Google Assistant using Dialogflow (using Dialogflow online interface, without any external server).
I have a list of products. Each product has an intent which is trained with its product name.
For example if I say "Product 1" the assistant will show me some information about "Product 1".
I also made an intent which lists all the products you can browse. As a response it shows a Google Assistant "List" which displays the names of all the items.
But when I click one of the items, it will type its name("Product 1") but the item name is not recognized and I got the fallback intent.
I though lists could work like suggestion chips but it looks like answers are interpreted differently.
By looking for examples I could only find examples using Dialogflow API from code (https://actions-on-google.github.io/actions-on-google-nodejs/classes/conversation_helper.list.html), and it seems that list answers are handled with a special type of intent.
Is there a way to handle list response directly from Dialogflow online interface ?
It does not handle the List or Carousel interfaces the same way it handles the suggestion chips. As you note - they trigger a special Event, which you're expected to create an Intent for.
There are a number of reasons for this, but one good one is that these tend to be fairly dynamic (they're meant to represent things like search results), so having to manage these with a Session Entity might be more difficult.
You can use the Dialogflow Inline Editor to handle them. This is essentially the same as using a fulfillment server - however Dialogflow handles most of the server management for you.

Can give DialogFlow based chat-bot a name

I would like to give my dialogflow based chat-bot a name, so that when I type Mels it would recognize that I am referring to it. Is there any way to do that??
There are two ways to do it.
Explicit invocation : This way, user has to specifically ask to chat with your chatbot. For example, my chatbot name is "SukhiBot". If user types, "talk to SukhiBot" in GoogleAssistant, then the chatbot is started and it takes care of further conversation.
Implicit invocation : You define a intent specific for the trigger. e.g. if your chatbot is about providing bill/invoice information then you set specific intents with keywords around billing and invoicing. When Dialogflow determines the particular intent from user's text, your chatbot will be invoked. You can set this up in the following screen with Google Assistant.
By invoking your app via google assistant, you should use the invocation phrases. For instance:- "Ok Google, talk to nutrition calculator", in this phrase, nutrition calculator is your app name.
You can set your invocation phrases in the action on google console.
Some helpful resources:-
https://developers.google.com/actions/discovery/

Google Dialogflow: Get the id of Card

I'm building a job search chatbot using Dialogflow. I want to ask user for the location, and return latest 10 jobs in that location. On clicking a job, I want to save that job id in context. How can I get the selected card id?
Have you tried using Google's location JSON object? You can find the docs here: https://developers.google.com/actions/reference/rest/Shared.Types/Location

Design custom entities for api.ai

I am trying to develop the bot using api.ai and confused between street address and address. I have read the documentation and got to know that it is for the US addresses only. Can I design it for myself for any city and what is the smart way to do so.
Method I know
creating the entities manually( add every places to the custom entity one by one).
One more method, user will write any address, bot will veritfy it with google maps if this vaild address than add it to the custom entity.( currently I don't know how will I do this but I think it can possible)
You can use api.ai APIs to add custom entities. You can use python geopy to verify and create/update your entities.

Resources