build_extra_kwargs#
- langchain_core.utils.utils.build_extra_kwargs(extra_kwargs: dict[str, Any], values: dict[str, Any], all_required_field_names: set[str]) dict[str, Any] [source]#
Build extra kwargs from values and extra_kwargs.
- Parameters:
extra_kwargs (dict[str, Any]) – Extra kwargs passed in by user.
values (dict[str, Any]) – Values passed in by user.
all_required_field_names (set[str]) – All required field names for the pydantic class.
- Returns:
Extra kwargs.
- Return type:
Dict[str, Any]
- Raises:
ValueError – If a field is specified in both values and extra_kwargs.
ValueError – If a field is specified in model_kwargs.