I am loading the trained rasa models manually by using this
agent = Agent.load(
model,
action_endpoint=EndpointConfig(ACTION_ENDPOINT)
)
And i am predicting the result like this
botResponse = await agent.handle_text(query)
but this just returns the response as text, but i need the confidence and intent name as well
I tried the handle_message
but still it does not give confidence.
you can retrieve this information from the
tracker_store
instance of theAgent
. To do so, firstly make sure that you pass a sender id while callingagent.handle_text(query, sender_id="some sender id")
. Then retrieve the tracker with:Once you have the tracker, you can retrieve the NLU parsed data of the last sent message with :
nlu_parse_data
should look something like this: