mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-28 23:07:11 +00:00
Add a utility that can be used as a default factory The goal will be to start migrating from of the pydantic models to use `from_env` as a default factory if possible. ```python from pydantic import Field, BaseModel from langchain_core.utils import from_env class Foo(BaseModel): name: str = Field(default_factory=from_env('HELLO')) ```