dialogflow-java-client icon indicating copy to clipboard operation
dialogflow-java-client copied to clipboard

Entity @sys.duration returns inconsistent Json structure for quarters

Open awal11 opened this issue 8 years ago • 0 comments

For input "1 quarter" entity @sys.duration returns "duration": "1 quarter" instead of expected:

 "duration": {
        "amount": 1,
        "unit": "q"
      }

This is the only unit I noticed that behaves that way.

Following this topic - the supported units are not documented anywhere (was asked before on: https://discuss.api.ai/t/what-are-legal-sys-duration-units/4020 ) so I have enumerated there what I found.

  1. Would you accept a patch to ai.api.util.ParametersConverter class that adds the duration parsing functionality?
  2. What should it return? java.time.Duration?

awal11 avatar Jun 02 '17 10:06 awal11