Skip to content

Commit

Permalink
fix: fixed spammy prints
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Aug 14, 2024
1 parent c0e5c87 commit 855a46b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion gptme/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ def chat(
# continue if we can run tools on the last message
runnable = False
if codeblock := log.get_last_code_block("assistant", history=1):
print("Checking for codeblock")
lang, _ = codeblock
if is_supported_codeblock_tool(lang):
runnable = True
Expand Down
3 changes: 1 addition & 2 deletions gptme/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,12 @@ def print_clear():
# pause inference on finished code-block, letting user run the command before continuing
if codeblocks := extract_codeblocks(output):
lang, _ = codeblocks[0]
print("\nFound codeblock, breaking")
# noreorder
from .tools import is_supported_codeblock_tool # fmt: skip

# if closing a code block supported by tools, abort generation to let them run
if is_supported_codeblock_tool(lang):
print("\n")
print("\nFound codeblock, breaking")
break
else:
logger.warning(
Expand Down

0 comments on commit 855a46b

Please sign in to comment.