community[patch]: Update root_validators to use pre=True or pre=False (#23731)

Update root_validators in preparation for pydantic 2 migration.
This commit is contained in:
Eugene Yurtsev
2024-07-01 16:10:15 -04:00
committed by GitHub
parent 6019147b66
commit 5d2262af34
9 changed files with 13 additions and 10 deletions

View File

@@ -112,7 +112,7 @@ class ChatFireworks(BaseChatModel):
"""Get the namespace of the langchain object."""
return ["langchain", "chat_models", "fireworks"]
@root_validator()
@root_validator(pre=True)
def validate_environment(cls, values: Dict) -> Dict:
"""Validate that api key in environment."""
try: