DSPy: The framework for programming—not prompting—language models
Python
Correction for inspect_history
Omar Khattab6b5304b23e78
diff --git a/dsp/modules/lm.py b/dsp/modules/lm.pyindex e2b67b9cf..a454cd5fe 100644--- a/dsp/modules/lm.py+++ b/dsp/modules/lm.py@@ -26,7 +26,12 @@ class LM(ABC):return self.basic_request(prompt, **kwargs)def print_green(self, text: str, end: str = "\n"):- return "\n\n" + "\x1b[32m" + str(text) + "\x1b[0m" + end+ import dspy++ if dspy.settings.experimntal:+ return "\n\n" + "\x1b[32m" + str(text) + "\x1b[0m" + end+ else:+ return "\x1b[32m" + str(text) + "\x1b[0m" + enddef print_red(self, text: str, end: str = "\n"):return "\x1b[31m" + str(text) + "\x1b[0m" + end