Skip to content

armgit / txtai

Public Imported from GitHub
0

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

model_id is not properly passed with current version of smolagents, closes #993

davidmezzettidd83a4019749
diff --git a/src/python/txtai/agent/model.py b/src/python/txtai/agent/model.py
index 6aa0d864..623cfaa3 100644
--- a/src/python/txtai/agent/model.py
+++ b/src/python/txtai/agent/model.py
@@ -30,11 +30,8 @@ class PipelineModel(Model):
self.llm = path if isinstance(path, LLM) else LLM(path, method, **kwargs)
self.maxlength = 8192
- # Set base class parameters
- self.model_id = self.llm.generator.path
-
# Call parent constructor
- super().__init__(flatten_messages_as_text=not self.llm.isvision(), **kwargs)
+ super().__init__(flatten_messages_as_text=not self.llm.isvision(), model_id=self.llm.generator.path, **kwargs)
# pylint: disable=W0613
def generate(self, messages, stop_sequences=None, response_format=None, tools_to_call_from=None, **kwargs):