Skip to content

Commit

Permalink
fixed usage for image caption
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Apr 22, 2024
1 parent d6ab39d commit b373a74
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ def __call__(self, prompt: str, image: Union[str, ImageType]) -> Dict:


class ImageCaption(Tool):
r"""ImageCaption is a tool that can caption an image based on its contents
or tags.
r"""ImageCaption is a tool that can caption an image based on its contents or tags.
Example
-------
Expand All @@ -143,26 +142,20 @@ class ImageCaption(Tool):
"""

name = "image_caption_"
description = "'image_caption_' is a tool that can caption an image based on its contents or tags. It returns a text describing the image"
description = "'image_caption_' is a tool that can caption an image based on its contents or tags. It returns a text describing the image."
usage = {
"required_parameters": [
{"name": "image", "type": "str"},
],
"examples": [
{
"scenario": "Can you describe this image ? Image name: cat.jpg",
"scenario": "Can you describe this image? Image name: cat.jpg",
"parameters": {"image": "cat.jpg"},
},
{
"scenario": "Can you caption this image with their main contents ? Image name: cat_dog.jpg",
"scenario": "Can you caption this image with their main contents? Image name: cat_dog.jpg",
"parameters": {"image": "cat_dog.jpg"},
},
{
"scenario": "Can you build me a image captioning tool ? Image name: shirts.jpg",
"parameters": {
"image": "shirts.jpg",
},
},
],
}

Expand Down

0 comments on commit b373a74

Please sign in to comment.