Limit tool calls recursion

This commit is contained in:
Cohee
2024-10-07 00:22:27 +03:00
parent 67ebf0fc06
commit 7db85e7ed8
2 changed files with 13 additions and 5 deletions

View File

@ -210,6 +210,12 @@ export class ToolManager {
static #INPUT_DELTA_KEY = '__input_json_delta';
/**
* The maximum number of times to recurse when parsing tool calls.
* @type {number}
*/
static RECURSE_LIMIT = 5;
/**
* Returns an Array of all tools that have been registered.
* @type {ToolDefinition[]}