Docs
Calculator Tool
Calculator Tool
LLMs are inefficient while performing arithmetic operations. The Calculator Tool is a simple and efficient tool for performing arithmetic operations.
Installation
Install peer dependencies:
Copy the code
Add the following code to your utils/calculatorTool.ts
file:
Usage
Props
evaluate
Prop | Type | Description |
---|---|---|
input | string | The mathematical input string. |
evaluateMultiVar
Prop | Type | Description |
---|---|---|
expression | string | The mathematical input expression. |
variables | Variables of the mathematical expression. |
Credits
This component is built on top of Langchain's Calculator Tool