"NLG service" endpoint response from external model

Currently in the docs, it says that if you expose an external server for NLG, the response back needs to be formatted in this way:

{ “text”: “hey there”, “buttons”: [], “image”: null, “elements”: [], “attachments”: [] }

Is there a way to send a response back from the NLG model that triggers a custom action or a an action in the domain file… For example, if the intent for a user response is over a certain threshold —> do not produce nlg response --> consider intent/entity classification response from “what ever nlu pipeline used”

Thank you for your help, please let me know if I should elaborate … Fyi I am using rasa core 11.2 but am more than willing to hear out answers for newer verisons. Just want a guide before I dive into the source code

Currently using the rasa.agent as a workaround/hack… there should be a better way to compare multimodel outputs before responding with an utterance

Still looking for a solution… if I connect an NLG model to the bot engine, it automatically query’s it for all responses and feeds it all user uttertances. I would like to have a switch that only considers NLG for specifics intents/actions that I can turn off and on.