Hi,
Can we give more than one same entity name in a single intent and get those values in actions.py. If so how to do that.
- intent: get_total_class
examples: |
- what is the total marks of [David](name) and [Mark](name) ?
in actions.py
class ActionGetMarks(Action):
def name(self) -> Text:
return "get_total_class_marks"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
Where_Condition = next(tracker.get_latest_entity_values('name'), None)
Where_Condition = Where_Condition.replace("and", " ',' ")
Where_Condition = "'"+Where_Condition+"'"
Query = "SELECT sum(Marks) from Students Where Name IN ("+Where_Condition +")"
dispatcher.utter_message(text=Query )
return []
So i need my Query to be something like this
SELECT sum(Marks) from Students Where Name IN ('David', 'Mark')