dialogy icon indicating copy to clipboard operation
dialogy copied to clipboard

Bug in DucklingPlugin's activate_latent_entities.

Open keshav47 opened this issue 3 years ago • 1 comments

Describe the bug In DucklingPlugin, once self.activate_latent_entities is set True, there is no option to make it False in the consecutive turns/states where I don't want latent entities.

Following logic in DucklingPlugin contributes to this behavior.

self.activate_latent_entities = use_latent or self.activate_latent_entities

here

To Reproduce Steps to reproduce the behavior:

  1. set activate_latent_entities=false , while defining DucklingPlugin inside processors.
  2. Set state wise latent_entities in Input Class. eg latent_entities=False for capture_date_state and latent_entities=True for capture_time_state
  3. print(activate_latent_entities) variable inside Dialogy DucklingPlugin Base Class.
  4. curl request slu with payload's context['current_state'] in the following sequence capture_date_state -> capture_time_state -> capture_date_state
  5. activate_latent_entities will be printed in this sequence False -> True -> True

Expected behavior Whereas it should have been: False -> True -> False

Screenshots Na

Desktop (please complete the following information):

  • OS: Ubuntu
  • Python version: 3.9

Additional context Na

keshav47 avatar Feb 18 '22 10:02 keshav47

Refer to latent_entities field in the Input class. activate_latent_entities will become a private variable in a short period.

ltbringer avatar Feb 18 '22 11:02 ltbringer