💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Add debug logging for LLM calls
davidmezzetticec5d4f75346
diff --git a/src/python/txtai/pipeline/llm/llm.py b/src/python/txtai/pipeline/llm/llm.pyindex ba894d45..460c7d49 100644--- a/src/python/txtai/pipeline/llm/llm.py+++ b/src/python/txtai/pipeline/llm/llm.py@@ -2,10 +2,15 @@LLM module"""+import logging+from .factory import GenerationFactoryfrom ..base import Pipeline+# Logging configuration+logger = logging.getLogger(__name__)+class LLM(Pipeline):"""@@ -50,5 +55,8 @@ class LLM(Pipeline):generated text"""+ # Debug logging+ logger.debug(text)+# Run LLM generationreturn self.generator(text, maxlength, stream, **kwargs)