vision-agent 0.2.150__py3-none-any.whl → 0.2.152__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vision_agent/agent/vision_agent.py +1 -1
- vision_agent/tools/meta_tools.py +7 -4
- vision_agent/tools/tools.py +2 -2
- vision_agent/utils/execute.py +4 -2
- {vision_agent-0.2.150.dist-info → vision_agent-0.2.152.dist-info}/METADATA +1 -1
- {vision_agent-0.2.150.dist-info → vision_agent-0.2.152.dist-info}/RECORD +8 -8
- {vision_agent-0.2.150.dist-info → vision_agent-0.2.152.dist-info}/LICENSE +0 -0
- {vision_agent-0.2.150.dist-info → vision_agent-0.2.152.dist-info}/WHEEL +0 -0
@@ -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})
|
vision_agent/tools/meta_tools.py
CHANGED
@@ -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
|
vision_agent/tools/tools.py
CHANGED
@@ -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
|
|
vision_agent/utils/execute.py
CHANGED
@@ -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(
|
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:
|
@@ -2,7 +2,7 @@ vision_agent/__init__.py,sha256=EAb4-f9iyuEYkBrX4ag1syM8Syx8118_t0R6_C34M9w,57
|
|
2
2
|
vision_agent/agent/__init__.py,sha256=NF2LABqHixLvbsOIO-fe-VKZ7awvShLtcT0oQT4eWtI,235
|
3
3
|
vision_agent/agent/agent.py,sha256=2cjIOxEuSJrqbfPXYoV0qER5ihXsPFCoEFJa4jpqan0,597
|
4
4
|
vision_agent/agent/agent_utils.py,sha256=PEUHqvnHmFL4np_TeFmKMwr5s_dWfdfJz6TF_ogd1dU,2353
|
5
|
-
vision_agent/agent/vision_agent.py,sha256=
|
5
|
+
vision_agent/agent/vision_agent.py,sha256=m7apb1smJbRyj0VAellrN_mDrSPAee4DVm6FWRa-e78,18459
|
6
6
|
vision_agent/agent/vision_agent_coder.py,sha256=9BT4gaXsqH5pvxo8WGwJN9MTvP1V3TgoJHBpjtlKP9I,38417
|
7
7
|
vision_agent/agent/vision_agent_coder_prompts.py,sha256=BmbTMhth4v1qLexuoSeyo47QQ0kPQvL1pLbCJHMsWDw,18910
|
8
8
|
vision_agent/agent/vision_agent_prompts.py,sha256=3n92aF-jpUyyrAy06izdHIMPEMZPKD1JV0wfQvt-PD8,11251
|
@@ -15,19 +15,19 @@ vision_agent/lmm/__init__.py,sha256=jyY1sJb_tYKg5-Wzs3p1lvwFkc-aUNZfMcLy3TOC4Zg,
|
|
15
15
|
vision_agent/lmm/lmm.py,sha256=B5ClgwvbybVCWkf9opDMLjTtJZemUU4KUkQoRxGh43I,16787
|
16
16
|
vision_agent/lmm/types.py,sha256=ZEXR_ptBL0ZwDMTDYkgxUCmSZFmBYPQd2jreNzr_8UY,221
|
17
17
|
vision_agent/tools/__init__.py,sha256=zUv3aVPN1MXfyQiQi5To4rkQGtG7mxLQ1NjLI3pxM80,2412
|
18
|
-
vision_agent/tools/meta_tools.py,sha256=
|
18
|
+
vision_agent/tools/meta_tools.py,sha256=yBlkRTeEfI3sAMZbz5mvOsHu9e1OrzDw6XLd6t-U0IY,24909
|
19
19
|
vision_agent/tools/prompts.py,sha256=V1z4YJLXZuUl_iZ5rY0M5hHc_2tmMEUKr0WocXKGt4E,1430
|
20
20
|
vision_agent/tools/tool_utils.py,sha256=5ukuDMxbEH4iKetYR9I7twzsA8ECyP4tVwYXQq54mxI,8020
|
21
|
-
vision_agent/tools/tools.py,sha256=
|
21
|
+
vision_agent/tools/tools.py,sha256=CCeXdHDguZh8j7Iibi-BzfPxOakPSGnFAeVUZIHekno,74561
|
22
22
|
vision_agent/tools/tools_types.py,sha256=JUOZWGW2q-dlJ85CHr9gvo9KQk_rXyjJhi-iwPNn4eM,2397
|
23
23
|
vision_agent/utils/__init__.py,sha256=7fMgbZiEwbNS0fBOS_hJI5PuEYBblw36zLi_UjUzvj4,244
|
24
24
|
vision_agent/utils/exceptions.py,sha256=booSPSuoULF7OXRr_YbC4dtKt6gM_HyiFQHBuaW86C4,2052
|
25
|
-
vision_agent/utils/execute.py,sha256=
|
25
|
+
vision_agent/utils/execute.py,sha256=FqSOr5gtBeKB1g2hbV6-bhox6qItDQNn2o9efq1w6f4,28017
|
26
26
|
vision_agent/utils/image_utils.py,sha256=rm9GfXvD4JrjnqKrP_f2gfq4SzmqYC0IdC1kKwdn6sk,11303
|
27
27
|
vision_agent/utils/sim.py,sha256=ZuSS07TUXFGjipmiQoY8TKRmSes7XXCdtU9PI8PC1sw,5609
|
28
28
|
vision_agent/utils/type_defs.py,sha256=BE12s3JNQy36QvauXHjwyeffVh5enfcvd4vTzSwvEZI,1384
|
29
29
|
vision_agent/utils/video.py,sha256=xbMEoRk13l4fHeQlbvMQhLCn8RNndYmsDhUf01TUeR8,4781
|
30
|
-
vision_agent-0.2.
|
31
|
-
vision_agent-0.2.
|
32
|
-
vision_agent-0.2.
|
33
|
-
vision_agent-0.2.
|
30
|
+
vision_agent-0.2.152.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
31
|
+
vision_agent-0.2.152.dist-info/METADATA,sha256=OH7wZSXkviBN5xALMJ7ysqCVUzX1dFG_91CHp8NT8jc,13758
|
32
|
+
vision_agent-0.2.152.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
33
|
+
vision_agent-0.2.152.dist-info/RECORD,,
|
File without changes
|
File without changes
|