How to extract a predicted template name in the channel

I try to extract the template_name in the channel.

await on_new_message( UserMessage( text, out, sender_id, input_channel=input_channel, metadata=metadata, ) ) out.messages → returns the id and responses text. How can I extract the template_name(responses_name) from this?

I tried to extract it from events but It is not the ideal solution…very error prone