Wraps an executor in a tool loop.
The returned executor declares tools to the model, runs any it owns, feeds the results back and repeats. Calls to tools it does not own are passed through to the caller untouched, so an outer loop can handle them.
tools
Executor or model id that does the generating.
Tools this loop owns and executes.
Loop limits.
An executor that resolves tool calls before answering.
export default createToolsExecutor("core/turn-1", [searchTool, calculatorTool]); Copy
export default createToolsExecutor("core/turn-1", [searchTool, calculatorTool]);
Wraps an executor in a tool loop.
The returned executor declares
toolsto the model, runs any it owns, feeds the results back and repeats. Calls to tools it does not own are passed through to the caller untouched, so an outer loop can handle them.