I have a super simple implementation of a Form, it just asks for my name (baby steps).
When I enter it, I receive this error:
2019-09-10 12:57:25 ERROR rasa.core.actions.action - Failed to extract slot name with action name_form
I presume my issue with in my actions.py file here (did I forget something?):
# This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/core/actions/#custom-actions/
# This is a simple example for a custom action which utters "Hello World!"
from typing import Any, Text, Dict, List
#
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk.forms import FormAction
#
#
# class ActionHelloWorld(Action):
#
# def name(self) -> Text:
# return "action_hello_world"
This file has been truncated. show original
If the problem is elsewhere all the code is in this repo
Thanks for any pointers
1 Like
Gehova
(Gehová López)
September 10, 2019, 6:30pm
2
The class doesn’t have a mapping function. If you want to capture any name, it will be like this:
def slot_mappings(self):
return { "name": self.from_text(intent=None)}
2 Likes
Thank you so much, I got it working. I saw the slot_mapping method in the formbot example, but the comments made it sound to me like it was for entities, but makes total sense I needed that.
Thank you again for your help.
1 Like