Python에서 dialogflow에서 이벤트를 트리거하는 방법은 인 텐트 API를 감지합니다. 채팅 창을 시작하자마자 환영 의도를 트리거하고 싶습니다.
에 대한 호출에 대한 쿼리 입력의 일부로 "WELCOME"이벤트를 보내야합니다 detect_intent()
. 다음과 같이 보일 수 있습니다.
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)
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다