【发布时间】:2017-12-19 17:59:40
【问题描述】:
我正在做 api.ai tutorial 的基本实现和对话设置教程来制作聊天机器人,当我尝试使用命令部署该功能时:
gcloud beta functions deploy --stage-bucket venky-bb7c4.appspot.com --trigger-http
(其中 'venky-bb7c4.appspot.com' 是存储桶名称) 它返回以下错误消息:
ERROR: (gcloud.beta.functions.deploy) OperationError: code=3, message=Source code size exceeds the limit
我已经搜索但没有找到任何答案,我不知道错误在哪里。 这是教程中出现的JS文件:
/
HTTP Cloud Function.
@param {Object} req Cloud Function request context.
@param {Object} res Cloud Function response context.
*/
exports.helloHttp = function helloHttp (req, res) {
response = "This is a sample response from your webhook!" //Default response from the webhook to show it's working
res.setHeader('Content-Type', 'application/json'); //Requires application/json MIME type
res.send(JSON.stringify({ "speech": response, "displayText": response
//"speech" is the spoken version of the response, "displayText" is the visual version
}));
};
【问题讨论】:
-
你找到解决办法了吗?
标签: google-cloud-platform google-cloud-storage gcloud google-cloud-functions