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

feat: add MinIO as storage provider #954

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

azlkiniue
Copy link

Add MinIO as additional storage provider. In spirit of creating open source data layer (#793), I'm adding MinIO as open-source alternative for Azure Blob Storage or AWS S3 that's already implemented BaseStorageClient. MinIO is compatible with S3 so only little changes are needed. This PR is inspired from #836.

How to Configure

import chainlit.data as cl_data
from chainlit.data.sql_alchemy import SQLAlchemyDataLayer
from chainlit.data.storage_clients import MinioStorageClient

storage_client = MinioStorageClient(bucket="<your bucket>", endpoint_url="<your minio api endpoint>") # user and password defaults to 'minioadmin'

cl_data._data_layer = SQLAlchemyDataLayer(conninfo="<your conninfo>", storage_provider=storage_client)

PS:
Also fix a little typo

@dokterbob dokterbob added the data layer Pertains to data layers. label Aug 14, 2024
@dokterbob dokterbob added the enhancement New feature or request label Sep 3, 2024
petri added a commit to koodaamo/chainlit that referenced this pull request Nov 26, 2024
@petri
Copy link

petri commented Nov 28, 2024

Some notes:

  • this PR has now became out of date
  • fixed version in #koodaamo/chainlit works
  • when installing MiniO from e.g. HomeBrew on MacOS, anonymous policy for bucket access must be added manually, otherwise element access fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data layer Pertains to data layers. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants