What is correct way to get response having -custom and -text (from domain.yml) field appear together in json format when performing rest call? Or there is other way to achieve the same

Currently i have a response in domain.yml which looks like

 utter_greet:
 - text: Hey! I am bot, a Systems bot!
   custom:
      type: input
      reply-format: text

when i pass this response using rest call (POST : http://localhost:5005/webhooks/rest/webhook), this is what i receive at UI end:

[
  {
    'recipient_id': 'rasa',
    'text': 'Hi! I am bot, a Systems bot!'
  },
  {
    'recipient_id': 'rasa',
    'custom': {
      'reply-format': 'text',
      'type': 'input'
    }
  }
]

As u can see getting two different tags , not in single one.

What i want to achieve is like:

[
  {
    'recipient_id': 'rasa',
    'text': 'Hi! I am bot, a Systems bot!'
    'custom': {
      'reply-format': 'text',
      'type': 'input'
    }
  }
]

Is there any way using custom action/connector to achieve the same where -text and -custom both can appear in rest call json?? Thanks for the help in advance!!

Hi @SuyashJain, I’m facing the same problem. Did you find the solution?

Hi,I got a easy method to handle similar problem.
I treat rasa as nlu server only, so the request way like this:
client <–> sever<–>rasa
rasa nlu server only get questions and response.Then,you can custom the response format,and your server can do action by yourself way.It’s no need to use rasa action server ,also.
The way I used have been used by milions of users in China.It works well and easy to expand

the server api made by myself like this: It just do request rasa (rest and model parsing) and refactoring message format.