Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filling slots from client context #40

Open
Denire opened this issue Sep 1, 2020 · 2 comments
Open

Filling slots from client context #40

Denire opened this issue Sep 1, 2020 · 2 comments

Comments

@Denire
Copy link
Contributor

Denire commented Sep 1, 2020

This issue suggest a feature of filling slots from client context.

Let's say that we have an Intent, which has required slots like name and phoneNumber. These slots are required and must be filled to proceed dialog, otherwise bot won't be able to perform some action.

Once client answered to it, we can store it in client context, further eliminating need to ask it again. But right now this information will be stored only in our bot context, activator will have no knowledge of it and won't have any use of it. So, when user will fall into this same intent, he should be asked to fill name and phoneNumber again (this behaviour may vary from activator to activator, but still).
And this makes slot filling unusable for these kind of common scenarios.

As I think, resolving this issue must bring some interfaces/methods for framework users to pre-fill some slots (either via client context, or directly form ActionContext). Or just find way to re-use slots.

@morfeusys
Copy link
Contributor

@Denire right now fillSlots method already receives a botContext as an argument. This makes it possible to decide if an activator should start a slot filling procedure or fetch all required data from the user's context. Isn't it?

@Denire
Copy link
Contributor Author

Denire commented Sep 2, 2020

@morfeusys I'm not sure that fetching from botContext by default is the best option.
As I imagine, we should provide some interface for client to connect value from botContext (client context?) to slot, just like we do it with SlotReactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants