The Calculator class is a tool used to evaluate mathematical expressions. It extends the base Tool class.

Example

const calculator = new Calculator();
const sum = calculator.add(99, 99);
console.log("The sum of 99 and 99 is:", sum);

Hierarchy

  • Tool
    • Calculator

Constructors

Properties

Constructors

  • Parameters

    • Optional fields: ToolParams

    Returns Calculator

Properties

description: string = ...
name: string = "calculator"

Generated using TypeDoc