mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix: embedding job fails using IAM role (#5252)
This commit is contained in:
parent
4f0488abb5
commit
d9bee03ff6
|
@ -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:
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user