Open turnerrainer opened 1 year ago
Examples of creating a new slot: https://rasa.com/docs/rasa/domain#slots
Add a slot with mapping type from_entity
:
slots:
slot_name:
type: text
mappings:
- type: from_entity
entity: entity_name
Add a slot with type entity
:
sample input to /rasa/slots/add
{
"slot_name": "common_teenus_ilm_asukoht",
"slot": {
"common_teenus_ilm_asukoht": {
"type": "text",
"influence_conversation": true,
"mappings": [
{
"type": "from_entity",
"entity": "asukoht",
"intent": "common_teenus_ilm"
},
{
"type": "from_entity",
"entity": "asukoht",
"intent": "nlu_fallback"
},
{
"type": "from_entity",
"entity": "asukoht",
"intent": "rahvaarv"
}
]
}
}
}
@RaulAltmae please link this issue with an appropriate pull request.
Seems good!
AS AN Architect I WANT to have a REST service to create new Rasa slots SO THAT there wouldn't be duplicate services for it
Acceptance Criteria
/rasa/slots/add
to create a new formExamples
Initial source
in which
slots.type: text
if always fixed as is.Add more intents
When adding
nlu_fallback
andrahvaarv
as additional intents,slots.common_teenus_ilm_asukoht.mappings.type: from_entity
andslots.common_teenus_ilm_asukoht.mappings.entity: asukoht
apply to all intents selected