Skip to content

Commit

Permalink
fix: view_media_artifact error (#260)
Browse files Browse the repository at this point in the history
change path and load the artifacts to local
  • Loading branch information
yzld2002 authored Oct 9, 2024
1 parent cd0bf40 commit 82c4d20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vision_agent/agent/vision_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def chat_with_code(
obs_chat_elt: Message = {"role": "observation", "content": obs}
if media_obs and result.success:
obs_chat_elt["media"] = [
Path(code_interpreter.remote_path) / media_ob
Path(self.local_artifacts_path).parent / media_ob
for media_ob in media_obs
]

Expand All @@ -407,6 +407,8 @@ def chat_with_code(
code_interpreter.download_file(
str(remote_artifacts_path.name), str(self.local_artifacts_path)
)
artifacts.load(self.local_artifacts_path)
artifacts.save()
return orig_chat, artifacts

def streaming_message(self, message: Dict[str, Any]) -> None:
Expand Down

0 comments on commit 82c4d20

Please sign in to comment.