Async Tool Calls
New Features
- Async Tools - You can now set
async_modetotools_threadinginside theAgencyclass. With this mode on, all tool calls made by your agents will be executed in separate threads (max 4, depending on your CPU). This can signifincatly speed up the workflow when executing multiple I/O bound tasks. - Concurrent API Calls - Now all API tools created with
schemas_folderorToolFactory.from_openapi_schemareturn coroutines, which are executed concurrently in an event loop. - Async
BaseTool.runMethod Support - All async run methods in yourBaseToolclasses are now executed concurrently in an event loop as well. - File Search Configuration - Added
file_searchconfiguration to theAgentclass - This parameter allows you to modify the configuration of theFileSearchtool. Currently, only{max_num_results: int}is available. See OpenAI API Docs - Parallel Tool Call Controls - Added
parallel_tool_callsparameter to theAgentclass - When set toFalse, the agent won't call multiple tools at once and will execute all tools sequentially.
Bug Fixes
- Fixed bug with duplicate call IDs assignment when the agent calls the same tool multiple times and the request times out. #151
Full Changelog: v0.2.5...v0.2.6