Skip to content

Commit

Permalink
added noop
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Apr 5, 2024
1 parent b622d53 commit dc4be7f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit dc4be7f

Please sign in to comment.