leon-ai / leon

🧠 Leon is your open-source personal assistant.
https://getleon.ai
MIT License
15.24k stars 1.25k forks source link

Forecast/weather package #43

Open Thibaud-A opened 5 years ago

Thibaud-A commented 5 years ago

Feature Use Case

Give informations about weather

# Example
--> Leon, how's the weather ?
<-- I'm searching weather for Rouen
    Today, clear sky, the temperature at Rouen 18°C
    Weather will remain stable

Feature Proposal

Implement a weather package which give information about the weather using external API like openweathermap. We can also use external IP geolocalisation, like that we can avoid asking the localisation.

louistiti commented 5 years ago

✨ Forecast Package

louistiti commented 5 years ago

Hello @Thibaud-A,

Thanks for your suggestion. Better to wait for the NLU improvement before creating this module.

I added it to the roadmap 😉

Thibaud-A commented 5 years ago

Hello @louistiti ,

Ok thanks ! I already did a little POC using openweathermap for the weather forecast and ipstack for the ip geolocalisation. If someone have better API don't hesitate to suggest me. In any case, I'll wait the NLU improvement before converting this POC in a real package.

louistiti commented 5 years ago

Awesome!

I'm looking forward to see your contribution later on then 👍

ethinallen commented 5 years ago

I can write something for this Sunday using the Dark Sky API; the pricing plan seems to be a lot cheaper than openweathermap (the first 1000 api calls are free and $0.0001 / call after that).

louistiti commented 5 years ago

Hello @ethinallen,

Great! We could definitely create a Forecast package which contains the OpenWeatherMap and the Dark Sky modules.

However, to make Leon understands which one of these modules he needs to use we'll need to add using dark sky or using openweathermap to the expressions for one of these modules. So we'll need to see which one we can use as default module as the expressions will be pretty much the same.

Also, please note that the NLU needs to be improved before starting working on this package.

Thibaud-A commented 5 years ago

Hello @ethinallen,

Thanks for your suggestion ! :-) I checked the pros and the cons between OpenWeatherMap and Dark Sky and I have concluded this.

Pro of Darsky :

Cons :

In any case, as @louistiti said it could be great to give the opportunity to use differents API. I suggest OpenWeatherMap because there is a lot of features free and you don't have to set a credit card for using it. But if you want to lay the foundation of this package with Dark Sky : go for it ! :D

Immortalin commented 5 years ago

For simple use there's https://wttr.in

louistiti commented 5 years ago

Hello @Immortalin,

Thanks for sharing! It seems to use wego for the data sources, which means it is using OpenWeatherMap, etc. Better to directly pull data from the sources instead of having another layer between.

jaabberwocky commented 3 years ago

Hi @louistiti , was playing around with Leon and found it fascinating! Though I noticed too that there was no weather module, similarly to what was described in issue #251 . Could I check if a quick POC can be done on this or it should wait for other improvements? Thanks!

louistiti commented 3 years ago

Hi @jaabberwocky :wave:,

Thanks for willing to contribute into Leon! At this stage I'd say it'd be better to wait for upcoming versions but feel free to contribute. All the PRs will be merged once some upcoming versions will be released.