Create a retry decorator for a given LLM and provided a list of error types.
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]| Name | Type | Description |
|---|---|---|
error_types* | list[type[BaseException]] | List of error types to retry on. |
max_retries | int | Default: 1Number of retries. |
run_manager | AsyncCallbackManagerForLLMRun | CallbackManagerForLLMRun | None | Default: NoneCallback manager for the run. |
wait_exponential_kwargs | dict[str, float] | None | Default: NoneOptional dictionary with parameters:
|