Skip to content

Send additional context to NLP drivers #382

@mgomes

Description

@mgomes

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions