mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-24 03:52:10 +00:00
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:
@@ -229,10 +229,10 @@ class SearxSearchWrapper(BaseModel):
|
||||
|
||||
return v
|
||||
|
||||
@root_validator()
|
||||
@root_validator(pre=True)
|
||||
def validate_params(cls, values: Dict) -> Dict:
|
||||
"""Validate that custom searx params are merged with default ones."""
|
||||
user_params = values["params"]
|
||||
user_params = values.get("params", {})
|
||||
default = _get_default_params()
|
||||
values["params"] = {**default, **user_params}
|
||||
|
||||
|
Reference in New Issue
Block a user