tools.extend_tool_loop module
Extend the tool-calling loop at runtime.
Allows the bot to grant itself additional tool-calling rounds when it determines that the current limit is insufficient to complete a complex multi-step task.
- async tools.extend_tool_loop.run(rounds=5, ctx=None)[source]
Grant additional tool-calling rounds.
- Parameters:
rounds (
int) – Number of extra rounds to add (capped per call and by absolute max).ctx (ToolContext) – Injected context (unused for limit; the active
chat()invocation is identified viaget_tool_round_limit_box()).
- Return type: