From f1864c75761a2cff154630cb3087a5c34289f113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Tue, 8 Oct 2024 13:37:54 +0200 Subject: [PATCH] fix: log warning if allowlisted tool could not be found --- gptme/tools/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gptme/tools/__init__.py b/gptme/tools/__init__.py index fd401c78..81063662 100644 --- a/gptme/tools/__init__.py +++ b/gptme/tools/__init__.py @@ -62,6 +62,10 @@ def init_tools(allowlist=None) -> None: continue load_tool(tool) + for tool_name in allowlist or []: + if not has_tool(tool_name): + logger.warning(f"Tool '{tool_name}' not found") + def load_tool(tool: ToolSpec) -> None: """Loads a tool."""