start cases
This commit is contained in:
@@ -2,8 +2,6 @@ import random
|
||||
import datetime
|
||||
from chatbug.tool_helper import tool
|
||||
import chatbug.matheval as matheval
|
||||
# from chatbug.matheval import interpreter, lexer
|
||||
# from chatbug.matheval.ast import Parser
|
||||
import chatbug.utils as utils
|
||||
|
||||
|
||||
@@ -58,10 +56,10 @@ Args:
|
||||
expression = "solve " + " and ".join(equations) + " for " + " and ".join(variables)
|
||||
print(expression)
|
||||
|
||||
tokens = lexer.tokenize(expression)
|
||||
tokens = matheval.lexer.tokenize(expression)
|
||||
parser = ast.Parser()
|
||||
ast = parser.parse(tokens)
|
||||
return interpreter.interpret(ast)
|
||||
return matheval.interpreter.interpret(ast)
|
||||
except Exception as e:
|
||||
utils.print_error("Tool call evaluation failed. - " + str(e))
|
||||
return "Tool call evaluation failed."
|
||||
|
Reference in New Issue
Block a user