load_basemodels_if_needed

load_basemodels_if_needed(func: Callable[..., Any]) -> Callable[..., Any]

A decorator to load the parameters of a function if they are Pydantic models

Parameters:
NameDescription
funcThe function with annotated parameters

Type: Callable[..., Any]
Returns:
TypeDescription
Callable[..., Any]A function that loads the parameters before calling the original function