Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulator transcript replay does not match OBI spec #2319

Open
chrimc62 opened this issue Nov 10, 2021 · 0 comments
Open

Emulator transcript replay does not match OBI spec #2319

chrimc62 opened this issue Nov 10, 2021 · 0 comments

Comments

@chrimc62
Copy link
Contributor

chrimc62 commented Nov 10, 2021

The OBI spec is here: https://github.com/microsoft/botframework-obi/blob/main/fileformats/transcript/transcript.md

Matching the spec is important to be able to replay transcripts from other sources like PVA.

  1. According to the spec a .transcript file should either be a list of activities or an object with a transcript field that is a list of activities. The emulator saves the transcript as an array, but cannot handle a transcript that is an object.

  2. According to the spec recipient is optional and should be dropped when an activity is not sent to a specific recipient. If you remove the recipient field in the trace activity below and save the transcript you will not see anything if you open it in the emulator. If you remove the trace from field the transcript will still work--even though the from is required.

[
    {
        "type": "trace",
        "channelId": null,
        "from": {
            "id": "61fa1c70-41b5-11ec-bf9e-097f4b8a71ac",
            "name": "Bot",
            "role": 0
        },
        "recipient": {
            "id": "07a6a1dd-e0b3-4ce5-b636-1127cd19124a",
            "role": 1
        },
        "locale": "en-US",
        "label": "Bot State",
        "valueType": "botState",
        "value": {
            "something": "foo"
        }
    },
    {
        "type": "message",
        "channelId": null,
        "from": {
            "id": "61fa1c70-41b5-11ec-bf9e-097f4b8a71ac",
            "name": "Bot",
            "role": 0
        },
        "conversation": {
            "id": "61fa91a0-41b5-11ec-8481-050b7a8a6e92|livechat"
        },
        "recipient": {
            "id": "07a6a1dd-e0b3-4ce5-b636-1127cd19124a",
            "role": 1
        },
        "locale": "en-US",
        "text": "\r\nRequired properties include: name, bread, meat, cheese, toppings, sauces, price\r\nOptional properties include: quantity, length\r\n\r\nFor each property you can add/remove values, clear, show, change or ask for help.\r\nYou can also ask for over all help, cancel the whole form or skip a step.",
        "speak": "<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'><voice name='en-US-JennyNeural'>\r\nRequired properties include: name, bread, meat, cheese, toppings, sauces, price\r\nOptional properties include: quantity, length\r\n\r\nFor each property you can add/remove values, clear, show, change or ask for help.\r\nYou can also ask for over all help, cancel the whole form or skip a step.</voice></speak>",
        "replyToId": "6208e980-41b5-11ec-8481-050b7a8a6e92",
        "id": "639f19e0-41b5-11ec-8481-050b7a8a6e92",
        "localTimestamp": "2021-11-09T15:33:05-08:00",
        "timestamp": "2021-11-09T23:33:05.790Z"
    }
]
  1. The rendering of images in the emulator is not correct.
    This URL: https://virtualagent-resource.hpcloud.hp.com/answer-resources/images/20181108194952_Note.JPG
    Looks like this:

image

But renders in emulator like this:

image

``` { "id": null, "type": "message", "timestamp": 1619528579, "from": { "id": "7e3c3afd-c505-2e2a-a3b0-1900e166f3b9", "role": 0 }, "channelId": "directline", "text": "**Restart the router and printer**\n\nRestart the router and printer to resolve any connectivity error states.\n\n![](https://virtualagent-resource.hpcloud.hp.com/answer-resources/images/20181108194952_Note.JPG)Complete any tasks or downloads in progress before performing these steps, and bookmark this page to keep troubleshooting if wireless issues persist.\n\n1. Turn off the router by pressing the power button or disconnecting the power cord.\n \n2. Turn off the printer and make sure any USB or Ethernet cables are not connected.\n \n\n![](https://virtualagent-resource.hpcloud.hp.com/answer-resources/images/20181108195023_Note.JPG)If the printer is connected with a USB or Ethernet cable, the printer cannot connect wirelessly.\n\n3. Reconnect the power cord to the router or turn it back on, then wait for the Internet activity light to display a normal connected status.\n \n4. Turn on the printer, then try to print.", "attachments": [], "speak": "**Restart the router and printer**\n\nRestart the router and printer to resolve any connectivity error states.\n\n![](https://virtualagent-resource.hpcloud.hp.com/answer-resources/images/20181108194952_Note.JPG)Complete any tasks or downloads in progress before performing these steps, and bookmark this page to keep troubleshooting if wireless issues persist.\n\n1. Turn off the router by pressing the power button or disconnecting the power cord.\n \n2. Turn off the printer and make sure any USB or Ethernet cables are not connected.\n \n\n![](https://virtualagent-resource.hpcloud.hp.com/answer-resources/images/20181108195023_Note.JPG)If the printer is connected with a USB or Ethernet cable, the printer cannot connect wirelessly.\n\n3. Reconnect the power cord to the router or turn it back on, then wait for the Internet activity light to display a normal connected status.\n \n4. Turn on the printer, then try to print." }, ```
@chrimc62 chrimc62 changed the title Trace activities require a recipient property in order to replay a transcript Emulator transcript replay does not match OBI spec Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant