mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-05 13:06:03 +00:00
community[patch]: root validator set explicit pre=False or pre=True (#23764)
See issue: https://github.com/langchain-ai/langchain/issues/22819
This commit is contained in:
@@ -34,7 +34,7 @@ class LambdaWrapper(BaseModel):
|
||||
|
||||
extra = Extra.forbid
|
||||
|
||||
@root_validator()
|
||||
@root_validator(pre=True)
|
||||
def validate_environment(cls, values: Dict) -> Dict:
|
||||
"""Validate that python package exists in environment."""
|
||||
|
||||
@@ -47,8 +47,6 @@ class LambdaWrapper(BaseModel):
|
||||
)
|
||||
|
||||
values["lambda_client"] = boto3.client("lambda")
|
||||
values["function_name"] = values["function_name"]
|
||||
|
||||
return values
|
||||
|
||||
def run(self, query: str) -> str:
|
||||
|
Reference in New Issue
Block a user