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

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.

None yet

1 participant