Bot Composer: How to set Property value to dateTime V2 LUIS resolution value in bot composer

Viewed 382

Bot Composer version : V2.1

I am using datetime V2 entity and I have to set property value to datetimeV2 resolution value.Below is the LUIS response

    "query": "May 2nd to May 5th",
    "prediction": {
      "topIntent": "_Interruption",
      "intents": {
        "_Interruption": {
          "score": 0.93898964
        }
      },
      "entities": {
        "datetimeV2": [
          {
            "type": "daterange",
            "values": [
              {
                "timex": "(XXXX-05-02,XXXX-05-05,P3D)",
                "resolution": [
                  {
                    "start": "2021-05-02",
                    "end": "2021-05-05"
                  },
                  {
                    "start": "2022-05-02",
                    "end": "2022-05-05"
                  }
                ]
              }
            ]
          }
        ]
      }
    }
  }
}

composer image

Property value should be set to resoltuion value in datetimeV2 entity.Below setting is not working. =turn.recognized.entities.datetimeV2[0].values[0].resolution[0].start

turn.recognized.entities is only recognizing timex values.

2 Answers

You can configure the following in your dialog (<dialog>.<locale>.lu.dialog, for example mine is Testing.en-us.lu.dialog):

  "predictionOptions": {
    "includeInstanceData":true,
    "includeAPIResults":true
    }

Then you can use something like the following as an expression: turn.recognized.luisResult.prediction.entities.datetimeV2[0].values[0].resolution[0].start

I'm checking to see if there is a simpler way (as far as the expression)

In the newer Composer versions, I was able to find my dialog's respective lu.dialog file here:

[BOT_PROJECT_NAME]\dialogs\[DIALOG_NAME]\recognizers\[DIALOG_NAME].[LOCALE].lu.dialog
Related