mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-19 09:30:15 +00:00
[chore]: Added Tests
This commit is contained in:
parent
979b81864e
commit
23ade9a1dc
@ -1078,7 +1078,14 @@ def get_all_basemodel_annotations(
|
||||
# cls has no subscript: cls = FooBar
|
||||
if isinstance(cls, type):
|
||||
annotations: dict[str, type] = {}
|
||||
if hasattr(cls, "model_fields"):
|
||||
for name, param in cls.model_fields.items():
|
||||
if param.alias and param.alias != name:
|
||||
warnings.warn(
|
||||
f"Field '{name}' has alias '{param.alias}'. The alias will be used instead of the field name.",
|
||||
stacklevel=2
|
||||
)
|
||||
for name, param in inspect.signature(cls).parameters.items():
|
||||
# Exclude hidden init args added by pydantic Config. For example if
|
||||
# BaseModel(extra="allow") then "extra_data" will part of init sig.
|
||||
if (
|
||||
|
Loading…
Reference in New Issue
Block a user