To use metadata with the input channel, you currently have to overwrite several functions in the RestInputChannel (e.g. receive, stream_response, on_message_wrapper).
Potential Solution:
get_metadata(request) which returns None by default, and can be overwritten to return a dict of metadatastream_response, on_message_wrapper should pass on a potential metadata object to UserMessage by default https://github.com/RasaHQ/rasa/blob/master/rasa/core/channels/channel.py#L398
@wochinge is that description good enough?
@akelad Changed it a bit
would be good if all the supported channels did this by default also
would be good if all the supported channels did this by default also
Can you clarify that for me?
e.g. here
https://github.com/RasaHQ/rasa/blob/master/rasa/core/channels/facebook.py#L104
it should pass along metadata -- I think maybe by default just the entire payload that comes in with the response, or something like that. So that any information facebook sends to the endpoint gets through to actions and people can do what they want with it
Thanks!
I think maybe by default just the entire payload that comes in with the response, or something like that.
In my opinion that's too much guessing. It would add a lot of overhead for certain channels to the tracker which is only required by a small subset of people. Hence, I'd prefer if we rather clarify how to quickly extend an input channel to get the required information.
Most helpful comment
would be good if all the supported channels did this by default also