mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
chore: Improve error handling for LiteLlm import in gemma_llm.py
Co-authored-by: George Weale <gweale@google.com> PiperOrigin-RevId: 865010258
This commit is contained in:
committed by
Copybara-Service
parent
ce07cd8144
commit
574ec43a17
@@ -356,8 +356,8 @@ def _get_last_valid_json_substring(text: str) -> tuple[bool, str | None]:
|
||||
|
||||
try:
|
||||
from google.adk.models.lite_llm import LiteLlm # noqa: F401
|
||||
except Exception:
|
||||
# LiteLLM not available, Gemma3Ollama will not be defined
|
||||
except ImportError as e:
|
||||
logger.debug('LiteLlm not available; Gemma3Ollama will not be defined: %s', e)
|
||||
LiteLlm = None
|
||||
|
||||
if LiteLlm is not None:
|
||||
|
||||
Reference in New Issue
Block a user