From 48e40670af0a5822ceb6312c2607f07e9898fe5b Mon Sep 17 00:00:00 2001 From: wuyiqunLu Date: Fri, 6 Sep 2024 13:53:56 +0800 Subject: [PATCH] feat: make logs json searializable --- vision_agent/utils/execute.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vision_agent/utils/execute.py b/vision_agent/utils/execute.py index 0de10335..270cd0bb 100644 --- a/vision_agent/utils/execute.py +++ b/vision_agent/utils/execute.py @@ -243,6 +243,9 @@ def __str__(self) -> str: f"----- stdout -----\n{stdout_str}\n----- stderr -----\n{stderr_str}" ) + def to_json(self) -> str: + return str(self) + class Error(BaseModel): """Represents an error that occurred during the execution of a cell. The error