Skip to main content

LocalExecutorWithTools

An executor that executes code blocks with injected tools. In this executor, the func within the tools can be called directly without declaring in the code block.
For example, for a tool converted from langchain, the relevant functions can be called directly.
In this case, the wikipedia function can be called directly in the code block. This hides the complexity of the tool.
Parameters:

Instance Attributes

code_extractor


(Experimental) Export a code extractor that can be used by an agent.

Instance Methods

execute_code_blocks

Execute code blocks and return the result.
Parameters: Returns:

restart

Restart the code executor. Since this executor is stateless, no action is needed.