mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-18 09:01:03 +00:00
replace forbid into ignore (#539)
this is the second PR of #519.
in #519 I suggested deleting Extra.forbid.
I was very confused but I replaced Extra.forbid to Extra.ignore, which
is the default of pydantic.
Since the
[BaseLLM](4b7b8229de/langchain/llms/base.py (L20)
)
from which it is inherited is set in Extra.forbid, I wanted to avoid
having the Extra.forbid settings inherited by simply deleting it.
This commit is contained in:
parent
4b7b8229de
commit
f48ab642be
@ -58,7 +58,7 @@ class BaseOpenAI(BaseLLM, BaseModel):
|
||||
class Config:
|
||||
"""Configuration for this pydantic object."""
|
||||
|
||||
extra = Extra.forbid
|
||||
extra = Extra.ignore
|
||||
|
||||
@root_validator(pre=True)
|
||||
def build_extra(cls, values: Dict[str, Any]) -> Dict[str, Any]:
|
||||
|
Loading…
Reference in New Issue
Block a user