vision-agent 0.2.149__tar.gz → 0.2.151__tar.gz
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.
- {vision_agent-0.2.149 → vision_agent-0.2.151}/PKG-INFO +1 -1
- {vision_agent-0.2.149 → vision_agent-0.2.151}/pyproject.toml +1 -1
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/agent/vision_agent.py +1 -1
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/tools/meta_tools.py +7 -4
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/utils/execute.py +4 -2
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/utils/sim.py +3 -1
- {vision_agent-0.2.149 → vision_agent-0.2.151}/LICENSE +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/README.md +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/__init__.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/agent/__init__.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/agent/agent.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/agent/agent_utils.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/agent/vision_agent_coder.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/agent/vision_agent_coder_prompts.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/agent/vision_agent_prompts.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/clients/__init__.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/clients/http.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/clients/landing_public_api.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/fonts/__init__.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/fonts/default_font_ch_en.ttf +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/lmm/__init__.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/lmm/lmm.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/lmm/types.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/tools/__init__.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/tools/prompts.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/tools/tool_utils.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/tools/tools.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/tools/tools_types.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/utils/__init__.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/utils/exceptions.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/utils/image_utils.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/utils/type_defs.py +0 -0
- {vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/utils/video.py +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})
|
@@ -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
|
@@ -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:
|
@@ -125,7 +125,9 @@ class AzureSim(Sim):
|
|
125
125
|
raise ValueError("key is required if no column 'embs' is present.")
|
126
126
|
|
127
127
|
if sim_key is not None:
|
128
|
-
self.df["embs"] = self.df[sim_key].apply(
|
128
|
+
self.df["embs"] = self.df[sim_key].apply(
|
129
|
+
lambda x: get_embedding(self.emb_call, x)
|
130
|
+
)
|
129
131
|
|
130
132
|
|
131
133
|
class OllamaSim(Sim):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vision_agent-0.2.149 → vision_agent-0.2.151}/vision_agent/agent/vision_agent_coder_prompts.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|