Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

feat: set expected entity when capturing inputs to API calls in .dialog import #1387

Merged
merged 18 commits into from
Nov 26, 2019

Conversation

tpmsr
Copy link
Contributor

@tpmsr tpmsr commented Nov 25, 2019

For cases where a bot asks the user a question (eg "What is your product key?") whose response will be used as the input to an API call, this PR updates the import flow to

  1. Create an entity to capture the results of the user response (eg, productKey)
  2. Sets expected entity on the action preceding the user response to the name of the entity created in step 1

We later look up the entity by its name when creating actions, and set the expected / suggested entity on the appropriate action.

Tested with the license key bot :

expected_entity

@tpmsr tpmsr added the needs-review High priority PR, Needs code review before merge label Nov 25, 2019
src/Utils/obiDialogParser.ts Show resolved Hide resolved
src/Utils/obiDialogParser.ts Outdated Show resolved Hide resolved
src/routes/Apps/App/TrainDialogs.tsx Outdated Show resolved Hide resolved
@tpmsr tpmsr merged commit 40a35a5 into master Nov 26, 2019
@tpmsr tpmsr deleted the 201911-api-input-entity branch November 26, 2019 19:14
@mattmazzola
Copy link
Member

🎉 This PR is included in version 0.412.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-review High priority PR, Needs code review before merge released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants