i want the complete input from user to be stored in the slot named ‘doc_desc’ but i am getting an error
:Received request to run 'form_2' DEBUG:rasa_core_sdk.forms:There is no active form DEBUG:rasa_core_sdk.forms:Activated the form 'form_2' DEBUG:rasa_core_sdk.forms:Skipping validation **ERROR:flask.app:Exception on /webhook [POST]** Traceback (most recent call last): File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\flask_cors\extension.py", line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\_compat.py", line 35, in reraise raise value File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\flask_cors\decorator.py", line 128, in wrapped_function resp = make_response(f(*args, **kwargs)) File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core_sdk\endpoint.py", line 83, in webhook response = executor.run(action_call) File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core_sdk\executor.py", line 177, in run events = action(dispatcher, tracker, domain) File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core_sdk\forms.py", line 392, in run domain) File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core_sdk\forms.py", line 279, in request_next_slot **for slot in self.required_slots(tracker):** **TypeError: required_slots() takes 1 positional argument but 2 were given** 127.0.0.1 - - [2019-02-12 14:15:10] "POST /webhook HTTP/1.1" 500 412 0.046816
My action_form.py contains: `# -- coding: utf-8 -- from typing import Dict, Text, Any, List, Union
from rasa_core_sdk import ActionExecutionRejection from rasa_core_sdk import Action, Tracker from rasa_core_sdk.events import SlotSet from rasa_core_sdk.executor import CollectingDispatcher from rasa_core_sdk.forms import FormAction, REQUESTED_SLOT
class form_1(FormAction): “”“Example of a custom form action”""
def name(self): # type: () -> Text “”“Unique identifier of the form”""
return "form_1"
@staticmethod def required_slots(tracker) -> List[Text]: # type: () -> List[Text]
return ["region", "rel"]
def slot_mapping(self, tracker):
return {"region": self.from_entity(entity="region"), "rel": self.from_entity(entity="rel")}
def submit(self, dispatcher, tracker, domain): # type: (CollectingDispatcher, Tracker, Dict[Text, Any]) -> List[Dict] “”“Define what the form has to do after all required slots are filled”""
# utter submit template
dispatcher.utter_template('utter_submit', tracker)
return []
class form_2(FormAction): def name(self): return “form_2”
def required_slots(tracker): # type: () -> List[Text]
return ["doc_desc"]
def slot_mapping(self):
return {"doc_desc": self.from_text()}
def submit(self, dispatcher, tracker, domain): # type: (CollectingDispatcher, Tracker, Dict[Text, Any]) -> List[Dict] “”“Define what the form has to do after all required slots are filled”""
# utter submit template
dispatcher.utter_message(tracker.get_slot('doc_desc'))
dispatcher.utter_template('utter_submit', tracker)
return []
where is the error, and how do i store the latest text from user into slot name 'doc_desc'. Is there any error in my endpoints.yml? the code there is:
action_endpoint:
url: “http://localhost:5055/webhook”`