chroma-core / chroma

the AI-native open-source embedding database
https://www.trychroma.com/
Apache License 2.0
13.36k stars 1.14k forks source link

ENH: updated the ImageLoader data loader to work with local URIs and remote URLs #2402

Open ahron1 opened 6 days ago

ahron1 commented 6 days ago

Updated ImageLoader in data_loaders.py to accept images from both local URIs and remote URLs. Raised as feature request

Description of changes

Test plan

How are these changes tested?

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository? Happy to update the documentation myself after the PR is merged.

github-actions[bot] commented 6 days ago

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

ahron1 commented 3 days ago

@tazarov Ok, done.

There's now a new ImageURLoader class.

It works without auth data_loaders.ImageURLoader("https://images.pexels.com/photos/10981514/pexels-photo-10981514.jpeg")

and also with auth: data_loaders.ImageURLoader("https://url_to_image", "username", "password")

Please check.