mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-07 13:15:00 +00:00
refactor: remove debug prints and add lazy litellm loading verbosity flag
This commit is contained in:
parent
d09d281a8d
commit
974e618541
2 changed files with 5 additions and 2 deletions
|
@ -13,6 +13,8 @@ os.environ["LITELLM_MODE"] = "PRODUCTION"
|
|||
|
||||
# `import litellm` takes 1.5 seconds, defer it!
|
||||
|
||||
VERBOSE = False
|
||||
|
||||
|
||||
class LazyLiteLLM:
|
||||
_lazy_module = None
|
||||
|
@ -27,6 +29,9 @@ class LazyLiteLLM:
|
|||
if self._lazy_module is not None:
|
||||
return
|
||||
|
||||
if VERBOSE:
|
||||
print("Loading litellm...")
|
||||
|
||||
self._lazy_module = importlib.import_module("litellm")
|
||||
|
||||
self._lazy_module.suppress_debug_info = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue