# create_base_retry_decorator

> **Function** in `langchain_google_vertexai`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-vertexai/_retry/create_base_retry_decorator)

Create a retry decorator for a given LLM and provided a list of error types.

## Signature

```python
create_base_retry_decorator(
    error_types: list[type[BaseException]],
    max_retries: int = 1,
    run_manager: AsyncCallbackManagerForLLMRun | CallbackManagerForLLMRun | None = None,
    wait_exponential_kwargs: dict[str, float] | None = None,
) -> Callable[[Any], Any]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `error_types` | `list[type[BaseException]]` | Yes | List of error types to retry on. |
| `max_retries` | `int` | No | Number of retries. (default: `1`) |
| `run_manager` | `AsyncCallbackManagerForLLMRun \| CallbackManagerForLLMRun \| None` | No | Callback manager for the run. (default: `None`) |
| `wait_exponential_kwargs` | `dict[str, float] \| None` | No | Optional dictionary with parameters:  - `multiplier`: Initial wait time multiplier (Default: `1.0`) - `min`: Minimum wait time in seconds (Default: `4.0`) - `max`: Maximum wait time in seconds (Default: `10.0`) - `exp_base`: Exponent base to use (Default: `2.0`) (default: `None`) |

## Returns

`Callable[[Any], Any]`

A retry decorator.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/a3f016b2a6c4af535df275545f76fa7424aa39e5/libs/vertexai/langchain_google_vertexai/_retry.py#L26)