hi - I am trying to write a very simple bot by using a form and a single entity. However, it seems the combination of slots - from_entity and from_text is not working. Would appreciate if someone can help and suggest how to achieve this.
Rasa Version : 3.4.0
Minimum Compatible Version: 3.0.0
Rasa SDK Version : 3.4.0
Python Version : 3.8.11
Operating System : Windows-10-10.0.19044-SP0
Here is my nlu.yml
version: "3.1"
nlu:
- intent: greet
examples: |
- hey
- hello
- hi
- hello there
- good morning
- good evening
- moin
- hey there
- let's go
- hey dude
- goodmorning
- goodevening
- good afternoon
- intent: check_component_status
examples: |
- is [daemonA](component) up
- is [daemonA](component) working
- [daemonB](component) running
- check [daemonB](component) service
- what is the status of [daemonC](component)
- check service [daemonC](component)
- is anything wrong with [daemonD](component)
- [daemonD](component) is running
- [daemonE](component)
- what about [daemonE](component)
- check [daemonF](component)
- is [daemonF](component) ok
- lookup: component
examples: |
- daemonA
- daemonB
- daemonC
- daemonD
- daemonE
- daemonF
Here is my rules.yml
version: "3.1"
rules:
- rule: Welcome Message
steps:
- intent: greet
- action: utter_greet
- rule: Activate Component Form
steps:
- intent: check_component_status
- action: component_form
- active_loop: component_form
- rule: Submit Component Form
condition:
- active_loop: component_form
steps:
- action: component_form
- active_loop: null
- slot_was_set:
- requested_slot: null
- action: utter_component
Here is my domain.yml
version: '3.1'
intents:
- check_component_status
- greet
entities:
- component
forms:
component_form:
required_slots:
- component
- hostname
slots:
component:
type: text
influence_conversation: true
mappings:
- type: from_entity
entity: component
hostname:
type: text
influence_conversation: true
mappings:
- type: from_text
responses:
utter_greet:
- text: Hi. I can help with general queries.
utter_ask_component:
- text: Please provide the component
utter_ask_hostname:
- text: Please enter the host name
utter_component:
- text: Checking status of {component} on {hostname}
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
actions:
- utter_ask_hostname
- utter_component
Here is my stories.yml
version: "3.1"
stories:
- story: happy path
steps:
- intent: greet
- action: utter_greet
Here is my config.yml
# The config recipe.
# https://rasa.com/docs/rasa/model-configuration/
recipe: default.v1
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline:
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# # If you'd like to customize it, uncomment and adjust the pipeline.
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: RegexEntityExtractor
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
constrain_similarities: true
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
constrain_similarities: true
- name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
# # No configuration for policies was provided. The following default policies were used to train your model.
# # If you'd like to customize them, uncomment and adjust the policies.
# # See https://rasa.com/docs/rasa/policies for more information.
- name: MemoizationPolicy
- name: RulePolicy
- name: UnexpecTEDIntentPolicy
max_history: 5
epochs: 100
- name: TEDPolicy
max_history: 5
epochs: 100
constrain_similarities: true
After I run this bot with the below user message:
status of daemonA
it is able to pick the entity component correctly. However, it is not asking for the second slot hostname. i believe as the slot is marked as from_text, it is simply taking previous user message “status of daemonA” as the input and showing me outout as below:
Checking status of daemonA on status of daemonA
Any idea s to how I can make it work in a form ?