vision-agent 0.2.51__py3-none-any.whl → 0.2.52__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,7 +71,7 @@ This is the documentation for the functions you have access to. You may call any
71
71
  1. **Understand and Clarify**: Make sure you understand the task.
72
72
  2. **Algorithm/Method Selection**: Decide on the most efficient way.
73
73
  3. **Pseudocode Creation**: Write down the steps you will follow in pseudocode.
74
- 4. **Code Generation**: Translate your pseudocode into executable Python code. Ensure you use correct arguments, remember coordinates are always returned normalized from `vision_agent.tools`.
74
+ 4. **Code Generation**: Translate your pseudocode into executable Python code. Ensure you use correct arguments, remember coordinates are always returned normalized from `vision_agent.tools`. All images from `vision_agent.tools` are in RGB format, red is (255, 0, 0) and blue is (0, 0, 255).
75
75
  5. **Logging**: Log the output of the custom functions that were provided to you from `from vision_agent.tools import *`. Use a debug flag in the function parameters to toggle logging on and off.
76
76
  """
77
77
 
@@ -179,7 +179,7 @@ def extract_frames(
179
179
  ) -> List[Tuple[np.ndarray, float]]:
180
180
  """'extract_frames' extracts frames from a video, returns a list of tuples (frame,
181
181
  timestamp), where timestamp is the relative time in seconds where the frame was
182
- captured. The frame is a local image file path.
182
+ captured. The frame is a numpy array.
183
183
 
184
184
  Parameters:
185
185
  video_uri (Union[str, Path]): The path to the video file.
@@ -530,27 +530,22 @@ def load_image(image_path: str) -> np.ndarray:
530
530
  return np.array(image)
531
531
 
532
532
 
533
- def save_image(image: np.ndarray) -> str:
534
- """'save_image' is a utility function that saves an image as a temporary file.
533
+ def save_image(image: np.ndarray, file_path: str) -> None:
534
+ """'save_image' is a utility function that saves an image to a file path.
535
535
 
536
536
  Parameters:
537
537
  image (np.ndarray): The image to save.
538
-
539
- Returns:
540
- str: The path to the saved image.
538
+ file_path (str): The path to save the image file.
541
539
 
542
540
  Example
543
541
  -------
544
542
  >>> save_image(image)
545
- "/tmp/tmpabc123.png"
546
543
  """
547
544
  from IPython.display import display
548
545
 
549
546
  pil_image = Image.fromarray(image.astype(np.uint8))
550
547
  display(pil_image)
551
- with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as f:
552
- pil_image.save(f, "PNG")
553
- return f.name
548
+ pil_image.save(file_path)
554
549
 
555
550
 
556
551
  def save_video(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vision-agent
3
- Version: 0.2.51
3
+ Version: 0.2.52
4
4
  Summary: Toolset for Vision Agent
5
5
  Author: Landing AI
6
6
  Author-email: dev@landing.ai
@@ -12,7 +12,7 @@ vision_agent/agent/easytool_v2_prompts.py,sha256=MZSIwovYgB-f-kdJ6btaNDVXptJn47b
12
12
  vision_agent/agent/reflexion.py,sha256=scck3YcME6DhX5Vs4Wr1rYb8S4wkBUkN9UksyazfrZg,10506
13
13
  vision_agent/agent/reflexion_prompts.py,sha256=G7UAeNz_g2qCb2yN6OaIC7bQVUkda4m3z42EG8wAyfE,9342
14
14
  vision_agent/agent/vision_agent.py,sha256=wGGISg6pDVNseF2fIAN1jH66OX2qZk2nDhuobeSNGHk,20957
15
- vision_agent/agent/vision_agent_prompts.py,sha256=hgnTlaYp2HMBHLi3e4faPb-DI5jQL9jfhKq9jyEUEgY,8370
15
+ vision_agent/agent/vision_agent_prompts.py,sha256=9QVQA-YTSHhYHYbxiqCWFVBHIa6uV4WF0z6599mV_Oc,8470
16
16
  vision_agent/fonts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  vision_agent/fonts/default_font_ch_en.ttf,sha256=1YM0Z3XqLDjSNbF7ihQFSAIUdjF9m1rtHiNC_6QosTE,1594400
18
18
  vision_agent/llm/__init__.py,sha256=BoUm_zSAKnLlE8s-gKTSQugXDqVZKPqYlWwlTLdhcz4,48
@@ -23,14 +23,14 @@ vision_agent/tools/__init__.py,sha256=Sng6dChynJJCYWjraXXM0tep_VPdnYl3L9vb0HMy_P
23
23
  vision_agent/tools/easytool_tools.py,sha256=pZc5dQlYINlV4nYbbzsDi3-wauA-fCeD2iGmJUMoUfE,47373
24
24
  vision_agent/tools/prompts.py,sha256=V1z4YJLXZuUl_iZ5rY0M5hHc_2tmMEUKr0WocXKGt4E,1430
25
25
  vision_agent/tools/tool_utils.py,sha256=wzRacbUpqk9hhfX_Y08rL8qP0XCN2w-8IZoYLi3Upn4,869
26
- vision_agent/tools/tools.py,sha256=L1_umAVxk_BlrDYEmV2eyu2cJnpieTW-Ipb03VwKqWU,27062
26
+ vision_agent/tools/tools.py,sha256=aEph9ikQklqKzz18jgjO7eC77VqmkJCYEZ8DqtpihYg,26944
27
27
  vision_agent/utils/__init__.py,sha256=Ce4yPhoWanRsnTy3X7YzZNBYYRJsrJeT7N59WUf8GZM,209
28
28
  vision_agent/utils/execute.py,sha256=GqoAodxtwTPBr1nujPTsWiZO2rBGvWVXTe8lgxY4d_g,20603
29
29
  vision_agent/utils/image_utils.py,sha256=_cdiS5YrLzqkq_ZgFUO897m5M4_SCIThwUy4lOklfB8,7700
30
30
  vision_agent/utils/sim.py,sha256=oUZ-6eu8Io-UNt9GXJ0XRKtP-Wc0sPWVzYGVpB2yDFk,3001
31
31
  vision_agent/utils/type_defs.py,sha256=BlI8ywWHAplC7kYWLvt4AOdnKpEW3qWEFm-GEOSkrFQ,1792
32
32
  vision_agent/utils/video.py,sha256=rNmU9KEIkZB5-EztZNlUiKYN0mm_55A_2VGUM0QpqLA,8779
33
- vision_agent-0.2.51.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
34
- vision_agent-0.2.51.dist-info/METADATA,sha256=xUYxi6YH3U4QTlYNWZ51YI365ER6NANcYBiVeXN4egQ,6817
35
- vision_agent-0.2.51.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
36
- vision_agent-0.2.51.dist-info/RECORD,,
33
+ vision_agent-0.2.52.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
34
+ vision_agent-0.2.52.dist-info/METADATA,sha256=DsrommMwXdLuHvzMkducIQB8TbYndfwJZH1ZeMope7E,6817
35
+ vision_agent-0.2.52.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
36
+ vision_agent-0.2.52.dist-info/RECORD,,