def model_fields(model: pydantic.BaseModel) -> dict[str, FieldInfo]:
    """Get the fields of a pydantic model.

    Args:
        model: A pydantic model.
    """
    if PYDANTIC_V2:
        return model.model_fields
    else:
        return model.__fields__
Get the fields of a pydantic model.

    Args:
        model: A pydantic model.
    
lanarky/utils.py