-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow react.Tool to wrap methods (#1856)
The big reason for this is to pass parameters out-of-band, e.g. a user_id to ensure the LLM doesn't get the wrong data. The unit test includes a usage, you can't use it as a decorator this way, but it works. The alternative, of course, is to have a very long function and have all the tools be nested functions. It works, but can lead to some very long functions. I prefer long classes over long functions.
- Loading branch information
Showing
2 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters