BESSER-Bot-Framework icon indicating copy to clipboard operation
BESSER-Bot-Framework copied to clipboard

Matched parameters' values are always strings

Open mgv99 opened this issue 1 year ago • 0 comments

When getting the value of a matched parameter in a state body, e.g. temperature = predicted_intent.get_parameter('temperature').value we always obtain a str object, therefore, we cannot do if temperature > 0, since it is a string object. We can simply cast the object to its proper type, but it adds complexity to the body of the state. We could implement a flexible type value, at least for the following basic types:

  • [ ] str
  • [ ] int
  • [ ] float
  • [ ] datetime
  • [ ] bool (can a user actually write a bool value in a message?)

mgv99 avatar Oct 05 '23 15:10 mgv99