From b5faa365a6e2874ac7efc8420bacfa464e1517e2 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Tue, 20 Aug 2024 14:39:39 -0700 Subject: [PATCH] Fix custom tool example (#201) * fixed readme example * added requirements --- examples/custom_tools/README.md | 2 +- examples/custom_tools/requirements.txt | 2 ++ examples/custom_tools/run_custom_tool.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 examples/custom_tools/requirements.txt diff --git a/examples/custom_tools/README.md b/examples/custom_tools/README.md index 73befe54..2796708e 100644 --- a/examples/custom_tools/README.md +++ b/examples/custom_tools/README.md @@ -22,7 +22,7 @@ call out which tool you want to use. For example: ```python import vision_agent as va -agent = va.agent.VisionAgent(verbosity=2) +agent = va.agent.VisionAgentCoder(verbosity=2) agent( "Can you use the 'template_match_' tool to find the location of pid_template.png in pid.png?", media="pid.png", diff --git a/examples/custom_tools/requirements.txt b/examples/custom_tools/requirements.txt new file mode 100644 index 00000000..ac988bdf --- /dev/null +++ b/examples/custom_tools/requirements.txt @@ -0,0 +1,2 @@ +torch +torchvision diff --git a/examples/custom_tools/run_custom_tool.py b/examples/custom_tools/run_custom_tool.py index fb0cc5c0..c973a19a 100644 --- a/examples/custom_tools/run_custom_tool.py +++ b/examples/custom_tools/run_custom_tool.py @@ -38,7 +38,7 @@ def template_match(target_image: np.ndarray, template_image: np.ndarray) -> dict if __name__ == "__main__": - agent = va.agent.VisionAgent(verbosity=2) + agent = va.agent.VisionAgentCoder(verbosity=2) result = agent.chat_with_workflow( [ {