Skip to content

Commit

Permalink
fix: add ignorelist for certain known non-executable codeblock langs
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Sep 16, 2024
1 parent 9a729af commit 7b82b03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gptme/tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def from_codeblock(cls, codeblock: Codeblock) -> "ToolUse | None":
)
return ToolUse(tool.name, args, codeblock.content)
else:
if codeblock.lang:
no_op_langs = ["csv", "json", "html", "xml", "stdout", "stderr", "result"]
if codeblock.lang and codeblock.lang not in no_op_langs:
logger.warning(
f"Unknown codeblock type '{codeblock.lang}', neither supported language or filename."
)
Expand Down

0 comments on commit 7b82b03

Please sign in to comment.