I have a query of the following nature in API.ai "btc, ltc, xrp to usd, inr" How can I extract the query as source = [btc, ltc, xrp] destination = [usd, inr]
The number of elements in the source can be variable and the number of elements in the destination can also be variable. I am aware of the list entity and I tried it with the query. It picks up only btc in one list and puts the rest in another rest. Any suggestions
You can create 2 intents ,
SingleInput: a. Create a "btc, ltc, xrp" as utterance b. Add a Parameter $First as "SingleArray" with @sys.any
MultipeInput: a. Create a "btc, ltc, xrp" to "usr ind" as utterance b. Add a Parameter $First as "SingleArray" with @sys.any b. Add a Parameter $Second as "MultipleArray" with @sys.any
Now when you issue the utterance with btn,ltc, you will get an output.
Your Single Input: "btc, ltc, xrp" output has parameter $First = [btc ltc xrp]
Your Multiple Input "btc, ltc, xrp to usr ind" output has parameter $First = [btc ltc xrp] and $Second = [usr ind]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With