Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Fix error with changed LiteLLM exception type, closes #620

davidmezzetti2eca3e896269
diff --git a/src/python/txtai/pipeline/llm/litellm.py b/src/python/txtai/pipeline/llm/litellm.py
index 147ed1dc..e79031a8 100644
--- a/src/python/txtai/pipeline/llm/litellm.py
+++ b/src/python/txtai/pipeline/llm/litellm.py
@@ -33,11 +33,12 @@ class LiteLLM(Generation):
True if this is a LiteLLM model, False otherwise
"""
+ # pylint: disable=W0702
if isinstance(path, str) and LITELLM:
with open(os.devnull, "w", encoding="utf-8") as f, contextlib.redirect_stdout(f):
try:
return api.get_llm_provider(path)
- except ValueError:
+ except:
return False
return False