OSSStorageConfig Configuration
OSSStorageConfig(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)
Parameters
Name | Type | Required | Description |
---|---|---|---|
endpoint | string | ✅ | The endpoint of the OSS server. e.g. https://oss-cn-hangzhou.aliyuncs.com |
region | string | ✅ | The region of the OSS server. e.g. cn-hangzhou |
access_key_id | string | ❌ | The access key ID of the OSS server. You can also set it in the environment variable OSS_ACCESS_KEY_ID |
access_key_secret | string | ❌ | The access key secret of the OSS server. You can also set it in the environment variable OSS_ACCESS_KEY_SECRET |
use_environment_credentials | boolean | ❌ | Whether to use the environment variables OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET as the credentials. Default is False. Defaults: False |
fixed_bucket | string | ❌ | 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_prefix | string | ❌ | 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_bucket | boolean | ❌ | 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_size | integer | ❌ | 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 |