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

Update s3 cache to support folder #1494

Merged
merged 3 commits into from
Jan 18, 2024
Merged

Conversation

duarteocarmo
Copy link
Contributor

resolves #1493

Copy link

vercel bot commented Jan 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 18, 2024 4:33pm

Copy link
Contributor

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

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

requested changes, can you add this param to docs too

@@ -122,8 +124,9 @@ def log_event(self, kwargs, response_obj, start_time, end_time, print_verbose):
pass

s3_object_key = (
(self.s3_path.rstrip('/') + '/' if self.s3_path else '') +
Copy link
Contributor

Choose a reason for hiding this comment

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

any reson why s3 path should be part of the key ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe that is the way you point to a folder in boto3.

Could not find better docs then here..

https://stackoverflow.com/questions/39272397/uploading-file-to-specific-folder-in-s3-using-boto3#comment65879979_39272397

litellm/integrations/s3.py Show resolved Hide resolved
@duarteocarmo
Copy link
Contributor Author

Let me know if this works :)

@duarteocarmo
Copy link
Contributor Author

Also updated docs!

Copy link
Contributor

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

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

lgtm ! thanks for the contribution !

@ishaan-jaff ishaan-jaff merged commit 7db04af into BerriAI:main Jan 18, 2024
2 checks passed
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.

[Feature]: Add ability to cache to specific folder in S3
2 participants