Skip to content

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

@petri
Copy link

petri commented Dec 30, 2024

Revisit this once #1365 is in.

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.

4 participants