Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Entity @sys.duration returns inconsistent Json structure for quarters #21

Open
awal11 opened this issue Jun 2, 2017 · 0 comments
Open

Comments

@awal11
Copy link

awal11 commented Jun 2, 2017

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?
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant