From dc4be7f98201c0c32c49bb6c54034c48a4808641 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Fri, 5 Apr 2024 16:14:46 -0700 Subject: [PATCH] added noop --- vision_agent/tools/tools.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/vision_agent/tools/tools.py b/vision_agent/tools/tools.py index f13c14dd..0cb91d5a 100644 --- a/vision_agent/tools/tools.py +++ b/vision_agent/tools/tools.py @@ -51,6 +51,23 @@ class Tool(ABC): usage: Dict +class NoOp(Tool): + name = "noop_" + description = "'noop_' is a no-op tool that does nothing." + usage = { + "required_parameters": [], + "examples": [ + { + "scenario": "If you do not want to use a tool.", + "parameters": {}, + } + ], + } + + def __call__(self) -> None: + return None + + class CLIP(Tool): r"""CLIP is a tool that can classify or tag any image given a set if input classes or tags. @@ -612,6 +629,7 @@ def __call__(self, input: List[int]) -> float: i: {"name": c.name, "description": c.description, "usage": c.usage, "class": c} for i, c in enumerate( [ + NoOp, CLIP, GroundingDINO, AgentGroundingSAM,