langchain_core.tools
.create_schema_from_function¶
- langchain_core.tools.create_schema_from_function(model_name: str, func: Callable) Type[BaseModel] [source]¶
Create a pydantic schema from a function’s signature. :param model_name: Name to assign to the generated pydandic schema :param func: Function to generate the schema from
- Returns
A pydantic model with the same arguments as the function