Kavita
(Kavita Aherwar)
December 18, 2018, 7:02am
1
I am migrating my app from LUIS to RASA. Apart from the output API LUis has another api for Lists of all the intents and the entities.
can you tell me if I want the list of intents and entities as api. How to do that???
Luis will have something Like that in training data:
"luis_schema_version": "2.1.0",
"versionId": "0.1",
"name": "Test_LUIS",
"desc": "",
"culture": "en-us",
"intents": [
{
"name": "Greet"
},
{
"name": "Abc"
},
{
"name": "Xyz"
},
{
"name": "Weather"
},
{
"name": "None"
},
],
"entities": [
{
"name": "Location",
"roles": []
},
{
"name": "Weather",
"roles": []
}
This is just an example for you to understand.
It will give the similar list of intents and entities as api also. I want that.
EPedrotti
(Edoardo Pedrotti)
December 21, 2018, 10:32am
2
Hi @Kavita ,
did you already read our migration guide? ?
Let me know if this helps you.
Kavita
(Kavita Aherwar)
December 21, 2018, 1:05pm
3
Hey @EPedrotti ,
I have read the migration guide. Nothing is there about that API.
I have created a flask app and used luis’s training data to generate the API I want.
EPedrotti
(Edoardo Pedrotti)
December 21, 2018, 2:56pm
4
I am not sure what you are asking. Do you want to know if Rasa offers an api to get all the intents?
Kavita
(Kavita Aherwar)
December 26, 2018, 5:08am
5
@EPedrotti Yes. A list of all entities and intents.
1 Like
Hi @Kavita ,
You can do so, by using below code snippet.
from rasa.core.domain import Domain
domain = Domain.load("domain.yml")
print('All intent ',domain.intents)
print('All entities ',domain.entities)
Likewise you can access all other information also…
ashima
(Ashima Gupta)
May 22, 2020, 1:24pm
7
How to get the same from a trained model? What odes domain.yml represent.
It gives a list of intents and entities not relevant to what i trained on.
Was there ever any answer to this? It is very useful to be able to extract this information from the model, and quite frustrating that it is not a bit easier to do so.
It looks like you’re looking for the /domain
endpoint within the Rasa API. This contains lists of intents, entities, slots, responses and actions:
https://rasa.com/docs/rasa/pages/http-api#operation/getDomain
You just need to make sure you run Rasa with --enable-api
if using Rasa Open Source, and add the /core
prefix to the URL if using Rasa X (e.g. http://my-rasa-x/core/domain
).