Skip to content

Commit

Permalink
feat: make logs json searializable (#227)
Browse files Browse the repository at this point in the history
* feat: make logs json searializable

* change to json format

* remove unused pkg

* fix lint
  • Loading branch information
wuyiqunLu authored Sep 9, 2024
1 parent 96507b6 commit d46ff65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vision_agent/utils/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ def __str__(self) -> str:
f"----- stdout -----\n{stdout_str}\n----- stderr -----\n{stderr_str}"
)

def to_json(self) -> dict[str, list[str]]:
return {"stdout": self.stdout, "stderr": self.stderr}


class Error(BaseModel):
"""Represents an error that occurred during the execution of a cell. The error
Expand Down

0 comments on commit d46ff65

Please sign in to comment.