vision-agent 0.2.108__tar.gz → 0.2.110__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. {vision_agent-0.2.108 → vision_agent-0.2.110}/PKG-INFO +1 -1
  2. {vision_agent-0.2.108 → vision_agent-0.2.110}/pyproject.toml +1 -1
  3. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/tools/__init__.py +4 -2
  4. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/tools/tool_utils.py +13 -0
  5. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/tools/tools.py +3 -1
  6. {vision_agent-0.2.108 → vision_agent-0.2.110}/LICENSE +0 -0
  7. {vision_agent-0.2.108 → vision_agent-0.2.110}/README.md +0 -0
  8. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/__init__.py +0 -0
  9. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/agent/__init__.py +0 -0
  10. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/agent/agent.py +0 -0
  11. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/agent/agent_utils.py +0 -0
  12. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/agent/vision_agent.py +0 -0
  13. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/agent/vision_agent_coder.py +0 -0
  14. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/agent/vision_agent_coder_prompts.py +0 -0
  15. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/agent/vision_agent_prompts.py +0 -0
  16. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/clients/__init__.py +0 -0
  17. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/clients/http.py +0 -0
  18. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/clients/landing_public_api.py +0 -0
  19. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/fonts/__init__.py +0 -0
  20. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/fonts/default_font_ch_en.ttf +0 -0
  21. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/lmm/__init__.py +0 -0
  22. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/lmm/lmm.py +0 -0
  23. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/lmm/types.py +0 -0
  24. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/tools/meta_tools.py +0 -0
  25. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/tools/meta_tools_types.py +0 -0
  26. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/tools/prompts.py +0 -0
  27. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/utils/__init__.py +0 -0
  28. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/utils/exceptions.py +0 -0
  29. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/utils/execute.py +0 -0
  30. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/utils/image_utils.py +0 -0
  31. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/utils/sim.py +0 -0
  32. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/utils/type_defs.py +0 -0
  33. {vision_agent-0.2.108 → vision_agent-0.2.110}/vision_agent/utils/video.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vision-agent
3
- Version: 0.2.108
3
+ Version: 0.2.110
4
4
  Summary: Toolset for Vision Agent
5
5
  Author: Landing AI
6
6
  Author-email: dev@landing.ai
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "vision-agent"
7
- version = "0.2.108"
7
+ version = "0.2.110"
8
8
  description = "Toolset for Vision Agent"
9
9
  authors = ["Landing AI <dev@landing.ai>"]
10
10
  readme = "README.md"
@@ -7,6 +7,7 @@ from .tools import (
7
7
  TOOL_DOCSTRING,
8
8
  TOOLS,
9
9
  TOOLS_DF,
10
+ TOOLS_INFO,
10
11
  UTILITIES_DOCSTRING,
11
12
  blip_image_caption,
12
13
  clip,
@@ -52,15 +53,16 @@ def register_tool(imports: Optional[List] = None) -> Callable:
52
53
  def decorator(tool: Callable) -> Callable:
53
54
  import inspect
54
55
 
55
- from .tools import get_tool_descriptions, get_tools_df
56
+ from .tools import get_tool_descriptions, get_tools_df, get_tools_info
56
57
 
57
- global TOOLS, TOOLS_DF, TOOL_DESCRIPTIONS, TOOL_DOCSTRING
58
+ global TOOLS, TOOLS_DF, TOOL_DESCRIPTIONS, TOOL_DOCSTRING, TOOLS_INFO
58
59
 
59
60
  if tool not in TOOLS:
60
61
  TOOLS.append(tool)
61
62
  TOOLS_DF = get_tools_df(TOOLS) # type: ignore
62
63
  TOOL_DESCRIPTIONS = get_tool_descriptions(TOOLS) # type: ignore
63
64
  TOOL_DOCSTRING = get_tool_documentation(TOOLS) # type: ignore
65
+ TOOLS_INFO = get_tools_info(TOOLS) # type: ignore
64
66
 
65
67
  globals()[tool.__name__] = tool
66
68
  if imports is not None:
@@ -142,3 +142,16 @@ def get_tools_df(funcs: List[Callable[..., Any]]) -> pd.DataFrame:
142
142
  data["doc"].append(doc)
143
143
 
144
144
  return pd.DataFrame(data) # type: ignore
145
+
146
+
147
+ def get_tools_info(funcs: List[Callable[..., Any]]) -> Dict[str, str]:
148
+ data: Dict[str, str] = {}
149
+
150
+ for func in funcs:
151
+ desc = func.__doc__
152
+ if desc is None:
153
+ desc = ""
154
+
155
+ data[func.__name__] = f"{func.__name__}{inspect.signature(func)}:\n{desc}"
156
+
157
+ return data
@@ -19,6 +19,7 @@ from vision_agent.tools.tool_utils import (
19
19
  get_tool_descriptions,
20
20
  get_tool_documentation,
21
21
  get_tools_df,
22
+ get_tools_info,
22
23
  )
23
24
  from vision_agent.utils import extract_frames_from_video
24
25
  from vision_agent.utils.execute import FileSerializer, MimeType
@@ -157,7 +158,7 @@ def owl_v2(
157
158
  image_size = image.shape[:2]
158
159
  image_b64 = convert_to_b64(image)
159
160
  request_data = {
160
- "prompts": prompt.split(","),
161
+ "prompts": [s.strip() for s in prompt.split(",")],
161
162
  "image": image_b64,
162
163
  "confidence": box_threshold,
163
164
  "function_name": "owl_v2",
@@ -1317,6 +1318,7 @@ TOOLS = [
1317
1318
  TOOLS_DF = get_tools_df(TOOLS) # type: ignore
1318
1319
  TOOL_DESCRIPTIONS = get_tool_descriptions(TOOLS) # type: ignore
1319
1320
  TOOL_DOCSTRING = get_tool_documentation(TOOLS) # type: ignore
1321
+ TOOLS_INFO = get_tools_info(TOOLS) # type: ignore
1320
1322
  UTILITIES_DOCSTRING = get_tool_documentation(
1321
1323
  [
1322
1324
  save_json,
File without changes
File without changes