How to add intent and entites from rasa x api

I want to add training data in bulk. I have intent with sample utterances and entities. How to add? Example: { intent: ‘SAMPLE’, utterances: [‘sam’, ‘ple’, ‘sapmle’, etc…], entities: [] }

You could use the following Rasa X API by providing the training examples in JSON format:

If you want to stick with YAML, you can always connect your Rasa X instance to a Git repo and modify the yml files locally then push to the repository and they will also update on Rasa X.

Thank you for your reply. I want to add from API, not from git. I have seen the endpoint https://api/projects/{project_id}/training_examples. But I have sample data. I don’t know how to send data, like params id, hash, intent_mapped_to, start, end, and entity_synonym

What they are saying

{ “rasa_nlu_data”: { “common_examples”: [ { “id”: “string”, “text”: “string”, “intent”: “string”, “entities”: [ { “start”: “string”, “end”: “string”, “entity”: “string”, “value”: “string”, “entity_synonym”: 0 } ], “hash”: “string”, “intent_mapped_to”: “string” } ] } }

But I have data like this

{ “rasa_nlu_data”: { “common_examples”: [ { “text”: “sample”, “intent”: “SAMPLE_INTENT”, “entities”: [ { “entity”: “string”, “value”: “string”, } ] } ] } }

Please help me how to send data

The start and end attributes on each entity are the character indices at which the entity occurs within the text. For example, in “I went to New York” the entity is New York and the start and end indices are 10 and 17 respectively.

Entity synonyms are described here:

For id and hash, you might try leaving those blank and seeing if the application will auto generate them. Otherwise, they should just be globally unique IDs.

I’m not sure about intent_mapped_to, although the documentation states the following:

Name of the intent which the intent is mapped to. If the intent is a temporary one, it has to be mapped to an existing one to be part of the training. If its value is null it deletes existing mappings.

It seems to be only for transient intents, so if you don’t plan to use that feature it’ll be okay to leave as null. You just need to make sure that the intent is present in the domain.yml file.

thank you for information