Skip to content

armgit / txtai

Public Imported from GitHub
0

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

Add debug logging for LLM calls

davidmezzetticec5d4f75346
diff --git a/src/python/txtai/pipeline/llm/llm.py b/src/python/txtai/pipeline/llm/llm.py
index 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 GenerationFactory
from ..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 generation
return self.generator(text, maxlength, stream, **kwargs)