Skip to content
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

Add GriptapeCloudToolDriver #1367

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Conversation

collindutter
Copy link
Member

@collindutter collindutter commented Nov 20, 2024

Describe your changes

Alternate implementation to the one in #1342.

Added

  • New class of Drivers, Tool Drivers, for augmenting Tools with additional functionality.
  • GriptapeCloudToolDriver for interacting with Griptape Cloud's Tool API.
  • BaseTool.tool_driver for setting a Tool Driver on a Tool. The Tool will call tool_driver.initialize_tool after Tool initialization.

I'm not in love how we explain these Drivers in the docs, they're kind of hard to understand without the full picture of the Tools Cloud service.

Issue ticket number and link

Closes #1342


📚 Documentation preview 📚: https://griptape--1367.org.readthedocs.build//1367/

@collindutter collindutter force-pushed the feature/tool-execution-driver branch 2 times, most recently from abc749b to 2aaa729 Compare November 20, 2024 19:18
@@ -68,6 +68,7 @@ jobs:
GT_CLOUD_STRUCTURE_ID: ${{ vars.INTEG_GT_CLOUD_STRUCTURE_ID }}
GT_CLOUD_STRUCTURE_RUN_ID: ${{ vars.INTEG_GT_CLOUD_STRUCTURE_RUN_ID }}
GT_CLOUD_THREAD_ID: ${{ vars.INTEG_GT_CLOUD_THREAD_ID }}
GT_CLOUD_TOOL_ID: ${{ vars.INTEG_GT_CLOUD_TOOL_ID }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zachgiordano what would it take to get one of these in Tony?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A public Sample Tools repo. Working on it :)

@@ -58,8 +59,8 @@ def lazy_attr(self: Any, value: Any) -> None:


def _build_kwargs(func: Callable, params: dict) -> dict:
func_params = inspect.signature(func).parameters.copy()
func_params.pop("self")
func_params = cast(OrderedDict, inspect.signature(func).parameters.copy())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pop the first item, not the one named "self" (which is just a convention)

@collindutter collindutter force-pushed the feature/tool-execution-driver branch from 2aaa729 to fae135d Compare November 20, 2024 19:25
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 98.88889% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...riptape/drivers/tool/griptape_cloud_tool_driver.py 98.64% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@collindutter collindutter force-pushed the feature/tool-execution-driver branch 2 times, most recently from d159168 to f261cd6 Compare November 20, 2024 20:40
@collindutter collindutter force-pushed the feature/tool-execution-driver branch from f261cd6 to 11fa960 Compare November 20, 2024 21:21
Copy link
Member

@vachillo vachillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really cool Tools

Copy link
Member

@zachgiordano zachgiordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tools

@collindutter collindutter merged commit 74a2937 into dev Nov 20, 2024
15 checks passed
@collindutter collindutter deleted the feature/tool-execution-driver branch November 20, 2024 22:48
@collindutter collindutter mentioned this pull request Nov 21, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants