Skip to content

Commit

Permalink
💬 return status on start/end
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Aug 8, 2023
1 parent 45bf730 commit 0a41406
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions codeinterpreterapi/schema/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from .file import File
from .input import CodeInput, FileInput
from .response import CodeInterpreterResponse, UserRequest
from .status import SessionStatus

__all__ = [
"CodeInterpreterResponse",
"CodeInput",
"File",
"FileInput",
"UserRequest",
"SessionStatus",
]
10 changes: 10 additions & 0 deletions codeinterpreterapi/schema/status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from codeboxapi.schema import CodeBoxStatus # type: ignore


class SessionStatus(CodeBoxStatus):
@classmethod
def from_codebox_status(cls, cbs: CodeBoxStatus) -> "SessionStatus":
return cls(status=cbs.status)

def __repr__(self):
return f"<SessionStatus status={self.status}>"

0 comments on commit 0a41406

Please sign in to comment.