mirror of
https://github.com/kennethreitz/langchain.git
synced 2026-06-05 23:00:18 +00:00
Fix bedrock auth validation (#5574)
https://github.com/hwchase17/langchain/pull/5523 has a small bug if client was not passed in constructor
This commit is contained in:
@@ -69,7 +69,7 @@ class BedrockEmbeddings(BaseModel, Embeddings):
|
||||
def validate_environment(cls, values: Dict) -> Dict:
|
||||
"""Validate that AWS credentials to and python package exists in environment."""
|
||||
|
||||
if "client" in values:
|
||||
if values["client"] is not None:
|
||||
return values
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user