Skip to content

Commit

Permalink
change to json format
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyiqunLu committed Sep 6, 2024
1 parent 48e4067 commit 25bd7c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vision_agent/utils/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import sys
import traceback
import warnings
import json
from enum import Enum
from pathlib import Path
from time import sleep
Expand Down Expand Up @@ -243,8 +244,8 @@ def __str__(self) -> str:
f"----- stdout -----\n{stdout_str}\n----- stderr -----\n{stderr_str}"
)

def to_json(self) -> str:
return str(self)
def to_json(self) -> bytes:
return {"stdout": self.stdout, "stderr": self.stderr}


class Error(BaseModel):
Expand Down

0 comments on commit 25bd7c8

Please sign in to comment.