langchain_core.load.serializable
.try_neq_defaultΒΆ
- langchain_core.load.serializable.try_neq_default(value: Any, key: str, model: BaseModel) bool [source]ΒΆ
Try to determine if a value is different from the default.
- Parameters
value (Any) β The value.
key (str) β The key.
model (BaseModel) β The pydantic model.
- Returns
Whether the value is different from the default.
- Raises
Exception β If the key is not in the model.
- Return type
bool