thank u so much can you please help me for solving other problem if u don’t mind here my nlu.md:
intent: create0
- how I can [create] (create) a map
- I want to [create] (create) a map
- can you [create] (create) a card for me
- [creation] (creation) card
intent: create
- my name is [rawand] (name)
- [ahmed ayadi] (name)
- my name is [ilhem] (name)
- [rawnak yahyaoui] ( name )
- it is [iheb soltani] ( name)
intent: create1
- my CIN number [00000000] (numCIN)
- my CIN is [01224578] (numCIN)
- CIN card [87995412] (numCIN)
- [54661425] (numCIN)
- [01245698] (numCIN)
intent: create2
- my phone number is [+21600000000] (numT)
- [+21692111111] (numT)
- my number is [+2169012345] (numT)
- [+21622222222] (numT) and here my domain.yml:
utter_create:
- text: “give me u name”
utter_create1:
- text: “give me ur your identity card number”
utter_create2:
- text: “give me ur phone number”
utter_create2:
-
text: “your card has been created with successfully” utter_slot_values:
-
text: "voila votre coordonnée
- name: {name}\n -numCin: {numCin}\n - numC: {numC}\n"
-
and this the stories
create0
- create0
-
admission_Form
-
form{“name”:“admission_Form”}
-
form{“name”:null}
-
utter_slot_values and this my actions : AdmissionForm class (FormAction): from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk.events import SlotSet
from rasa_sdk.forms import FormAction
import requests def name (self) -> Text: returns “admission_Form”
@staticmethod
def required_slots (tracker: Tracker) -> List [Dict [Text]]:
print ("required_slots (tracker: Tracker)")
return ["name", "numCin", "numC"]
def slot_mappings (self) -> Dict [Text, Any]:
return {"name": self.from_entity (entity = "name",
intention = ["create0",
"create",
"create1",
"create2"]),
"numCIN": self.from_entity (entity = "numCIN",
intention = ["create0",
"create",
"create1",
"create2"]),
"numT": self.from_entity (entity = "numT",
intention = ["create0",
"create",
"create1",
"create2"])}
def submit (auto, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict [Text, All],) -> List [Dict]:
# utter submit template
dispatcher.utter_message (template = "utter_creater2")
return []
and when I do rasa run action, it gives me this result: 2020-08-24 17:59:48 INFO rasa_sdk.endpoint - Starting action endpoint server… Traceback (most recent call last): File “c:\users\acer\anaconda3\envs\word\lib\runpy.py”, line 193, in run_module_as_main “main”, mod_spec) File “c:\users\acer\anaconda3\envs\word\lib\runpy.py”, line 85, in run_code exec(code, run_globals) File "C:\Users\Acer\anaconda3\envs\word\Scripts\rasa.exe_main.py", line 7, in File "c:\users\acer\anaconda3\envs\word\lib\site-packages\rasa_main.py", line 92, in main cmdline_arguments.func(cmdline_arguments) File “c:\users\acer\anaconda3\envs\word\lib\site-packages\rasa\cli\run.py”, line 52, in run_actions sdk.main_from_args(args) File “c:\users\acer\anaconda3\envs\word\lib\site-packages\rasa_sdk_main_.py”, line 21, in main_from_args args.auto_reload, File “c:\users\acer\anaconda3\envs\word\lib\site-packages\rasa_sdk\endpoint.py”, line 137, in run action_package_name, cors_origins=cors_origins, auto_reload=auto_reload File “c:\users\acer\anaconda3\envs\word\lib\site-packages\rasa_sdk\endpoint.py”, line 80, in create_app executor.register_package(action_package_name) File “c:\users\acer\anaconda3\envs\word\lib\site-packages\rasa_sdk\executor.py”, line 250, in register_package self._import_submodules(package) File “c:\users\acer\anaconda3\envs\word\lib\site-packages\rasa_sdk\executor.py”, line 206, in _import_submodules package = self._import_module(package) File “c:\users\acer\anaconda3\envs\word\lib\site-packages\rasa_sdk\executor.py”, line 227, in import_module module = importlib.import_module(name) File "c:\users\acer\anaconda3\envs\word\lib\importlib_init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “”, line 1006, in _gcd_import File “”, line 983, in _find_and_load File “”, line 967, in _find_and_load_unlocked File “”, line 677, in _load_unlocked File “”, line 728, in exec_module File “”, line 219, in _call_with_frames_removed File “C:\Users\Acer\Desktop\chahtbot word\actions.py”, line 46, in class AdmissionForm(FormAction): File “C:\Users\Acer\Desktop\chahtbot word\actions.py”, line 52, in AdmissionForm def required_slots(tracker:Tracker) -> List[Dict[Text]]: File “c:\users\acer\anaconda3\envs\word\lib\typing.py”, line 254, in inner return func(*args, **kwds) File “c:\users\acer\anaconda3\envs\word\lib\typing.py”, line 632, in getitem _check_generic(self, params) File “c:\users\acer\anaconda3\envs\word\lib\typing.py”, line 208, in _check_generic raise TypeError(f"Too {‘many’ if alen > elen else ‘few’} parameters for {cls};" TypeError: Too few parameters for typing.Dict; actual 1, expected 2.
I don’t know where exactly the problem…