Skip to content

Commit

Permalink
Correction for lm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
okhat committed Jul 6, 2024
1 parent 8d70651 commit 46f7322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dsp/modules/lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def print_green(self, text: str, end: str = "\n"):
import dspy

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

Expand Down Expand Up @@ -118,7 +118,7 @@ def inspect_history(self, n: int = 1, skip: int = 0):
text = choices[0]
else:
text = choices[0]["text"]
printing_value += self.print_green(text.lstrip(), end="")
printing_value += self.print_green(text, end="")

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

0 comments on commit 46f7322

Please sign in to comment.