agentchat.contrib.captainagent.tools.math
agentchat.contrib.captainagent.tools.math.evaluate_expression
evaluate_expression
Evaluates a mathematical expression with support for floor function notation and power notation.
Arguments:
expression
str - The mathematical expression to evaluate. It can only contain one symbol ‘x’.
Returns:
Union[sympy.Expr, str]: The evaluated result as a sympy expression if successful, otherwise an error message as a string.