如何使用“转到动作”在MS机器人作曲家中?

发布于 2025-01-26 12:57:08 字数 336 浏览 4 评论 0 原文

试图通过“转到行动”动作来管理对话流(对不起重言术)。所有测试都从 *.dialog返回错误调用ID的所有类型的操作。

className:“ system.argumentException”
消息:“ gotoaction:找不到“ cw0raq”的动作。

参考如何外观

我在文档中没有发现任何提及,如何使用此操作,因此,它一定很简单,但是我无法抓住正确的方式。

Trying to manage a conversation flow by "Go to action" action (sorry for tautology). All tests to call all types of actions by ID from *.dialog return error.

ClassName:"System.ArgumentException"
Message:"GotoAction: could not find an action of "cW0raQ"."

How reference looks

I didn't find any mention in the documentation how to work with this action, therefore it must be pretty simple, but I can't catch the correct way.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

撩起发的微风 2025-02-02 12:57:08

通常,回答自己。
查看了他们的回购中的MS测试发现它需要手动创建ID。自动$ designer.id不起作用。

{
  "$kind": "Microsoft.GotoAction",
  "$designer": {
    "id": "uFOn5P"
  },
  "actionId": "targetID"
},
...
{
  "id": "targetID",
  "$kind": "Microsoft.SendActivity",
  "$designer": {
    "id": "oWxpDh",
    "comment": "",
    "name": "GoTo test"
  },
  "activity": "${SendActivity_oWxpDh()}"
}

此外,此操作仅在触发范围内起作用,而不是对话框。

As usually, answer myself.
Had a look at MS tests in their repo https://github.com/microsoft/botbuilder-dotnet/ and found out that it requires creating ID for action manually. Automatic $designer.id doesn't work.

{
  "$kind": "Microsoft.GotoAction",
  "$designer": {
    "id": "uFOn5P"
  },
  "actionId": "targetID"
},
...
{
  "id": "targetID",
  "$kind": "Microsoft.SendActivity",
  "$designer": {
    "id": "oWxpDh",
    "comment": "",
    "name": "GoTo test"
  },
  "activity": "${SendActivity_oWxpDh()}"
}

Moreover, this action works in scope of trigger only, not dialog.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文