Skip to content

Commit 7b82b03

Browse files
committed
fix: add ignorelist for certain known non-executable codeblock langs
1 parent 9a729af commit 7b82b03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gptme/tools/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ def from_codeblock(cls, codeblock: Codeblock) -> "ToolUse | None":
9292
)
9393
return ToolUse(tool.name, args, codeblock.content)
9494
else:
95-
if codeblock.lang:
95+
no_op_langs = ["csv", "json", "html", "xml", "stdout", "stderr", "result"]
96+
if codeblock.lang and codeblock.lang not in no_op_langs:
9697
logger.warning(
9798
f"Unknown codeblock type '{codeblock.lang}', neither supported language or filename."
9899
)

0 commit comments

Comments
 (0)