-
Notifications
You must be signed in to change notification settings - Fork 162
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
GriptapeCloudFileManagerDriver #1267
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
elif self.bucket_name: | ||
data = {"name": uuid.uuid4().hex} if self.bucket_name is None else {"name": self.bucket_name} | ||
post_bucket_response = self._call_api(method="post", path="/buckets", json=data).json() | ||
self.bucket_id = post_bucket_response["bucket_id"] | ||
logger.info("Created new Bucket with ID: %s", self.bucket_id) |
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.
I don't love the Driver auto-creating a resource like this. What use-case would this enable?
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.
Use case is "Upload a file to a new path in the bucket" For S3/local filesystem, there is no need to create an underlying asset but there is for GTC
Misread what line this was for. We can require users to create the bucket in GTC outside of the framework, which would match S3's pattern. Seems like friction to ez GTC usage but OK with that change
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.
We've made the conscious decision to not auto-create control-plane resources in things like Vector Store Drivers so this does feel like it's going against that decision. Maybe we can include some provisioning sample code in the docs example?
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.
I am OK with that for Buckets. But creating an Asset on try_save_file seems valuable to me.
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.
Yes definitely on assets. Data plane resources are fine.
griptape/drivers/file_manager/griptape_cloud_file_manager_driver.py
Outdated
Show resolved
Hide resolved
griptape/drivers/file_manager/griptape_cloud_file_manager_driver.py
Outdated
Show resolved
Hide resolved
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.
Just realized we don't have a section on file manager drivers. Could you pretty please add one? It can be super bare bones for the other Drivers.
Describe your changes
A new File Manager Driver for Griptape Cloud. Built on top of Griptape Cloud Bucket and Asset resources. Also added save/load_artifact methods to allow for saving/loading of artifacts instead of requiring bytes.
Issue ticket number and link