Ejemplo n.º 1
0
    def activation_response(cls, initial_query: TextQuery, slots: Dict[Slot, str]) -> ActivationResponse:
        if Slot.Name not in slots:
            return None

        for phrase in AboutArtistAction.triggering_phrases:
            if phrase in initial_query.text:
                return ActivationResponse(intent_detected=True)
Ejemplo n.º 2
0
 def activation_response(cls, initial_query: TextQuery,
                         slots: Dict[Slot, str]) -> ActivationResponse:
     for question_category in cls._faq_dataset.responses:
         if cls._is_matching_question_category(question_category,
                                               initial_query):
             is_museum_specific = cls._faq_dataset.responses[
                 question_category]['is_museum_specific']
             return ActivationResponse(intent_detected=True,
                                       props={
                                           'question_category':
                                           question_category,
                                           'is_museum_specific':
                                           is_museum_specific
                                       })
 def activation_response(cls, initial_query: TextQuery,
                         slots: Dict[Slot, str]) -> ActivationResponse:
     if Slot.ShopByName not in slots:
         return None
     return ActivationResponse(intent_detected=True)
Ejemplo n.º 4
0
 def activation_response(cls, initial_query: TextQuery,
                         slots: Dict[Slot, str]) -> ActivationResponse:
     for phrase in RouteAction.triggering_phrases:
         if phrase in initial_query.lower():
             return ActivationResponse(intent_detected=True)