External weather and zipcode APIs#572
Conversation
…lly shown and incorporated to the LLM input
1.
|
|
Also, I noticed that print statements are being used in this PR. print statements are generally not recommended, especially in production environments. This is one of the main reasons we introduced logging support to the codebase in #520. |
…arameter explained and zipcode approach changed
|
Hi @chetanr25, yes you're completely right. There should be some documentation updated. I've alredy submitted again for revision. Furthermore, I've partially changed the approach of the zipcode resolver with the use of one of the most famous libraries for geocoding: geopy. It still is open-source and I've been testing it with random locations all over the world and works pretty well, it automatically fins locations all over the world without having to specify the country (which used to be kinda a bottleneck for the last one). Last thing, I've PRed as well some outdated prints we used to have, now redirected through the logger. |
There was a problem hiding this comment.
I was actually planning to remove --progress in a later fix, as it's difficult to tell whether the image is actually being built or not.
Additionally, I think the Docker build process is quite slow and doesn't seem to be using caching effectively. We may need to address this to improve our development speed.
There was a problem hiding this comment.
This is technically outside the scope of this PR, but replacing print() with logging is definitely an improvement. We had to do this later anyways, Thanks!
| """ | ||
| Fetch hourly weather forecast data for the given coordinates and date range. | ||
|
|
||
| Coordinates must be supplied as **decimal degrees** — not degree/minute/second notation. E.g. -122.4194, 37.7749. |
There was a problem hiding this comment.
Based on this example, I entered -122.4194 as the latitude and 37.7749 as the longitude. But latitude should be in the range -90 to +90, and longitude should be in the range -180 to +180.
| Coordinates must be supplied as **decimal degrees** — not degree/minute/second notation. E.g. -122.4194, 37.7749. | |
| Coordinates must be supplied as **decimal degrees** not degree/minute/second notation. E.g. 37.7749, -122.4194. |
|
I tested it with a few addresses and was able to get the correct ZIP code most of the time. In some cases, the data wasn't available and the API returned an empty list ([]), but I don't think that's a major issue. In such cases, we can prompt firefighters to enter the ZIP code manually. Overall, it worked well for me in most cases. There is a merge conflict in a file, other than that, LGTM |
…h-ai-input-with-open-source-weather-apis
Weather API:
It closes #564 and all the subissues: #565, #566, #567, #568.
Zipcode API:
closes #548.