create_base_retry_decorator#

langchain_core.language_models.llms.create_base_retry_decorator(
error_types: list[type[BaseException]],
max_retries: int = 1,
run_manager: AsyncCallbackManagerForLLMRun | CallbackManagerForLLMRun | None = None,
) Callable[[Any], Any][source]#

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

Parameters:
Returns:

A retry decorator.

Raises:

ValueError – If the cache is not set and cache is True.

Return type:

Callable[[Any], Any]