Hello.
I’m working on a bot that answers when users ask for the definition of specific concepts. It searches for the concept within a file containing pairs of concepts and definitions and then provides the response.
I want:
- If there isn’t any ‘concept’ entity in the intent → The bot must utter “I’m sorry. I couldn’t understand the requested concept” or “I couldn’t realize what concept you are looking for.”
- If there is a ‘concept’ entity in the intent, but it wasn’t found in the definitions file → The bot must utter “There is no definition matching the concept {concept} in my database.” or “I couldn’t find {concept} in my database.”
The problem is that the bot always includes the concept in the utterance. The domain file fragment is below.
responses:
utter_definition_not_found:
# utterance for missing or not recognized entities
- condition:
- type: slot
name: concept
value: # also tried with value: None or value: not_found (previously setting slot value within a custom action)
text: |
I'm sorry. I couldn't understand the requested concept.
- condition:
- type: slot
name: concept
value: # also tried with value: None or value: not_found (previously setting slot value within a custom action)
text: |
I couldn't realize what concept you are looking for.
- text: |
There is no definition matching the concept {concept} in my database.
- text: |
I couldn't find {concept} in my database.
slots:
concept:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: concept
Thanks in advance!