You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance error handling in tools to differentiate between recoverable and critical errors, and provide guidelines for handling application-level errors.
# When there's an error, the model will receive and explain it
206
-
chat.ask "What's the weather at invalid coordinates 1000, 1000?"
207
-
# => "The coordinates 1000, 1000 are not valid for any location on Earth, as latitude must be between -90 and 90, and longitude must be between -180 and 180. Please provide valid coordinates or a city name for weather information."
230
+
```ruby
231
+
begin
232
+
chat =RubyLLM.chat.with_tool(Weather)
233
+
response = chat.ask "What's the weather in Berlin?"
0 commit comments