From 249a83d1ae9dd7023ade13dcd249c101c2b24c98 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Sat, 15 Jun 2024 16:43:57 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fixfixfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/funcchain/model/abilities.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/funcchain/model/abilities.py b/src/funcchain/model/abilities.py index 99407b8..bd691a0 100644 --- a/src/funcchain/model/abilities.py +++ b/src/funcchain/model/abilities.py @@ -78,10 +78,13 @@ def gather_llm_type(llm: BaseChatModel, func_check: bool = True) -> str: if llm.model in model: return "vision_model" - from langchain_groq import ChatGroq + try: + from langchain_groq import ChatGroq - if isinstance(llm, ChatGroq): - return "json_model" + if isinstance(llm, ChatGroq): + return "json_model" + except ImportError: + pass return "chat_model"