# pre_init

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/utils/pydantic/pre_init)

Decorator to run a function before model initialization.

## Signature

```python
pre_init(
    func: Callable,
) -> Any
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `func` | `Callable` | Yes | The function to run before model initialization. |

## Returns

`Any`

The decorated function.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/f0c5a28fa05adcda89aebcb449d897245ab21fa4/libs/core/langchain_core/utils/pydantic.py#L129)