Can slot save JSON

I intended to get a JSON from user and save it to slot. Is it possible in RASA ?

For eg, the core was expecting the slot value to be given. The User gave {“property”:[“Sites”],“report_type”:[“All”]}

Though the intent was recognized properly, it was not extracting the entity for this. I do not have this issue for other slots which store just text.

I want to know whether it is possible to accept a json from user and save it as a slot. could you please help ?

Hi Siva, welcome to the forum.

The best and easiest way to achieve exactly what you’re describing is to use a custom action to fill the the slot. Why do you want to have a slot set to a json though? There might be another way for rasa to achieve your end goal without having a user enter actual code.

I don’t think ner_crf is the right extractor for extracting JSON out of your input. You will need to write your own extractor. Although, like @imLew said, there’s probably a better way for user to give this information.

What exactly do you expect the user to say?

Thank you. The input json is the requestBody of multiple APIs. Hence what user provides should be used as is.

Thank you Akshay. as updated, I expect user to give the reqBody of multiple APIs. so there is no solid format except that it is a json.

can you please give an example in RASA with custom extraction ?

You will have to write the extraction logic on your own. Here’s the documentation of how to create an NLU component that you can embed this logic into. Custom NLU Components

Thank you Akshay