community[patch]: docstrings (#16810)

- added missed docstrings
- formated docstrings to the consistent form
This commit is contained in:
Leonid Ganeline
2024-02-09 12:48:57 -08:00
committed by GitHub
parent ae66bcbc10
commit 932c52c333
25 changed files with 66 additions and 18 deletions

View File

@@ -58,6 +58,8 @@ logger = logging.getLogger(__name__)
class ChatDeepInfraException(Exception):
"""Exception raised when the DeepInfra API returns an error."""
pass
@@ -67,7 +69,7 @@ def _create_retry_decorator(
Union[AsyncCallbackManagerForLLMRun, CallbackManagerForLLMRun]
] = None,
) -> Callable[[Any], Any]:
"""Returns a tenacity retry decorator, preconfigured to handle PaLM exceptions"""
"""Returns a tenacity retry decorator, preconfigured to handle PaLM exceptions."""
return create_base_retry_decorator(
error_types=[requests.exceptions.ConnectTimeout, ChatDeepInfraException],
max_retries=llm.max_retries,