Is there a way to preserve non-slotted entities through a rasa from?
Say someone asks a question like: “show me the stock price for google”. With an action, I can either return the current stock price or the stock price history. To clarify this ambiguity, I am using a form to capture a time period entity (time_period) which can be either current_price or historical_price. (if there is a more elegant way to do this please let me know).
So the “happy path” story is presented like this:
* get_stock_price
- form_get_stock_price
- form{"name": "form_get_stock_price"}
- form{"name": null}
- action_get_stock_price
The form action, form_get_stock_price has a requirement of just time_period. For reasons not obvious in this example, I cannot make other entities like “google” or “stock price” a required slot. action_get_stock_price is a normal Action that fetches the stock price based on the given entities.
If I have a dialog like this:
Me: Show me the stock price for google (get_stock_price)
Bot: Would you like the current price or historic prices? (utter_ask_get_stock_price)
Me: historical prices (inform_get_stock_price)
I receive an object that only has the time_period entity and the intent set as inform_get_stock_price.
Is there a way that I can easily carry over entities and intents such that I instead receive an object that has the intent set as “get_stock_price”, and the “time_period” entity appended onto the entity list originally obtained in the first question (e.g. entities := [“google”, “stock_price”, “historical_price”]).
Should I remove the action_get_stock_price and put its logic into the form action (form_get_stock_price)?
Please let me know if anything needs clarification.