Skip to main content
Version: dev

S3StorageConfig Configuration

S3StorageConfig(endpoint: str, region: str, access_key_id: Optional[str] = None, access_key_secret: Optional[str] = None, use_environment_credentials: Optional[bool] = False, fixed_bucket: Optional[str] = None, bucket_prefix: Optional[str] = 'dbgpt-fs-', auto_create_bucket: Optional[bool] = True, save_chunk_size: Optional[int] = 1048576, signature_version: Optional[str] = None, s3_config: Optional[Dict[str, Any]] = <factory>)

Parameters

NameTypeRequiredDescription
endpointstring
The endpoint of the s3 server. e.g. https://s3.us-east-1.amazonaws.com
regionstring
The region of the s3 server. e.g. us-east-1
access_key_idstring
The access key ID of the s3 server. You can also set it in the environment variable AWS_ACCESS_KEY_ID
access_key_secretstring
The access key secret of the s3 server. You can also set it in the environment variable AWS_SECRET_ACCESS_KEY
use_environment_credentialsboolean
Whether to use the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as the credentials. Default is False.
Defaults:False
fixed_bucketstring
The fixed bucket name to use. If set, all logical buckets in DB-GPT will be mapped to this bucket. We suggest you set this value to avoid bucket name conflicts.
bucket_prefixstring
The prefix of the bucket name. If set, all logical buckets in DB-GPT will be prefixed with this value. Just work when fixed_bucket is None.
Defaults:dbgpt-fs-
auto_create_bucketboolean
Whether to create the bucket automatically if it does not exist. If set to False, the bucket must exist before using it.
Defaults:True
save_chunk_sizeinteger
The chunk size when saving the file. When the file is larger 10x than this value, it will be uploaded in multiple parts. Default is 1M.
Defaults:1048576
signature_versionstring
The signature version of the s3 server. e.g. s3v4, s3v2, None (default)
s3_configobject
The additional configuration for the S3 client.
Defaults:{}