Skip to content

Commit 88ac6a2

Browse files
committed
formatting fix
1 parent a7f4b58 commit 88ac6a2

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

vision_agent/tools/tools.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ class CLIP(Tool):
6666
"Here are some exmaples of how to use the tool, the examples are in the format of User Question: which will have the user's question in quotes followed by the parameters in JSON format, which is the parameters you need to output to call the API to solve the user's question.\n"
6767
)
6868
usage = {
69-
"required_parameters": [{"name": "prompt", "type": "List[str]"}, {"name": "image", "type": "str"}],
69+
"required_parameters": [
70+
{"name": "prompt", "type": "List[str]"},
71+
{"name": "image", "type": "str"},
72+
],
7073
"examples": [
7174
{
7275
"scenario": "Can you classify this image as a cat? Image name: cat.jpg",
@@ -120,7 +123,10 @@ class GroundingDINO(Tool):
120123
'An example output would be: [{"label": ["car"], "score": [0.99], "bbox": [[0.1, 0.2, 0.3, 0.4]]}]\n'
121124
)
122125
usage = {
123-
"required_parameters": [{"name": "prompt", "type": "str"}, {"name": "image", "type": "str"}],
126+
"required_parameters": [
127+
{"name": "prompt", "type": "str"},
128+
{"name": "image", "type": "str"},
129+
],
124130
"examples": [
125131
{
126132
"scenario": "Can you build me a car detector?",
@@ -132,7 +138,10 @@ class GroundingDINO(Tool):
132138
},
133139
{
134140
"scenario": "Detect the red shirts and green shirst. Image name: shirts.jpg",
135-
"parameters": {"prompt": "red shirt. green shirt", "image": "shirts.jpg"},
141+
"parameters": {
142+
"prompt": "red shirt. green shirt",
143+
"image": "shirts.jpg",
144+
},
136145
},
137146
],
138147
}
@@ -193,7 +202,10 @@ class GroundingSAM(Tool):
193202
"Here are some exmaples of how to use the tool, the examples are in the format of User Question: which will have the user's question in quotes followed by the parameters in JSON format, which is the parameters you need to output to call the API to solve the user's question.\n"
194203
)
195204
usage = {
196-
"required_parameters": [{"name": "prompt", "type": "List[str]"}, {"name": "image", "type": "str"}],
205+
"required_parameters": [
206+
{"name": "prompt", "type": "List[str]"},
207+
{"name": "image", "type": "str"},
208+
],
197209
"examples": [
198210
{
199211
"scenario": "Can you build me a car segmentor?",
@@ -205,9 +217,12 @@ class GroundingSAM(Tool):
205217
},
206218
{
207219
"scenario": "Can you build me a tool that segments red shirts and green shirts? Image name: shirts.jpg",
208-
"parameters": {"prompt": ["red shirt", "green shirt"], "image": "shirts.jpg"},
220+
"parameters": {
221+
"prompt": ["red shirt", "green shirt"],
222+
"image": "shirts.jpg",
223+
},
209224
},
210-
]
225+
],
211226
}
212227

213228
def __call__(self, prompt: List[str], image: Union[str, ImageType]) -> List[Dict]:

0 commit comments

Comments
 (0)