Hi, new to Rasa here. I’ve been following the tutorials for building a SentimentAnalyzer
custom NLU component and I noticed that the sentiment prediction is appended to the “entities” variable of the Message
class, e.g. message.set("entities", [entity], add_to_output=True)
.
I was wondering whether this is an absolute requirement for any custom predictions to work? It seems counterintuitive to have non-entities like a sentiment alongside actual entities like names, locations, etc. I would prefer the outputs of custom components in their own objects. Is that possible? For example:
{
"intent": {
"name": "foo",
"confidence": 0.1234567890
},
"entities": [],
"sentiment": [
{
"value": "NEUTRAL",
"score": 0.123,
"confidence": 0.897
}
],
}