Can we add more than 5 input contexts in dialogflow ? I am getting above error while trying to add more than 5 input contexts
No there is no way to use more than 5 input contexts in a single intent.
Even when you enter 5 input contexts then all 5 input context has to be active otherwise you will not get the response.
Related
Is it possible some how to assign a Dialogflow intent to contexts with disjunction union.
I.e. I need an intent Test<A | B> to be triggered whatever single of contexts A or B are being active even if solely.
Since I don't want to duplicate a whole the intent with the only difference in theses context references.
This is not possible at the moment, but you can open a Feature Request by following this link.
I want to take inputs separated by new lines, but i don't wan't it to take fixed amount of inputs. Then perform some action on given inputs. For more info look at this codechef problem.
What you can do is to use while loop and check the value of input in each iteration
input_list=[]
value=input()
while(value!=condition):
value=input()
input_list.append(value)
I'm building a chatbot that asks users for symptoms, one at a time.
There is a single entity #symptom, which is a list. I'd like to figure out how to append each new symptom into the symptoms parameter list from existing contexts.
For example,
Bot: Please type in your 1st symptom.
User: Cough
symptoms = ['cough']
Bot: Please type in your 2nd symptom.
Fever: Fever
symptoms = ['cough', 'fever']
Bot: Please type in your 3rd symptom.
User: Breathlessness
symptoms = ['cough', 'fever']
How do I go about building such a flow?
(N.B. I know I can simply have one intent that asks user to type out all the symptoms in one line, but I'd prefer for the symptoms to be asked one by one so I can ensure data cleansing before inserting the symptom into the list)
This too is more of a design issue:) You can roughly achieve what you have described with Follow-up intents and contexts, but a better way would be to more clearly separate the intent and parameter matching from any kind of further backend processing.
You should, if you haven't already, define your symptom entity as a Developer mapping entity. This gives you the option to map an arbitrary number of synonyms to one reference value:
reference value: fever
synonyms: fever, feverishness, high temperature, febricity, febrility
The user can now enter any of the synonyms, you will always get the reference value as the parameter (and list of these values if the parameter is a list). The reference value doesn't even have to be a normal word, it can be any unique identifier (e.g. a primary key from database of symptoms). It is only matched if it itself is included in the list of synonyms.
This structure would ensure that you will always get a parameter from a clearly defined set of values, even if the actual user input has a much greater variability. Any further processing of these parameters should be part of your backend code and not be tied to the Dialogflow agent. Ideally you would think of the reference values as the API between the user input and you backend business logic.
In Australia it is totally normal for a voice-assistant user to speak digit strings with 'double' and 'triple'. (Same in the UK - Where they also sometimes use "treble")
So "8845" is said "double eight four five".
"6663" will often be said as "triple six three".
Dialogflow doesn't seem to support this for any of the system digit-string entities that aim to understand a user speaking a string of digits.
So, anyone know how to support "double" and "triple" in digit strings in Dialogflow?
Do I have to 'roll my own'?
To handle these cases, you can create a dev mapping entity (let's call it "number-extra"):
reference value synonyms
88 double eight
666 triple six
Since there are only 10 "double" or "triple" variants (one for each digit), you can just create a mapping for each one (11, 22, 33, etc).
You also need a composite entity (let's call it "number"):
#numbers-extra
#sys.number
Both entities should return strings, so there will be no inconsistencies in the composite entity and the reference values should be easy to handle on the backend.
You should also add training phrases that use these entities, e.g. "My address is triple six three Main Street" and annotate the entities accordingly. This gives your model more information about how these entities are used and will improve accuracy.
This suggestion can be generalized for other sys entities as well. Missing city? Create an entity for cities and combine it with #sys.geo-city in a composite entity. Missing given-name? Same procedure.
You can use SSML and some logic to accomplish this.
Parse "468826661" to be four six double eight two triple six one and then just send it like that in a <speak></speak> tag.
Here are the docs for that.
In pyside or pyqt:
Say that I have 3 sliders whose combined value mustn't exceed 9 or/and that it would always have to be 9. Is there an inbuilt way to make them depended in such a way, or do I have to program them.
Illustration:
0123456789
1 ---------|
2 |---------
3 |---------
0123456789
1 ---|------
2 ---|------
3 ---|------
The available slots and singals on a QSlider mean that there would be no way to automatically have them all connect. To do this you would need to create a custom widget or at the least code in some additional logic.