Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize tools Array in BaseAgent Constructor (#98)
**Problem**: Previously, the `BaseAgent` constructor did not explicitly initialize the `tools` array if it wasn't provided in the constructor parameters. This led to runtime errors when the `tools` property was accessed before being explicitly set elsewhere in the code. **Solution**: This PR modifies the `BaseAgent` constructor to default the `tools` array to an empty array if not provided. This ensures all instances of `BaseAgent` start with a `tools` property initialized, preventing undefined access errors and aligning with our data structure expectations. **Changes Made**: - Added a default parameter in the `BaseAgent` constructor for `tools`, setting it to an empty array. - Updated any relevant documentation to reflect this change. **Impact**: This change ensures that all agent instances are robustly initialized, improving the stability of our system and preventing potential bugs related to tool handling. Thanks @zhaopengme for pointing this out in #97
- Loading branch information