简体   繁体   English

使用 Azure CLI 发布在 Bot 框架 Composer 中创建的 Bot

[英]Publish a Bot created in Bot framework Composer using Azure CLI

I created a bot in Bot framework Composer, it works fine locally and using Bot Framework emulator, and when I publish it using the Composer publish features it works fine.我在 Bot Framework Composer 中创建了一个机器人,它在本地和使用 Bot Framework 模拟器时工作正常,当我使用 Composer 发布功能发布它时它工作正常。 But I need to publish the bot using Azure CLI, I tried following the steps in this doc: https://learn.microsoft.com/en-us/azure/bot-service/provision-and-publish-a-bot?view=azure-bot-service-4.0&tabs=multitenant%2Ccsharp#create-resource-groups但我需要使用 Azure CLI 发布机器人,我尝试按照此文档中的步骤操作: https://learn.microsoft.com/en-us/azure/bot-service/provision-and-publish-a-bot?查看=azure-bot-service-4.0&tabs=multitenant%2Ccsharp#create-resource-groups

I created an app registration, a web app and a bot.我创建了一个应用程序注册、一个 web 应用程序和一个机器人。 but when I try to access the bot using the "web chat" feature in the Azure portal I get error "There was an error sending this message to your bot: HTTP status code NotFound".但是当我尝试使用 Azure 门户中的“网络聊天”功能访问机器人时,出现错误“将此消息发送到您的机器人时出错:HTTP 状态代码 NotFound”。

These are the commands I used to create the resources and publish the bot:这些是我用来创建资源和发布机器人的命令:

Create App registration and secret:创建应用程序注册和秘密:

 az ad app create --display-name "test" --sign-in-audience "AzureADandPersonalMicrosoftAccount" 

 az ad app credential reset --id "<app_id>"

Create Web app:创建 Web 应用程序:

 az deployment group create --resource-group "test" --template-file "C:\..\template-BotApp-with-rg.json" --parameters "@C:\..\parameters-for-template-BotApp-with-rg.json"

Create Azure Bot:创建 Azure 机器人:

 az deployment group create --resource-group "test" --template-file "C:\..\template-AzureBot-with-rg.json" --parameters "@C:\..\parameters-for-template-AzureBot-with-rg.json"

Prepare deployment and publish to Azure bot:准备部署并发布到 Azure 机器人:

 az bot prepare-deploy --lang Csharp --code-dir "C:\" --proj-file-path "C:\..\test.csproj"

 az webapp deployment source config-zip --resource-group "test" --name "test" --src "C:\..\test.zip"

I got the templates files from here: https://github.com/microsoft/botbuilder-do.net/tree/main/generators/do.net-templates/Microsoft.BotFramework.CSharp.EchoBot/content/DeploymentTemplates/DeployUseExistResourceGroup我从这里得到模板文件: https://github.com/microsoft/botbuilder-do.net/tree/main/generators/do.net-templates/Microsoft.BotFramework.CSharp.EchoBot/content/DeploymentTemplates/DeployUseExistResourceGroup

I updated the appsettings.json with AppID and password, and I copied the.sln file to the root folder then zipped the root folder:我用 AppID 和密码更新了 appsettings.json,然后将 .sln 文件复制到根文件夹,然后压缩根文件夹:

  • According to my research there are different way to deploy根据我的研究,有不同的部署方式

在此处输入图像描述

  • As the above picture mansions User-assigned manage will Support Azure bot service C# JavaScript SDKs如上图mansions User-assigned manage will Support Azure bot service C# JavaScript SDKs
  • The single-tenant will support Azure Bot and C# and JavaScript SDKs single-tenant将支持Azure Bot和C#和JavaScript SDKs
  • The Multi-tenant Support Azure Bot Service, all frameworks SDK language, composer the Emulator and Ngok . Multi-tenant支持Azure Bot 服务,所有框架 SDK 语言,编写 Emulator 和 Ngok

-Make sure you are using setting which are used for specific deployment in the document. -确保您使用的设置用于文档中的特定部署。

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

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

相关问题 我无法将对话框发布到 Azure 'TypeError - 无法读取未定义的属性 'AzureSubscriptionId'” [Bot Composer Framework] - I cannot publish Dialog to Azure 'TypeError - Cannot read property 'AzureSubscriptionId' of undefined" [Bot Composer Framework] 我们可以使用 Azure 机器人框架构建自动化机器人吗? - can we build automation bot with Azure bot framework? 在 azure 中发布技能合并机器人后面临 401 问题 - Facing 401 issue after publish a skill merged bot in azure 使用 azure 机器人记录团队会议 - Record team meeting using azure bot 在 MS Bot Composer 中保存用户机器人对话和 Intent - Save user bot conversation along with Intent in MS Bot Composer Bot Composer Web 嵌入安全令牌的聊天? - Bot Composer Web Chat embed with secure token? 如何获取 azure 机器人密码 - How to get the azure bot password Getting Operation 在 Bot Framework 上向 Facebook Azure 通道返回了无效状态代码“BadRequest”错误 - Getting Operation returned an invalid status code 'BadRequest' error on Bot Framework to Facebook Azure channel Azure知识库语言服务如何接入Bot Framework SDK V4 - How to connect Azure Language Service with knowledge base to Bot Framework SDK V4 在不使用 Azure Bot 服务的情况下集成 Microsoft Web Chat - Integrating Microsoft Web Chat without using Azure Bot Service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM