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:
Sean Morgan
2023-06-01 12:35:06 -07:00
committed by GitHub
parent 6258f72a00
commit 8441cff1d7
+1 -1
View File
@@ -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: