Represents a file stored in the remote CodeBox environment.
RemoteFile(
path: str,
remote: CodeBox,
_size: int | None = None,
_content: bytes | None = None,
)name: str- Returns the filename from the path_size: int | None- Cached file size_content: bytes | None- Cached file content
Note: Async methods are available when appended with a (e.g. aget_content()).
get_size() -> int- Gets file sizeget_content() -> bytes- Retrieves and caches file contentsave(local_path: str) -> None- Saves file to local path
Represents a single chunk of execution output.
ExecChunk(
type: Literal["txt", "img", "err"],
content: str
)The type field can be one of:
txt: Text outputimg: Image output (base64 encoded)err: Error output
Container for execution results composed of multiple chunks.
ExecResult(
chunks: list[ExecChunk]
)text: str- Concatenated text outputimages: list[str]- List of base64 encoded imageserrors: list[str]- List of error messages