crewai_article_editor / crewai /tools /calculator_tools.py
Skier8402's picture
Upload 44 files
82036e1 verified
raw
history blame
374 Bytes
from langchain.tools import tool
class CalculatorTools():
@tool("Make a calcualtion")
def calculate(operation):
"""Useful to perform any mathematica calculations,
like sum, minus, mutiplcation, division, etc.
The input to this tool should be a mathematical
expression, a couple examples are `200*7` or `5000/2*10`
"""
return eval(operation)