dialogflow

How to make a http request to other service in dialogflow fulfillment without firebase?

吃可爱长大的小学妹 提交于 2020-04-18 17:02:49
问题 I wrote a node.js fulfillment code to send my messages from Dialogflow to another services (in this code, it is postman) by simply using the http.request function. "use strict"; const express = require("express"); const bodyParser = require("body-parser"); const https = require('https'); const app = express(); app.use( bodyParser.urlencoded({ extended: true }) ); app.use(bodyParser.json()) app.post("/echo", function(req, res) { var speech = req.body.queryResult && req.body.queryResult

How to make a http request to other service in dialogflow fulfillment without firebase?

感情迁移 提交于 2020-04-18 17:00:32
问题 I wrote a node.js fulfillment code to send my messages from Dialogflow to another services (in this code, it is postman) by simply using the http.request function. "use strict"; const express = require("express"); const bodyParser = require("body-parser"); const https = require('https'); const app = express(); app.use( bodyParser.urlencoded({ extended: true }) ); app.use(bodyParser.json()) app.post("/echo", function(req, res) { var speech = req.body.queryResult && req.body.queryResult

Is their any limit on number of followup event triggered in api.ai?

人走茶凉 提交于 2020-04-18 08:41:18
问题 I am trying to solve the dialog flow 5 sec response time limit for my case using multiple followup events. After the user input, the bot has to fetch some data using an api, which is currently taking around 20-25 sec. This is my python webhook code: def makeWebhookResult(req): flag = 0 if req.get("queryResult").get("action")=="status": time.sleep(3.5) if flag == 0: return{ "followupEventInput": { "name": "ContinueEvent1", "parameters": { "Status":"201" } } } else: return{ "fulfillmentText":

Why rich message created in dialogflow wouldn't appear in a bot tested on Slack?

狂风中的少年 提交于 2020-04-18 05:46:16
问题 I created two answers for the Default Welcome Intent. One in the default one and the other as a text response which shows up in Slack and the other one using Slack as a channel of my bot, clicking on Add Response to start creating responses just for Slack using Dialogflows UI. The second is the following, a default template for polling from the docs: { "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "*Where should we order lunch from?* Poll by <fakeLink.toUser.com|Mark>"

403 IAM permission 'dialogflow.sessions.detectIntent' on 'projects/None/agent' denied. with flask

十年热恋 提交于 2020-04-17 22:51:47
问题 in /send_message fulfillment_text = detect_intent_texts(project_id,, message, 'en') what should be passed as 2nd argument. # /index.py from flask import Flask, request, jsonify, render_template import os import dialogflow import requests import json import pusher import tryy pusher_client = pusher.Pusher( app_id=os.getenv('PUSHER_APP_ID'), key=os.getenv('PUSHER_KEY'), secret=os.getenv('PUSHER_SECRET'), cluster=os.getenv('PUSHER_CLUSTER'), ssl=True) final = [] app = Flask(__name__) @app.route(

Trigger intent after bot response

◇◆丶佛笑我妖孽 提交于 2020-04-17 22:16:46
问题 The dialogflow fulfillment code sample can return response in intent as follow. function welcome(agent) { agent.add(`Welcome to agent!`); } Suppose that I want to trigger another intent name "faq" right after that without any user input . How can it be done? I am expecting something as follow but could not find any documentation. function welcome(agent) { agent.add(`Welcome to agent!`); agent.triggerIntent('faq'); } I look at the custom event documentation but still unable get the idea to

Trigger intent after bot response

人盡茶涼 提交于 2020-04-17 22:15:09
问题 The dialogflow fulfillment code sample can return response in intent as follow. function welcome(agent) { agent.add(`Welcome to agent!`); } Suppose that I want to trigger another intent name "faq" right after that without any user input . How can it be done? I am expecting something as follow but could not find any documentation. function welcome(agent) { agent.add(`Welcome to agent!`); agent.triggerIntent('faq'); } I look at the custom event documentation but still unable get the idea to

How to connect Dialogflow to Cloud Firestore via the Inline Editor in Dialogflow?

孤街醉人 提交于 2020-04-11 02:14:11
问题 I have a Cloud Firestore database that stores the number of inhabitants of all cities in England in 2017. Then I have a Dialogflow. Whenever I tell the name of a city to Dialogflow, I want it to get the number of inhabitants in that city from Firestore and return it to Dialogflow. Specifically, I want to implement this via the Inline Editor. Question : What lines of code do I need to add to the code below in order to make this happen? So here is the code that I write in the Inline Editor in

How to extend the limit for reply from telegram bot and what is the limit of reply from telegram bot?[i am using dialogflow integration]

强颜欢笑 提交于 2020-03-26 03:35:45
问题 I was using dialogflow integration to create bot for telegram.I am getting replies from bot for small queries but i am not getting replies from the bot for larger multi-line answers expected from the bot. 回答1: Telegram has a limit when sending message of 4096 chars, are your answers longer than this? 400 BAD_REQUEST MESSAGE_TOO_LONG Message was too long. Current maximum length is 4096 UTF8 characters [See documentation] 来源: https://stackoverflow.com/questions/55672791/how-to-extend-the-limit

How to extend the limit for reply from telegram bot and what is the limit of reply from telegram bot?[i am using dialogflow integration]

坚强是说给别人听的谎言 提交于 2020-03-26 03:34:40
问题 I was using dialogflow integration to create bot for telegram.I am getting replies from bot for small queries but i am not getting replies from the bot for larger multi-line answers expected from the bot. 回答1: Telegram has a limit when sending message of 4096 chars, are your answers longer than this? 400 BAD_REQUEST MESSAGE_TOO_LONG Message was too long. Current maximum length is 4096 UTF8 characters [See documentation] 来源: https://stackoverflow.com/questions/55672791/how-to-extend-the-limit