mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 04:35:00 +00:00
ensure litellm respects --no-verify-ssl
This commit is contained in:
parent
15faf69173
commit
9a2b8bb706
2 changed files with 14 additions and 10 deletions
21
aider/llm.py
21
aider/llm.py
|
@ -11,19 +11,22 @@ os.environ["OR_APP_NAME"] = "Aider"
|
|||
|
||||
|
||||
class LazyLiteLLM:
|
||||
def __init__(self):
|
||||
self._lazy_module = None
|
||||
_lazy_module = None
|
||||
|
||||
def __getattr__(self, name):
|
||||
if self._lazy_module is None:
|
||||
self._lazy_module = importlib.import_module("litellm")
|
||||
|
||||
self._lazy_module.suppress_debug_info = True
|
||||
self._lazy_module.set_verbose = False
|
||||
self._lazy_module.drop_params = True
|
||||
|
||||
self._load_litellm()
|
||||
return getattr(self._lazy_module, name)
|
||||
|
||||
def _load_litellm(self):
|
||||
if self._lazy_module is not None:
|
||||
return
|
||||
|
||||
self._lazy_module = importlib.import_module("litellm")
|
||||
|
||||
self._lazy_module.suppress_debug_info = True
|
||||
self._lazy_module.set_verbose = False
|
||||
self._lazy_module.drop_params = True
|
||||
|
||||
|
||||
litellm = LazyLiteLLM()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue