-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Tools own model, add ToolKit Concept #1095
Conversation
- Migrate the Tool abstraction to a separate file - Add a Toolkit abstraction that can own the generation of tools around a shared concept or state Example would be a JSON Toolkit where each tool may define different functions an agent can run against the shared data object. We don't want the Agent to own the data object, and it makes more sense for now to keep the data object as a value that's managed by the tool/skill itself. --------- Co-authored-by: Harrison Chase <[email protected]> Co-authored-by: Francisco Ingham <[email protected]> Co-authored-by: Dhruv Anand <[email protected]> Co-authored-by: cragwolfe <[email protected]> Co-authored-by: Anton Troynikov <[email protected]> Co-authored-by: Oliver Klingefjord <[email protected]> Co-authored-by: William Fu-Hinthorn <[email protected]> Co-authored-by: Ankush Gola <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my two big comments:
im not sure we need toolkits for google search/bing/wolfram alpha cause they only have one tool. would prefer not to overdo stuff, keep it light and basic until we have more certainty
tools loded in load_tools.py should use the Tool classes, right?
Makefile
Outdated
@@ -32,9 +32,6 @@ lint: | |||
test: | |||
poetry run pytest tests/unit_tests | |||
|
|||
tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hwchase17 -- can move this to another PR but not sure why there is both make test and make tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make test
is what CI expects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
someone added this because its more canonical, dont see harm in having both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
Makefile
Outdated
@@ -32,9 +32,6 @@ lint: | |||
test: | |||
poetry run pytest tests/unit_tests | |||
|
|||
tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make test
is what CI expects
|
||
def run( | ||
self, | ||
action: AgentAction, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hinthornw, @hwchase17 --> changed interface to take in AgentAction
bc that's what callback manager expects, is backwards compatible
Follow-up of @hinthornw's PR: - Migrate the Tool abstraction to a separate file (`BaseTool`). - `Tool` implementation of `BaseTool` takes in function and coroutine to more easily maintain backwards compatibility - Add a Toolkit abstraction that can own the generation of tools around a shared concept or state --------- Co-authored-by: William FH <[email protected]> Co-authored-by: Harrison Chase <[email protected]> Co-authored-by: Francisco Ingham <[email protected]> Co-authored-by: Dhruv Anand <[email protected]> Co-authored-by: cragwolfe <[email protected]> Co-authored-by: Anton Troynikov <[email protected]> Co-authored-by: Oliver Klingefjord <[email protected]> Co-authored-by: William Fu-Hinthorn <[email protected]> Co-authored-by: Bruno Bornsztein <[email protected]>
Follow-up of @hinthornw's PR:
BaseTool
).Tool
implementation ofBaseTool
takes in function and coroutine to more easily maintain backwards compatibility