Skip to content

Commit

Permalink
register tool returns tool'
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Apr 23, 2024
1 parent 9effc1f commit eb793f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class Tool(ABC):
description: str
usage: Dict

def __call__(self, *args: Any, **kwargs: Any) -> Any:
raise NotImplementedError


class NoOp(Tool):
name = "noop_"
Expand Down Expand Up @@ -765,7 +768,7 @@ def __call__(self, equation: str) -> float:
}


def register_tool(tool: Type[Tool]) -> None:
def register_tool(tool: Type[Tool]) -> Type[Tool]:
r"""Add a tool to the list of available tools.
Parameters:
Expand All @@ -787,6 +790,7 @@ def register_tool(tool: Type[Tool]) -> None:
"usage": tool.usage,
"class": tool,
}
return tool


def _send_inference_request(
Expand Down

0 comments on commit eb793f3

Please sign in to comment.