JavaScriptExecuter = new tools.DynamicTool({
name: "executeJavaScript",
description:
"call this to execute a JavaScript command. input should be the string of a JavaScript command. the output is the result when the eval() JavaScript command is conducted on that string",
func: async function executeJavaScript(command){
const data =eval(command);
console.log("JavaScriptExecuter Used!");
console.log(command);
return String(data);
},})