Skip to content

Commit c40d619

Browse files
koicandreibondarev
andauthored
[Doc] Update doc for Langchain::Tool::Calculator (#979)
Follow-up to #197. Since #197, `Langchain::Tool::Calculator` no longer falls back to `google_search_results`. Co-authored-by: Andrei Bondarev <[email protected]>
1 parent a63272e commit c40d619

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/langchain/tool/calculator.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
module Langchain::Tool
44
#
5-
# A calculator tool that falls back to the Google calculator widget
5+
# A calculator tool
66
#
77
# Gem requirements:
88
# gem "eqn", "~> 1.6.5"
9-
# gem "google_search_results", "~> 2.0.0"
109
#
1110
# Usage:
1211
# calculator = Langchain::Tool::Calculator.new
@@ -15,15 +14,15 @@ class Calculator
1514
extend Langchain::ToolDefinition
1615
include Langchain::DependencyHelper
1716

18-
define_function :execute, description: "Evaluates a pure math expression or if equation contains non-math characters (e.g.: \"12F in Celsius\") then it uses the google search calculator to evaluate the expression" do
17+
define_function :execute, description: "Evaluates a pure math expression" do
1918
property :input, type: "string", description: "Math expression", required: true
2019
end
2120

2221
def initialize
2322
depends_on "eqn"
2423
end
2524

26-
# Evaluates a pure math expression or if equation contains non-math characters (e.g.: "12F in Celsius") then it uses the google search calculator to evaluate the expression
25+
# Evaluates a pure math expression
2726
#
2827
# @param input [String] math expression
2928
# @return [Langchain::Tool::Response] Answer

0 commit comments

Comments
 (0)