Skip to content

Commit 46f7322

Browse files
committed
Correction for lm.py
1 parent 8d70651 commit 46f7322

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dsp/modules/lm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def print_green(self, text: str, end: str = "\n"):
2929
import dspy
3030

3131
if dspy.settings.experimental:
32-
return "\n\n" + "\x1b[32m" + str(text) + "\x1b[0m" + end
32+
return "\n\n" + "\x1b[32m" + str(text).lstrip() + "\x1b[0m" + end
3333
else:
3434
return "\x1b[32m" + str(text) + "\x1b[0m" + end
3535

@@ -118,7 +118,7 @@ def inspect_history(self, n: int = 1, skip: int = 0):
118118
text = choices[0]
119119
else:
120120
text = choices[0]["text"]
121-
printing_value += self.print_green(text.lstrip(), end="")
121+
printing_value += self.print_green(text, end="")
122122

123123
if len(choices) > 1 and isinstance(choices, list):
124124
printing_value += self.print_red(

0 commit comments

Comments
 (0)