Microsoft Teams AI 聊天机器人中的表情符号反馈

问题描述 投票:0回答:1

我有一个生成式法学硕士,我通过 REST API 与其进行交流。我没有使用任何本机 OpenAI 或 Azure 对象来利用 AI Bot Framework 中提供的enable_feedback_loop。

我四处寻找一些视频和设置,但找不到实现以下功能的方法:

  1. 对于机器人返回的每条消息,允许用户对两个不同的表情符号做出反应。 (👍,👎)
  2. 单击这些表情符号后,打开一个文本窗口,允许用户输入有关响应的反馈。

我仅通过 AI Bot Framework 中的enable_feedback_loop 参数看到此功能,但我无法使用此功能,因为我的生成模型是在外部托管的。

python botframework
1个回答
0
投票

我只是在自适应卡内发送消息,操作类型设置为 Action.ShowCard,单击后会展开并允许输入消息,然后提交,

{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.5",
"body": [
    {
        "type": "TextBlock",
        "size": "Medium",
        "weight": "Bolder",
        "text": "Message title",
        "horizontalAlignment": "Center",
        "wrap": true,
        "style": "heading"
    },
    {
        "type": "Input.Text",
        "label": "Label",
        "isMultiline": true,
        "id": "MultiLineVal",
        "placeholder": "Message content ..."
    },
    {
        "type": "TextBlock",
        "size": "Medium",
        "weight": "Bolder",
        "text": "Feedback",
        "horizontalAlignment": "Center",
        "wrap": true,
        "style": "heading"
    }
],
"actions": [
    {
        "type": "Action.ShowCard",
        "title": "👍",
        "card": {
            "type": "AdaptiveCard",
            "body": [
                {
                    "type": "Input.Text",
                    "label": "Enter comment",
                    "id": "CommentVal"
                }
            ],
            "actions": [
                {
                    "type": "Action.Submit",
                    "title": "OK"
                }
            ]
        }
    },
    {
        "type": "Action.ShowCard",
        "title": "👎",
        "card": {
            "type": "AdaptiveCard",
            "body": [
                {
                    "type": "Input.Text",
                    "label": "Enter comment",
                    "id": "CommentVal"
                }
            ],
            "actions": [
                {
                    "type": "Action.Submit",
                    "title": "OK"
                }
            ]
        }
    }
]}

卡片预览图片

© www.soinside.com 2019 - 2024. All rights reserved.