-
Create a new Intent name:
addTwoNumbers
. -
Under Training phrases type:
add 5 and 6
and Change the parameters name:number to a
&number1 to b
. -
Then go to Fulfillment session under intent. and
Enable webhook call for this intent
. -
Now go to Fulfillment menu undersidebar and
Enable
theInline Editor
. -
Define
intentMap.set('YourIntentName', FunctionsName)
Functions. For example in this intent I'm usingintentMap.set('addTwoNumbers', AddNumber);
-
Create a function named 'addTwoNumbers'.
function AddNumber(agent){ var x =agent.parameters.a; var y =agent.parameters.b; var z =x+y; agent.add('sum of '+x+' and '+y+' = '+z); }
-
Click on Deploy Button and Test it.
-
Notifications
You must be signed in to change notification settings - Fork 4
sonakshi1501/AoG-Calculator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description or website provided.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published