ref #8: [feat] add http endpoint
This commit is contained in:
parent
bae540427a
commit
d2506e0c63
7 changed files with 87 additions and 20 deletions
|
|
@ -1,4 +1,6 @@
|
|||
from pydantic import BaseModel
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class HealthResponse(BaseModel):
|
||||
|
|
@ -7,6 +9,20 @@ class HealthResponse(BaseModel):
|
|||
env: str
|
||||
|
||||
|
||||
class CreateSandboxRequest(BaseModel):
|
||||
model_config = ConfigDict(extra='forbid', str_strip_whitespace=True)
|
||||
|
||||
chat_id: str = Field(min_length=1)
|
||||
|
||||
|
||||
class SandboxSessionResponse(BaseModel):
|
||||
session_id: str
|
||||
chat_id: str
|
||||
container_id: str
|
||||
status: str
|
||||
expires_at: datetime
|
||||
|
||||
|
||||
class UserResponse(BaseModel):
|
||||
id: str
|
||||
email: str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue