Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Langchain.Tool.Calculator
Documentation
data CalculatorTool Source #
Calculator Tool implementation
Constructors
CalculatorTool |
Instances
Show CalculatorTool Source # | |||||||||
Defined in Langchain.Tool.Calculator Methods showsPrec :: Int -> CalculatorTool -> ShowS # show :: CalculatorTool -> String # showList :: [CalculatorTool] -> ShowS # | |||||||||
Tool CalculatorTool Source # | |||||||||
Defined in Langchain.Tool.Calculator Associated Types
Methods toolName :: CalculatorTool -> Text Source # toolDescription :: CalculatorTool -> Text Source # runTool :: CalculatorTool -> Input CalculatorTool -> IO (Output CalculatorTool) Source # | |||||||||
type Input CalculatorTool Source # | |||||||||
Defined in Langchain.Tool.Calculator | |||||||||
type Output CalculatorTool Source # | |||||||||
Defined in Langchain.Tool.Calculator |
Expression data type for our calculator
parseExpression :: Text -> Either ParseError Expr Source #
Parse a mathematical expression from Text
evaluateExpression :: Expr -> Double Source #
Evaluate a parsed expression to a Double