jeremyandrews / kakaia

Kakaia personal assistant
MIT License
13 stars 0 forks source link

add temperature conversion command #22

Closed jeremyandrews closed 4 years ago

jeremyandrews commented 4 years ago

Add a simple temperature conversion command.

For example:

While Fahrenheit and Celsius are the most useful, it would be fun to include Kelvin as well.

The server-side math is simple: https://www.wikihow.com/Convert-Between-Fahrenheit,-Celsius,-and-Kelvin

jeremyandrews commented 4 years ago

The temperature entity should simplify creating this command:

jeremyandrews commented 4 years ago

The command is now implemented:

$ curl --data @test/convert-temperature.base64 http://127.0.0.1:8088/convert/audio/text
{"command":"convertTemperature","human":"5 degrees celsius is 41 degrees fahrenheit","raw":"convert five degrees celsius to farnie","result":41.0}