I’ve started creating a Custom Action for managing survey ratings, and I can see that the custom_class.py is getting registered in the action server, but it never seems to get called. I think my slot definition points to it, but it’s acting like it never decides to call.
class SetRating(Action):
def name(self) -> str:
print("set_rating.name ENTERED")
return "set_rating"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker, domain: Dict[str, Any]):
print("set_rating ENTERED")
print("dispatcher:", dispatcher)
print("tracker:", tracker)
print("domain:", domain)
# account = get_account(tracker.sender_id)
print("set_rating LEAVING")
return [SlotSet("survey_question_applying_ai_in_organization", "3")]
and the slot is defined as:
slots:
survey_question_understanding_genai:
type: float
min_value: 1
max_value: 5
initial_value: null
influence_conversation: false
mappings:
- type: custom
action: set_rating
actions:
- set_rating
responses:
utter_ask_survey_question_understanding_genai:
- text: "On a scale of 1 to 5, how much do YOU AGREE that Understanding GenAI is important to you in your work? (1=Strongly Disagree, 5=Strongly Agree)"
and my endpoints are configured:
action_endpoint:
url: "http://localhost:5055/webhook"
The response after the utterance should call the custom action, right? I see the " ``` set_rating.name ENTERED