community[patch]: update @root_validator in utilities namespace (#23768)

Update all utilities to use `pre=True` or `pre=False`

https://github.com/langchain-ai/langchain/issues/22819
This commit is contained in:
Eugene Yurtsev
2024-07-02 10:33:01 -04:00
committed by GitHub
parent ee5eedfa04
commit 338cef35b4
35 changed files with 38 additions and 37 deletions

View File

@@ -48,7 +48,7 @@ class PubMedAPIWrapper(BaseModel):
doc_content_chars_max: int = 2000
email: str = "your_email@example.com"
@root_validator()
@root_validator(pre=True)
def validate_environment(cls, values: Dict) -> Dict:
"""Validate that the python package exists in environment."""
try: