Skip to content

Commit

Permalink
Added standard Dialogflow configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
afirstenberg committed Apr 22, 2018
1 parent 495d3c6 commit abc0d80
Show file tree
Hide file tree
Showing 17 changed files with 569 additions and 4 deletions.
51 changes: 48 additions & 3 deletions README.md
Expand Up @@ -347,11 +347,56 @@ Environment settings built:

#### Adding your own builder

### Intents and Actions
### Intents, Actions, and Outents

User actions in Dialogflow are represented by two things: The Intent
name and the Action name. Multivocal uses these to determine which
handler should be called to do any additional processing and what
should be sent in response. Multivocal prefixes these with "Intent."
and "Action." respectively and stores them in the following environment
values:

* ActionName
The action name provided from Dialogflow
* Action
The action name prefixed with "Action."
* IntentName
The intent name provided from Dialogflow
* Intent
The Intent name prefixed with "Intent."

Additionally, Multivocal defines the concept of an "Outent". You can
set this environment setting in a handler to provide additional
choices for responses which may be different than the default ones you
provide for the intent or action. You do not need to prefix it with
"Outent.", although you're allowed to do so. You're not required to set
one at all, if if you do, it should be in the environment setting:

* Outent

Handlers and responses, and how Multivocal determines which ones to use,
are described in their own sections below.

#### Standard Dialogflow Intents/Actions

(TODO: Work in progress to provide Dialogflow zip)
A standard set of intents, handlers, and responses are included
with Multivocal which handle most of the boilerplate tasks that you
need to consider. There are two parts to these standard components, one
is included when you initialize Multivocal, but the other requires you
to import a standard set of Intents into Dialogflow:

1. The standard handlers and responses (including a base library for
your own responses) are setup when Multivocal is first initialized. You
can override these behaviors with your own handlers and responses, but
you should keep in mind what they do by default.

2. There is a zipfile in `dialogflow/standard.zip` which contains the
corresponding Dialogflow Intent configurations. All the action settings
start with "multivocal.". You should *IMPORT* this zip file into
Dialogflow. If you're starting a new project, you can then delete the
older welcome and fallback intents. You'll also need to make sure the
timezone, language, fulfillment URL, and other settings are correct
for your project.

##### Action: welcome and multivocal.welcome

Expand All @@ -368,7 +413,7 @@ after doing response processing.

##### Intent: input.unknown

##### Action: input.unknown
##### Action: multivocal.unknown

##### Action: repeat and multivocal.repeat

Expand Down
Binary file added dialogflow/standard.zip
Binary file not shown.
37 changes: 37 additions & 0 deletions dialogflow/standard/agent.json
@@ -0,0 +1,37 @@
{
"description": "",
"language": "en",
"disableInteractionLogs": false,
"googleAssistant": {
"googleAssistantCompatible": true,
"project": "",
"welcomeIntentSignInRequired": false,
"startIntents": [],
"systemIntents": [],
"endIntentIds": [],
"oAuthLinking": {
"required": false,
"grantType": "AUTH_CODE_GRANT"
},
"voiceType": "FEMALE_1",
"capabilities": [],
"protocolVersion": "V2",
"autoPreviewEnabled": true
},
"defaultTimezone": "America/New_York",
"webhook": {
"url": "",
"headers": {
"": ""
},
"available": true,
"useForDomains": false,
"cloudFunctionsEnabled": false,
"cloudFunctionsInitialized": false
},
"isPrivate": true,
"customClassifierMode": "use.after",
"mlMinConfidence": 0.3,
"supportedLanguages": [],
"onePlatformApiVersion": "v1legacy"
}
29 changes: 29 additions & 0 deletions dialogflow/standard/intents/about.json
@@ -0,0 +1,29 @@
{
"id": "a8b1a759-14c7-425f-83eb-c13b770b3c08",
"name": "about",
"auto": true,
"contexts": [],
"responses": [
{
"resetContexts": false,
"action": "multivocal.about",
"affectedContexts": [],
"parameters": [],
"messages": [
{
"type": 0,
"lang": "en",
"speech": []
}
],
"defaultResponsePlatforms": {},
"speech": []
}
],
"priority": 500000,
"webhookUsed": true,
"webhookForSlotFilling": false,
"lastUpdate": 1524399527,
"fallbackIntent": false,
"events": []
}
50 changes: 50 additions & 0 deletions dialogflow/standard/intents/about_usersays_en.json
@@ -0,0 +1,50 @@
[
{
"id": "7746b1a1-d001-4976-bee3-8063b9d9e61a",
"data": [
{
"text": "what version is this?",
"userDefined": false
}
],
"isTemplate": false,
"count": 0,
"updated": 1524399527
},
{
"id": "edb07cdf-daaa-4bdd-a755-837fc9ca554b",
"data": [
{
"text": "tell me about yourself",
"userDefined": false
}
],
"isTemplate": false,
"count": 0,
"updated": 1524399527
},
{
"id": "818af995-f9e1-45a2-b89b-53c9e98c9d30",
"data": [
{
"text": "version",
"userDefined": false
}
],
"isTemplate": false,
"count": 0,
"updated": 1524399527
},
{
"id": "a09b0889-fa5b-4dc8-b704-154583085083",
"data": [
{
"text": "about",
"userDefined": false
}
],
"isTemplate": false,
"count": 0,
"updated": 1524399527
}
]
35 changes: 35 additions & 0 deletions dialogflow/standard/intents/input.none.fallback.json
@@ -0,0 +1,35 @@
{
"id": "98f69eb2-b277-46a9-8459-52c62717b479",
"name": "input.none.fallback",
"auto": false,
"contexts": [
"actions_intent_no_input"
],
"responses": [
{
"resetContexts": false,
"action": "multivocal.unknown",
"affectedContexts": [],
"parameters": [],
"messages": [
{
"type": 0,
"lang": "en",
"speech": []
}
],
"defaultResponsePlatforms": {},
"speech": []
}
],
"priority": 500000,
"webhookUsed": true,
"webhookForSlotFilling": false,
"lastUpdate": 1521253017,
"fallbackIntent": true,
"events": [
{
"name": "actions_intent_NO_INPUT"
}
]
}
33 changes: 33 additions & 0 deletions dialogflow/standard/intents/input.none.json
@@ -0,0 +1,33 @@
{
"id": "bdda4da3-2955-43a5-a71b-90b21958fe63",
"name": "input.none",
"auto": true,
"contexts": [],
"responses": [
{
"resetContexts": false,
"action": "multivocal.unknown",
"affectedContexts": [],
"parameters": [],
"messages": [
{
"type": 0,
"lang": "en",
"speech": "I didn\u0027t hear anything."
}
],
"defaultResponsePlatforms": {},
"speech": []
}
],
"priority": 500000,
"webhookUsed": true,
"webhookForSlotFilling": false,
"lastUpdate": 1521233525,
"fallbackIntent": false,
"events": [
{
"name": "actions_intent_NO_INPUT"
}
]
}
42 changes: 42 additions & 0 deletions dialogflow/standard/intents/input.unknown.json
@@ -0,0 +1,42 @@
{
"id": "b468c432-dd5e-4805-a895-85b515825087",
"name": "input.unknown",
"auto": false,
"contexts": [],
"responses": [
{
"resetContexts": false,
"action": "multivocal.unknown",
"affectedContexts": [],
"parameters": [],
"messages": [
{
"type": 0,
"lang": "en",
"speech": [
"I didn\u0027t get that. Can you say it again?",
"I missed what you said. Say it again?",
"Sorry, could you say that again?",
"Sorry, can you say that again?",
"Can you say that again?",
"Sorry, I didn\u0027t get that.",
"Sorry, what was that?",
"One more time?",
"What was that?",
"Say that again?",
"I didn\u0027t get that.",
"I missed that."
]
}
],
"defaultResponsePlatforms": {},
"speech": []
}
],
"priority": 500000,
"webhookUsed": true,
"webhookForSlotFilling": false,
"lastUpdate": 1521233513,
"fallbackIntent": true,
"events": []
}
33 changes: 33 additions & 0 deletions dialogflow/standard/intents/quit.event.json
@@ -0,0 +1,33 @@
{
"id": "28933ed0-fa9c-4f31-80f3-6c3dc6b62ef3",
"name": "quit.event",
"auto": true,
"contexts": [],
"responses": [
{
"resetContexts": false,
"action": "multivocal.quit",
"affectedContexts": [],
"parameters": [],
"messages": [
{
"type": 0,
"lang": "en",
"speech": []
}
],
"defaultResponsePlatforms": {},
"speech": []
}
],
"priority": 500000,
"webhookUsed": true,
"webhookForSlotFilling": false,
"lastUpdate": 1521233486,
"fallbackIntent": false,
"events": [
{
"name": "actions_intent_CANCEL"
}
]
}
35 changes: 35 additions & 0 deletions dialogflow/standard/intents/quit.fallback.json
@@ -0,0 +1,35 @@
{
"id": "5f2a555b-b8b0-4829-86cf-0b64e6448add",
"name": "quit.fallback",
"auto": false,
"contexts": [
"actions_intent_cancel"
],
"responses": [
{
"resetContexts": false,
"action": "multivocal.quit",
"affectedContexts": [],
"parameters": [],
"messages": [
{
"type": 0,
"lang": "en",
"speech": []
}
],
"defaultResponsePlatforms": {},
"speech": []
}
],
"priority": 500000,
"webhookUsed": true,
"webhookForSlotFilling": false,
"lastUpdate": 1521233495,
"fallbackIntent": true,
"events": [
{
"name": "actions_intent_CANCEL"
}
]
}

0 comments on commit abc0d80

Please sign in to comment.