mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
Fix lazy loading for get_coroutine_checker in function_setup and check_coroutine
- Add lazy loading for get_coroutine_checker at start of function_setup to ensure all calls use lazy-loaded version - Fix check_coroutine function to use lazy loading pattern via getattr - All direct calls to get_coroutine_checker() now properly use lazy import mechanism
This commit is contained in:
parent
da7af8a152
commit
0d72e03c78
1 changed files with 3 additions and 0 deletions
|
|
@ -764,6 +764,9 @@ def function_setup( # noqa: PLR0915
|
|||
## LOGGING SETUP
|
||||
function_id: Optional[str] = kwargs["id"] if "id" in kwargs else None
|
||||
|
||||
## LAZY LOAD COROUTINE CHECKER ##
|
||||
get_coroutine_checker = getattr(sys.modules[__name__], 'get_coroutine_checker')
|
||||
|
||||
## DYNAMIC CALLBACKS ##
|
||||
dynamic_callbacks: Optional[List[Union[str, Callable, "CustomLogger"]]] = (
|
||||
kwargs.pop("callbacks", None)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue