vision-agent 0.2.150__tar.gz → 0.2.152__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.150 → vision_agent-0.2.152}/PKG-INFO +1 -1
  2. {vision_agent-0.2.150 → vision_agent-0.2.152}/pyproject.toml +1 -1
  3. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/agent/vision_agent.py +1 -1
  4. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/tools/meta_tools.py +7 -4
  5. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/tools/tools.py +2 -2
  6. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/utils/execute.py +4 -2
  7. {vision_agent-0.2.150 → vision_agent-0.2.152}/LICENSE +0 -0
  8. {vision_agent-0.2.150 → vision_agent-0.2.152}/README.md +0 -0
  9. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/__init__.py +0 -0
  10. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/agent/__init__.py +0 -0
  11. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/agent/agent.py +0 -0
  12. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/agent/agent_utils.py +0 -0
  13. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/agent/vision_agent_coder.py +0 -0
  14. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/agent/vision_agent_coder_prompts.py +0 -0
  15. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/agent/vision_agent_prompts.py +0 -0
  16. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/clients/__init__.py +0 -0
  17. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/clients/http.py +0 -0
  18. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/clients/landing_public_api.py +0 -0
  19. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/fonts/__init__.py +0 -0
  20. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/fonts/default_font_ch_en.ttf +0 -0
  21. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/lmm/__init__.py +0 -0
  22. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/lmm/lmm.py +0 -0
  23. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/lmm/types.py +0 -0
  24. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/tools/__init__.py +0 -0
  25. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/tools/prompts.py +0 -0
  26. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/tools/tool_utils.py +0 -0
  27. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/tools/tools_types.py +0 -0
  28. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/utils/__init__.py +0 -0
  29. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/utils/exceptions.py +0 -0
  30. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/utils/image_utils.py +0 -0
  31. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/utils/sim.py +0 -0
  32. {vision_agent-0.2.150 → vision_agent-0.2.152}/vision_agent/utils/type_defs.py +0 -0
  33. {vision_agent-0.2.150 → vision_agent-0.2.152}/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.150
3
+ Version: 0.2.152
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.150"
7
+ version = "0.2.152"
8
8
  description = "Toolset for Vision Agent"
9
9
  authors = ["Landing AI <dev@landing.ai>"]
10
10
  readme = "README.md"
@@ -307,7 +307,7 @@ class VisionAgent(Agent):
307
307
  remote_artifacts_path = code_interpreter.upload_file(
308
308
  self.local_artifacts_path
309
309
  )
310
- artifacts_loaded = artifacts.show()
310
+ artifacts_loaded = artifacts.show(code_interpreter.remote_path)
311
311
  int_chat.append({"role": "observation", "content": artifacts_loaded})
312
312
  orig_chat.append({"role": "observation", "content": artifacts_loaded})
313
313
  self.streaming_message({"role": "observation", "content": artifacts_loaded})
@@ -107,13 +107,16 @@ class Artifacts:
107
107
  with open(self.remote_save_path.parent / k, mode) as f:
108
108
  f.write(v)
109
109
 
110
- def show(self) -> str:
110
+ def show(self, uploaded_file_path: Optional[Union[str, Path]] = None) -> str:
111
111
  """Shows the artifacts that have been loaded and their remote save paths."""
112
+ loaded_path = (
113
+ Path(uploaded_file_path)
114
+ if uploaded_file_path is not None
115
+ else self.remote_save_path
116
+ )
112
117
  output_str = "[Artifacts loaded]\n"
113
118
  for k in self.artifacts.keys():
114
- output_str += (
115
- f"Artifact {k} loaded to {str(self.remote_save_path.parent / k)}\n"
116
- )
119
+ output_str += f"Artifact {k} loaded to {str(loaded_path / k)}\n"
117
120
  output_str += "[End of artifacts]\n"
118
121
  print(output_str)
119
122
  return output_str
@@ -1603,7 +1603,7 @@ def extract_frames_and_timestamps(
1603
1603
  """
1604
1604
 
1605
1605
  def reformat(
1606
- frames_and_timestamps: List[Tuple[np.ndarray, float]]
1606
+ frames_and_timestamps: List[Tuple[np.ndarray, float]],
1607
1607
  ) -> List[Dict[str, Union[np.ndarray, float]]]:
1608
1608
  return [
1609
1609
  {"frame": frame, "timestamp": timestamp}
@@ -2017,7 +2017,7 @@ def overlay_counting_results(
2017
2017
  fontsize,
2018
2018
  )
2019
2019
 
2020
- for i, elt in enumerate(instances):
2020
+ for i, elt in enumerate(instances, 1):
2021
2021
  label = f"{i}"
2022
2022
  box = elt["bbox"]
2023
2023
 
@@ -464,7 +464,9 @@ print(f"Vision Agent version: {va_version}")"""
464
464
  _LOGGER.info(
465
465
  f"E2BCodeInterpreter (sandbox id: {self.interpreter.sandbox_id}) initialized:\n{sys_versions}"
466
466
  )
467
- self.remote_path = Path(remote_path if remote_path is not None else WORKSPACE)
467
+ self.remote_path = Path(
468
+ remote_path if remote_path is not None else "/home/user"
469
+ )
468
470
 
469
471
  def close(self, *args: Any, **kwargs: Any) -> None:
470
472
  try:
@@ -713,7 +715,7 @@ def _get_e2b_env() -> Union[Dict[str, str], None]:
713
715
  openai_api_key = os.getenv("OPENAI_API_KEY", "")
714
716
  anthropic_api_key = os.getenv("ANTHROPIC_API_KEY", "")
715
717
  if openai_api_key or anthropic_api_key:
716
- envs = {}
718
+ envs = {"WORKSPACE": os.getenv("WORKSPACE", "/home/user")}
717
719
  if openai_api_key:
718
720
  envs["OPENAI_API_KEY"] = openai_api_key
719
721
  if anthropic_api_key:
File without changes
File without changes