简体   繁体   English

IBM Watson Assistant:通过IBM Cloud Functions检索特定的对话

[英]IBM Watson Assistant: Retrieve a specific conversation via IBM Cloud Functions

How can I extract a specific user conversation from all chat logs? 如何从所有聊天记录中提取特定的用户对话? I noticed that the chat-log JSON response contains a field named conversation-id . 我注意到chat-log JSON响应包含一个名为conversation-id的字段。
My goal is to obtain, via Cloud Function, that specific conversation id for the current conversation. 我的目标是通过Cloud Function获取当前对话的特定对话ID。 So, when the conversation starts how can I retrieve the current conversation id? 因此,当对话开始时,如何获取当前对话ID?

The answer is similar to this one : You can access context variables using either context[variableName] or $variableName . 答案与相似:您可以使用context[variableName]$variableName访问上下文$variableName See the documentation on expressions for accessing objects in IBM Watson Assistant . 请参阅有关IBM Watson Assistant中用于访问对象的表达式文档

The conversation_id is in the set of context variables ( context.conversation_id ). session_id在上下文变量( context.conversation_id )的集合中。 You can access it as part of that structure. 您可以将其作为该结构的一部分进行访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM