How can I return intent_ranking from my custom channel? Like below(Copied from http://localhost:5005/model/parse API response sample):
{
“entities”: [
{
“start”: 0,
“end”: 0,
“value”: “string”,
“entity”: “string”,
“confidence”: 0
}
],
“intent”: {
“confidence”: 0.6323,
“name”: “greet”
},
“intent_ranking”: [
{
“confidence”: 0.6323,
“name”: “greet”
}
],
“text”: “Hello!”
}
Currently, custom channels like facebook, twilio etc are all returning a list of messages.
I’ve seen this: RASA NLU return list of intents in order of confidence . But it need agent object which I don’t know how to obtain from my custom channel either. Or do I need to do more customization other than custom channel?
I tried using this code sample within my custom channel current_state = request.app.agent.tracker_store.get_or_create_tracker(sender_id) and I received the following error:
AttributeError: ‘Sanic’ object has no attribute ‘agent’
Any thoughts on why this may be occurring? Thank you!