Get responses _AND_ intents via API

I am using the API to query my model, using this call:

fetch(“http://localhost:5005/webhooks/rest/webhook” …

I can get the next response and move the tracker through the conversation, but I want to get the top possible responses and intents, like I get when I do this call to get the intents:

fetch(“http://localhost:5005//model/parse” …

@bferster You could try to use this endpoint to get the conversation in story format and that will list the intents and bot utterances in the conversation. Let me know if I misunderstood your intention and the above suggestion doesn’t solve your issue.

@anca I’m using rasa version 3.6.0 and have the same query to get the intent in the response. I’m using the “http://localhost:5005/webhooks/rest/webhook” endpoint to send the user message and get the next predicted message, and this is what a text response looks like:

[
  {
    "recipient_id": "test_user",
    "text": "test response"
  }
]

The endpoint you mentioned above requires conversation_id but we don’t know it since it’s not provided in the response.

Please clarify how to know the intent of the predicted message from the model. Thanks!

Hey @hariskhan If I’m not mistaken, recipient_id is the same as conversation_id so you can use that with any tracker endpoint, so have a try. Alternatively you can also use the /model/parse endpoint to get back the predicted intent. Hope this helps!

1 Like