Skip to content

Commit 7430570

Browse files
seemillercrmne
andauthored
Use consistent name for Weather tool in docs (crmne#215)
For those following along with examples straight out of the documentation, provide a consistent name for the `Weather` tool example. Co-authored-by: Carmine Paolino <[email protected]>
1 parent 28453cb commit 7430570

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/guides/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ When building [Tools]({% link guides/tools.md %}), you need to decide how errors
156156
1. **Return Error to LLM:** If the error is something the LLM might be able to recover from (e.g., invalid parameters provided by the LLM, temporary lookup failure), return a Hash containing an `:error` key. The LLM will see this error message as the tool's output and may try again or use a different approach.
157157

158158
```ruby
159-
class WeatherTool < RubyLLM::Tool
159+
class Weather < RubyLLM::Tool
160160
# ... params ...
161161
def execute(location:)
162162
if location.blank?

docs/guides/tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Attach tools to a `Chat` instance using `with_tool` or `with_tools`.
117117
chat = RubyLLM.chat(model: 'gpt-4o') # Use a model that supports tools
118118

119119
# Instantiate your tool if it requires arguments, otherwise use the class
120-
weather_tool = WeatherLookup.new
120+
weather_tool = Weather.new
121121

122122
# Add the tool(s) to the chat
123123
chat.with_tool(weather_tool)

0 commit comments

Comments
 (0)