Skip to content

armgit / txtai

Public Imported from GitHub
0

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

Update error message and change argument parsing

davidmezzettia515d30b4d4f
diff --git a/src/python/txtai/pipeline/llm/litellm.py b/src/python/txtai/pipeline/llm/litellm.py
index 992cf9ee..147ed1dc 100644
--- a/src/python/txtai/pipeline/llm/litellm.py
+++ b/src/python/txtai/pipeline/llm/litellm.py
@@ -46,7 +46,7 @@ class LiteLLM(Generation):
super().__init__(path, template, **kwargs)
if not LITELLM:
- raise ImportError('LiteLLM is not available - install "llm" extra to enable')
+ raise ImportError('LiteLLM is not available - install "pipeline" extra to enable')
# Register prompt template
self.register(path)
diff --git a/src/python/txtai/pipeline/llm/llama.py b/src/python/txtai/pipeline/llm/llama.py
index 0d24b4ee..0509de85 100644
--- a/src/python/txtai/pipeline/llm/llama.py
+++ b/src/python/txtai/pipeline/llm/llama.py
@@ -40,13 +40,13 @@ class LlamaCpp(Generation):
super().__init__(path, template, **kwargs)
if not LLAMA_CPP:
- raise ImportError('llama.cpp is not available - install "llm" extra to enable')
+ raise ImportError('llama.cpp is not available - install "pipeline" extra to enable')
# Check if this is a local path, otherwise download from the HF Hub
path = path if os.path.exists(path) else self.download(path)
# Create llama.cpp instance
- self.llm = Llama(path, verbose=kwargs.get("verbose", False), **kwargs)
+ self.llm = Llama(path, verbose=kwargs.pop("verbose", False), **kwargs)
def execute(self, texts, maxlength, **kwargs):
results = []