Where do I get the session_id from?

the docs and website mention using a session_id in the API like:
https://marketplace.conversationalcomponents.com/api/exchange/<component_id>/<session_id>

where do I get the session_id from?
i’m using rasa

1 Like

Hi,

The session_id can be generated be generated by the developer, I recommend to use a random GUID(In python can be generated using the uuid package).

Especially for rasa:
You should use the sender ID which is hold at the tracker object.
We also implemented an SDK which handles it automatically.

Link to the SDK:

Here is the direct refference to the code:

coco_resp = coco.exchange(
    component_name,
    tracker.sender_id,
    user_input=tracker.latest_message.get("text", None),
    context=coco_in_context,
    flatten_context=True
) 

Feel free to ask more questions,
Victor

I saw at the readme file of the repo you posted here that I can just install coco-rasa lib by using pip.
So it means I can use that without cloning the code at the repo, right?

Sure :slight_smile:!