Hi,
I am new to rasa framework and want use it at work I am getting this error while filling slot in form. Please help me to identify the error
Relevant files are attached below: config.yml (577 Bytes) nlu.md (2.4 KB) responses.md (605 Bytes) stories.md (1.5 KB) domain.yml (1.4 KB) actions.py (2.2 KB) actions.py
from rasa_sdk.forms import FormAction
from typing import Any, Text, Dict, List
from rasa_sdk import Tracker
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk import Action
from rasa_sdk.events import UserUtteranceReverted
class SalesForm(FormAction):
"""Collects sales information and adds it to the spreadsheet"""
def name(self):
return "sales_form"
@staticmethod
def required_slots(tracker):
return [
"job_function",
"use_case",
"budget",
"person_name",
"company",
"business_email",
]
def submit(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict]:
dispatcher.utter_message("Thanks for getting in touch, we’ll contact you soon")
return []
def slot_mappings(self):
"""A dictionary to map required slots to
- an extracted entity
- intent: value pairs
- a whole message
or a list of them, where a first match will be picked"""
return {"use_case": self.from_text(intent="inform")}
class ActionGreetUser(Action):
"""Revertible mapped action for utter_greet"""
def name(self):
return "action_greet"
def run(self, dispatcher, tracker, domain):
dispatcher.utter_template("utter_greet", tracker)
return [UserUtteranceReverted()]