for the config.yml:
Configuration for Rasa NLU.
https://rasa.com/docs/nlu/components/
language: en pipeline:
- name: WhitespaceTokenizer
- name: CRFEntityExtractor
- name: EntitySynonymMapper
- name: CountVectorsFeaturizer token_pattern: (?u)\b\w+\b
- name: EmbeddingIntentClassifier
- name: DucklingHTTPExtractor
url: ${DUCKLING_URL}
dimensions:
- number
Configuration for Rasa Core.
https://rasa.com/docs/core/policies
policies:
- name: MemoizationPolicy
- name: KerasPolicy epochs: 200 max_history: 10
- name: MappingPolicy
- name: “FallbackPolicy” nlu_threshold: 0.4 core_threshold: 0.3 fallback_action_name: “my_action_fallback”
for my_fallback_action here it is:
class ActionDefaultFallback(Action): def name(self): return “my_fallback_action”
def run(self, dispatcher, tracker, domain):
i = tracker.get_slot('i')
dispatcher.utter_message("okay")
if i == 1:
dispatcher.utter_message("Handoff, Claudio")
return [ConversationPaused()]
a = str(i)
dispatcher.utter_message(a)
if i == None:
i = 0
i += 1
return [UserUtteranceReverted(),SlotSet("i", i)]