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

Send additional context to NLP drivers #382

Open
mgomes opened this issue May 27, 2023 · 0 comments
Open

Send additional context to NLP drivers #382

mgomes opened this issue May 27, 2023 · 0 comments

Comments

@mgomes
Copy link
Member

mgomes commented May 27, 2023

Currently NLP drivers receive only the message sent by a user. In more advanced NLP cases, it would be helpful to also have the reply the bot sent to the user for context.

Additionally, there should be a way for NLP drivers to be able to access all potential intent and entity matches. For example, given this handle_message() block:

handle_message(
  :yes => proc {
    step_to state: :say_proceed
  },
  'Remind me later' => proc { step_to state: :say_no_problem },
  :no => proc { step_to state: :say_goodbye },
  :call => proc {
    step_to state: :ask_when_to_call
  }
)

The NLP helper should be able to access all hash keys arguments. That would be [:yes, "Remind me later", :no, :call]

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

1 participant