如何将客户令牌传递到 IBM Watson Assistant

How to passg customer token into IBM Watson Assistant

我想在使用 nodejs 在 watson assistant v2 中创建的每个会话中使用各种字段,例如客户令牌、客户 ID 等。

我可以直接在 createSession 函数中传递它,还是需要创建一个实体或意图才能将其传递到 Watson Assistant 中?

您需要将它与消息一起传递到您要使用它的地方。请参阅 message API function. This could be the first message. The context usually stays unchanged until you overwrite the values or delete the context variable.

中的 context 参数