langchainrb icon indicating copy to clipboard operation
langchainrb copied to clipboard

Weather questions sometimes blows up on certain city names

Open mattlindsey opened this issue 1 year ago • 2 comments

ChainOfThought agent usually provides a good city name to the Weather tool, but can blow up (or be tricked into blowing up) on city names.

First example works, second blows up on same city:

image

mattlindsey avatar Jun 12 '23 20:06 mattlindsey

I think this issue is either on the gem's or the actual API's end. "Boston, MA" is a completely valid way of formatting the location name. For example: If I type it in on weather.com -- I won't be getting an error.

andreibondarev avatar Jun 13 '23 15:06 andreibondarev

I think this is because there are two ways listed in the README for the gem to get weather for a city.
We are currently using the first one below. Using the second method may solve the problem, but it needs a little research.

Also note the weather gem uses Open Weather API 2.5 while the website lists only 3.0. There are tasks to update the gem.

data = client.current_weather(city: 'London')

client.current_city('New York', 'NY', 'US')

mattlindsey avatar Jun 15 '23 20:06 mattlindsey

This issue is definitely fixed now.

andreibondarev avatar Aug 16 '24 19:08 andreibondarev