[英]How can I trigger dialogflow event from detect intent API?
How can trigger event in dialogflow from python detect intent API.如何从 python 检测意图 API 在对话流中触发事件。 I want to trigger welcome intent as soon as I start my chat window.
我想在启动聊天窗口后立即触发欢迎意图。
You'll need to send the "WELCOME" Event as part of the query input to the call to detect_intent()
.您需要将“WELCOME”事件作为查询输入的一部分发送到调用
detect_intent()
。 It might look something like this它可能看起来像这样
import dialogflow
client = dialogflow.SessionsClient()
session = client.session_path('[PROJECT]', '[SESSION]')
event_input = dialogflow.types.EventInput(name='WELCOME', language_code='en-US')
query_input = dialogflow.types.QueryInput(event=event_input)
response = client.detect_intent(session=session, query_input=query_input)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.