Get sender_id/conversation_id in pipeline custom component

Hello I am trying to get the conversation ID in the pipeline. I cannot use the tracker. I have also tried to use the lock and lock_store. Unfortunately it does not work. Does anyone have any idea?

What type of component are you writing? You could create a custom channel that stores the id in an entity.

Okay and how should I get the entity in the pipeline? There you can get only the entities for the current message.

You could do this in a custom channel

Okay I will try. Do you know any good example for a custom channel?

The source code for all the channels is here. I assume you would want either the REST or Socketio channel depending on your preference.

In the REST channel, you might want to append the sender_id to the text value here. If you prefer sockets, you could modify the code here.

I’m not sure what your intent is but maybe you append it to the end of each message and then your component can process and remove it before sending it on?

Thats a good idea.

And how can I build this in a custom component? I thought that I can’t use rasa.core in a pipeline component.

Your question was how to get the sender_id in the pipeline which I answered above. I don’t understand your use case.