Hello, I am getting following error.
Your input -> sales
Exception occurred while handling uri: 'http://localhost:5005/webhook'
Traceback (most recent call last):
File "c:\python\python37\lib\site-packages\sanic\app.py", line 940, in handle_request
handler, args, kwargs, uri, name = self.router.get(request)
File "c:\python\python37\lib\site-packages\sanic\router.py", line 411, in get
return self._get(request.path, request.method, "")
File "c:\python\python37\lib\site-packages\sanic\router.py", line 475, in _get
raise NotFound("Requested URL {} not found".format(url))
sanic.exceptions.NotFound: Requested URL /webhook not found
2020-04-29 11:35:52 ERROR rasa.core.processor - Encountered an exception while running action 'sales_form'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
Your input -> hello
Hi
Your input ->
actions.py :
from typing import Any, Dict, List, Text, Union, Optional
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk.forms import FormAction
from rasa_sdk.events import (
SlotSet,
UserUtteranceReverted,
ConversationPaused,
EventType,
ActionExecuted,
UserUttered,
)
class SalesForm(FormAction):
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 []
Domain.yml :
intents:
-
greet
-
bye
-
thank
-
account
-
faq
-
contact_sales
- inform
responses:
utter_noworries:
- text: No worries!
utter_greet:
- text: Hi
utter_bye:
- text: Bye!
utter_account:
- text: give account no
Sales form
utter_ask_business_email:
- text: What's your business email?
utter_ask_company:
- text: What company do you work for?
utter_ask_budget:
- text: "What's your annual budget for conversational AI? 💸"
utter_ask_job_function:
- text: "What's your job? 🕴"
utter_ask_person_name:
- text: What's your name?
utter_ask_use_case:
- text: What's your use case?
actions:
- respond_faq
slots:
company:
type: unfeaturized
job_function:
type: unfeaturized
person_name:
type: unfeaturized
budget:
type: unfeaturized
business_email:
type: unfeaturized
use_case:
type: unfeaturized
adding sales forms
forms:
- sales_form
entities:
-
company
-
job_function
-
person_name
-
budget
-
business_email
-
use_case
**using ** **Python 3.7.6 ** Rasa: Version: 1.9.7 tensorflow : 2.1.0