dialogflow

How to add parameters to Dialogflow event in python

主宰稳场 提交于 2019-12-12 12:50:35
问题 I'm trying to send an EventInput using python dialogflow client v2 (https://dialogflow.com/docs/reference/api-v2/rest/v2beta1/projects.agent.sessions/detectIntent#eventinput) but couldn't set parameters. Setting it to an object like {"result_guid": "49A8608C-4854-4964-81C3-0A75F912B994"} returns an error ValueError: Protocol message Struct has no "result_guid" field. How can this be solved? 回答1: found the solution. parameters needs to be a google.protobuf.Struct so something like below works

Why does Dialogflow nodejs sdk “detect Intent with Knowledge Base” method responds with null ? ( V2Beta)

时光总嘲笑我的痴心妄想 提交于 2019-12-12 12:08:51
问题 I am integrating the Dialogflow Nodejs sdk into my application to detect the knowledge base intent with the help of the following document nodejs-dialoglowflow-detect-knowledgebase-intent. Below is my query request const request = { session: sessionPath, queryInput: { text: { // The query to send to the dialogflow agent text: message, // The language used by the client (en-US) languageCode: 'en-US', }, }, queryParams: { knowledgeBaseNames: ['projects/my-project-id/knowledgeBases/my-knowledge

Using HTTP Request for Google Dialogflow

不想你离开。 提交于 2019-12-12 11:15:18
问题 https://api.dialogflow.com/v1/query?v=20150910&contexts=shop&lang=en&query=apple&sessionId=12345&timezone=America/New_York Headers: Authorization: Bearer YOUR_CLIENT_ACCESS_TOKEN How do i use the above code to make a HTTP Request in Google Dialogflow? How do i add headers as a part of HTTP request 回答1: You can use the Postman application for sending POST request, Select Post request in Postman Application, Copy and paste URL https://api.dialogflow.com/v1/query?v=20150910&contexts=shop&lang=en

Cannot Read Context in Dialogflow Fulfillment (Suddenly Undefined)

坚强是说给别人听的谎言 提交于 2019-12-12 11:06:41
问题 We built a Dialogflow agent using google cloud functions as webhook which worked properly until yesterday evening. At that time I exported the agent and reimported it later on and it worked for a while. What stopped working is that agent.context.get('...'); (also agent.getContext('...') ) does return undefined even if the context is set according to the UI and raw API response. As an example I have an intent which has a required slot shop , webhook for slot filling enabled. When I test the

How to connect webhook of my local to dialogflow?

こ雲淡風輕ζ 提交于 2019-12-12 11:04:04
问题 I have a question about webhook connect. I edited usually by inline editor of dialogflow. But now I want to edit in my local. So I did some setting watching two examples. https://chatbotsmagazine.com/creating-nodejs-webhook-for-dialogflow-2b050f76cd75 https://github.com/dialogflow/fulfillment-temperature-converter-nodejs [1] I made file, (1) Users/a/firebase.js (2) Users/a/functions/index.js (with package module) (3) webhook server by ngrok. (4) I attached this link 'https://ngrok~~/webhook'

Permission response not handled correctly

拥有回忆 提交于 2019-12-12 04:54:43
问题 Following this command in node.js using the ApiAiApp module: app.askForPermission('To know what day it is where you are', app.SupportedPermissions.DEVICE_PRECISE_LOCATION); I get the following in the Actions on Google Simulator. It correctly prompts for my response, but then is confused and doesn't recognize my answer! Is there something missing or broken in my API.AI agent? After the askForPermission , there are no other fulfillment calls. 回答1: The problem is likely that you need to set an

Connecting Google Home via webhook to node.js

非 Y 不嫁゛ 提交于 2019-12-12 03:35:57
问题 Im following this article: https://medium.com/google-cloud/how-to-create-a-custom-private-google-home-action-260e2c512fc and I get this when I run npm start in my folder on my mac for testing I get this: Marcios-MacBook-Pro:webhook mars$ npm start > your-action-app@0.0.1 start /Users/mars/Downloads/webhook > functions deploy yourAction --trigger-http sh: functions: command not found npm ERR! Darwin 16.4.0 npm ERR! argv "/usr/local/Cellar/node/7.8.0/bin/node" "/usr/local/bin/npm" "start" npm

How to expire context lifespan on specific user input - api.ai

徘徊边缘 提交于 2019-12-12 03:27:48
问题 i'm working with api.ai and stuck on a point i want to expire lifespan of a context on a specific user input how to expire context lifespan on specific user input Api.ai any one please tell me solution since i'm unable to find it in documentation of api.ai 回答1: You can "reset" the context by setting the output context's lifetime to 0 as described on this page: https://docs.api.ai/docs/concept-contexts 来源: https://stackoverflow.com/questions/43146087/how-to-expire-context-lifespan-on-specific

DialogFlow StreamingDetectIntentResponse doesn't return ResponseId, QueryText, Transcript or anything except LanguageCode

笑着哭i 提交于 2019-12-12 01:19:07
问题 I have successfully used Grpc in Unity and sent request to Dialog flow and received response. You can check the details here However the whole returned result is the following only { "queryResult": { "languageCode": "ja" } } The expected response id, query text, etc are not returned. When testing in console.dialogflow.com I get the following result { "responseId": "cdf8003e-6599-4a28-9314-f4462c36e21b", "queryResult": { "queryText": "おはようございます", "speechRecognitionConfidence": 0.92638445,

How to make request query to DialogFlow using V2 API?

我只是一个虾纸丫 提交于 2019-12-11 19:03:52
问题 I was using V1 API to make requests for a while. I am looking to upgrade from V1 to V2 API. I am using this python code to make requests: import os.path import sys import json try: import apiai except ImportError: sys.path.append( os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir) ) import apiai #CLIENT_ACCESS_TOKEN = 'client access token' def main(): try: ai = apiai.ApiAI(CLIENT_ACCESS_TOKEN) request = ai.text_request() request.lang = 'en' # optional, default value equal