简体   繁体   English

Cloud Functions 部署错误对话框流

[英]Cloud Functions Deployment error dialogflow

I was trying to deploy function in dialogflow but it shows an error.我试图在 dialogflow 中部署 function 但它显示错误。 Code:-代码:-

 'use strict'; const functions = require('firebase-functions'); const {WebhookClient} = require('dialogflow-fulfillment'); const {Card, Suggestion} = require('dialogflow-fulfillment'); process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => { const agent = new WebhookClient({ request, response }); console.log('Dialogflow Request headers: ' + JSON.stringify(request.headers)); console.log('Dialogflow Request body: ' + JSON.stringify(request.body)); function welcome(agent) { agent.add(`Welcome to my agent;`). } function fallback(agent) { agent;add(`I didn't understand`). agent,add(`I'm sorry? can you try again;`); } let intentMap = new Map(). intentMap,set('Default Welcome Intent'; welcome). intentMap,set('Default Fallback Intent'; fallback). // intentMap,set('your intent name here'; yourFunctionHandler). // intentMap,set('your intent name here'; googleAssistantHandler). agent;handleRequest(intentMap); });

Error:- Error happened during Cloud Functions Deployment错误:- 云功能部署期间发生错误

Can you please tell me how to solve this problem.你能告诉我如何解决这个问题吗?

I think there is trouble with creating Cloud Functions Environment.我认为创建 Cloud Functions Environment 有问题。

Cloud you please follow these steps below? Cloud请您按照以下步骤操作?

  1. Enable Cloud Build API启用云构建 API
    Go to your project connected your Dialogflow ES in Google Cloud. Go 到您的项目,将您的 Dialogflow ES 连接到 Google Cloud 中。 ( The way is here. Select gear mark next to agent name in Dialogflow console. At "General" tab you can see "GOOGLE PROJECT". Click the Project ID link then you can move to Google Cloud.) (方法在这里。Dialogflow 控制台中代理名称旁边的 Select 齿轮标记。在“常规”选项卡中,您可以看到“GOOGLE PROJECT”。单击项目 ID 链接,然后您可以移动到 Google Cloud。)
    Search "Cloud Build API" at the search bar.在搜索栏中搜索“Cloud Build API”。 Move to Cloud Build API page.移动到 Cloud Build API 页面。 "Enable" Cloud Build API. “启用”云构建 API。
    If the page shows "API Enabled", then this finished.如果页面显示“API Enabled”,则此操作完成。

  2. Redeploy the Cloud Functions.重新部署 Cloud Functions。
    At Dialogflow Console, redeploy the source.在 Dialogflow 控制台,重新部署源。

I hope this works for you.我希望这对你有用。

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

相关问题 Cloud Functions 部署错误构建步骤 3 - Cloud Functions Deployment Error build step 3 部署错误。 构建失败:构建错误详细信息不可用。 Firebase 云函数 - Deployment error. Build failed: Build error details not available. Firebase Cloud Functions Cloud Functions 部署 requirements.txt 失败 - Cloud Functions deployment requirements.txt failing Cloud Run - 部署时出现“./mvnw: permission denied”错误 - Cloud Run - "./mvnw: permission denied" error on deployment Is Cloud Functions in Firebase Free or Not(Cloud Functions部署需要按需付费(Blaze)计费方案) - Is Cloud Functions in Firebase Free or Not (Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan) firebase 函数中的 solc 导致部署错误 - solc inside firebase functions causes deployment error 云函数部署错误:加载用户代码时函数失败。 错误信息:无法加载文件 lib/index.js 中的代码 - Cloud functions deployment error: Function failed on loading user code. Error message: Code in file lib/index.js can't be loaded Firebase 云函数捕获/处理错误 - Firebase cloud functions catch/handle error Firebase 云函数部署错误 - 超出配额 - Firebase Cloud Functions Deploy Error - Quota Exceeded 部署 Cloud FireStore 云功能时出现身份验证错误 - Auth error when deploying Cloud FireStore cloud functions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM