_create_retry_decorator() — langchain Function Reference
Architecture documentation for the _create_retry_decorator() function in chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 60ceccfa_ae6a_23d0_4fb3_9a70af912074["_create_retry_decorator()"] cfb937d2_ce7f_5338_2b62_6452043ac78a["chat_models.py"] 60ceccfa_ae6a_23d0_4fb3_9a70af912074 -->|defined in| cfb937d2_ce7f_5338_2b62_6452043ac78a 8db35ed5_08a5_0e78_5859_838dd98768d9["acompletion_with_retry()"] 8db35ed5_08a5_0e78_5859_838dd98768d9 -->|calls| 60ceccfa_ae6a_23d0_4fb3_9a70af912074 b8aa7601_1d62_2c3d_dff3_a3d1739e2d8c["completion_with_retry()"] b8aa7601_1d62_2c3d_dff3_a3d1739e2d8c -->|calls| 60ceccfa_ae6a_23d0_4fb3_9a70af912074 style 60ceccfa_ae6a_23d0_4fb3_9a70af912074 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/mistralai/langchain_mistralai/chat_models.py lines 102–110
def _create_retry_decorator(
llm: ChatMistralAI,
run_manager: AsyncCallbackManagerForLLMRun | CallbackManagerForLLMRun | None = None,
) -> Callable[[Any], Any]:
"""Return a tenacity retry decorator, preconfigured to handle exceptions."""
errors = [httpx.RequestError, httpx.StreamError]
return create_base_retry_decorator(
error_types=errors, max_retries=llm.max_retries, run_manager=run_manager
)
Domain
Subdomains
Source
Frequently Asked Questions
What does _create_retry_decorator() do?
_create_retry_decorator() is a function in the langchain codebase, defined in libs/partners/mistralai/langchain_mistralai/chat_models.py.
Where is _create_retry_decorator() defined?
_create_retry_decorator() is defined in libs/partners/mistralai/langchain_mistralai/chat_models.py at line 102.
What calls _create_retry_decorator()?
_create_retry_decorator() is called by 2 function(s): acompletion_with_retry, completion_with_retry.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free