diff --git a/api/core/model_runtime/model_providers/bedrock/bedrock.yaml b/api/core/model_runtime/model_providers/bedrock/bedrock.yaml index 88ec712bdf..aa364fb63f 100644 --- a/api/core/model_runtime/model_providers/bedrock/bedrock.yaml +++ b/api/core/model_runtime/model_providers/bedrock/bedrock.yaml @@ -23,7 +23,7 @@ provider_credential_schema: - variable: aws_access_key_id required: false label: - en_US: Access Key (If not provided, credentials are obtained from your running environment. e.g. IAM role) + en_US: Access Key (If not provided, credentials are obtained from the running environment.) zh_Hans: Access Key type: secret-input placeholder: diff --git a/api/core/model_runtime/model_providers/bedrock/text_embedding/text_embedding.py b/api/core/model_runtime/model_providers/bedrock/text_embedding/text_embedding.py index 84b23d4a27..35b1a8f389 100644 --- a/api/core/model_runtime/model_providers/bedrock/text_embedding/text_embedding.py +++ b/api/core/model_runtime/model_providers/bedrock/text_embedding/text_embedding.py @@ -49,8 +49,8 @@ class BedrockTextEmbeddingModel(TextEmbeddingModel): bedrock_runtime = boto3.client( service_name='bedrock-runtime', config=client_config, - aws_access_key_id=credentials["aws_access_key_id"], - aws_secret_access_key=credentials["aws_secret_access_key"] + aws_access_key_id=credentials.get("aws_access_key_id", None), + aws_secret_access_key=credentials.get("aws_secret_access_key", None) ) embeddings = []