Release Notes
- The `Tool` class encapsulates a function and its associated schema, and provides a simple API for interacting with the function (calling it and getting its schema).
- The `ToolCollection` class is a container for multiple `Tool` objects. It provides methods to add tools individually or from different sources (modules, packages, glob patterns), and also provides a method for using a tool (validating and calling the function with given JSON arguments). Additionally, it provides a method to get the schema of all its tools.
- The `add_tool` method in `ToolCollection` is versatile. You can add tools individually, or you can add them in bulk from a module, a package, or a glob pattern. This makes it easy to manage tools, especially when there are many of them spread across different modules or packages.
- The `use_tool` method is designed to handle the whole process of using a tool: it fetches the tool, validates the arguments against the tool's schema, and calls the function with the validated arguments. This simplifies the process of using a tool and reduces the risk of errors.