From b622d537fc26a11638dc7830207e2160f9338b9a Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Fri, 5 Apr 2024 15:53:08 -0700 Subject: [PATCH 1/4] spelling mistakes --- vision_agent/agent/vision_agent_prompts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vision_agent/agent/vision_agent_prompts.py b/vision_agent/agent/vision_agent_prompts.py index 62579419..d5d2b1ef 100644 --- a/vision_agent/agent/vision_agent_prompts.py +++ b/vision_agent/agent/vision_agent_prompts.py @@ -1,4 +1,4 @@ -VISION_AGENT_REFLECTION = """You are an advanced reasoning agent that can improve based on self refection. You will be given a previous reasoning trial in which you were given the user's question, the available tools that the agent has, the decomposed tasks and tools that the agent used to answer the question and the final answer the agent provided. You must determine if the agent's answer was correct or incorrect. If the agent's answer was correct, respond with Finish. If the agent's answer was incorrect, you must diagnose a possible reason for failure or phrasing discrepancy and devise a new, concise, high level plan that aims to mitigate the same failure with the tools avilable. Use complete sentences. +VISION_AGENT_REFLECTION = """You are an advanced reasoning agent that can improve based on self refection. You will be given a previous reasoning trial in which you were given the user's question, the available tools that the agent has, the decomposed tasks and tools that the agent used to answer the question and the final answer the agent provided. You must determine if the agent's answer was correct or incorrect. If the agent's answer was correct, respond with Finish. If the agent's answer was incorrect, you must diagnose a possible reason for failure or phrasing discrepancy and devise a new, concise, high level plan that aims to mitigate the same failure with the tools available. Use complete sentences. User's question: {question} From dc4be7f98201c0c32c49bb6c54034c48a4808641 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Fri, 5 Apr 2024 16:14:46 -0700 Subject: [PATCH 2/4] 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, From 5c3f6c6d8fc03a75b684cdf2666d90380d986506 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Fri, 5 Apr 2024 16:16:29 -0700 Subject: [PATCH 3/4] added noop --- vision_agent/tools/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vision_agent/tools/tools.py b/vision_agent/tools/tools.py index 0cb91d5a..de0f290e 100644 --- a/vision_agent/tools/tools.py +++ b/vision_agent/tools/tools.py @@ -53,7 +53,7 @@ class Tool(ABC): class NoOp(Tool): name = "noop_" - description = "'noop_' is a no-op tool that does nothing." + description = "'noop_' is a no-op tool that does nothing if you do not need to use a tool." usage = { "required_parameters": [], "examples": [ From a433fd82324112e718e1220e6402140f5501b253 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Fri, 5 Apr 2024 16:19:15 -0700 Subject: [PATCH 4/4] format fix --- vision_agent/tools/tools.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vision_agent/tools/tools.py b/vision_agent/tools/tools.py index de0f290e..151faa36 100644 --- a/vision_agent/tools/tools.py +++ b/vision_agent/tools/tools.py @@ -53,7 +53,9 @@ class Tool(ABC): class NoOp(Tool): name = "noop_" - description = "'noop_' is a no-op tool that does nothing if you do not need to use a tool." + description = ( + "'noop_' is a no-op tool that does nothing if you do not need to use a tool." + ) usage = { "required_parameters": [], "examples": [