This commit is contained in:
@@ -797,6 +797,11 @@ if os.environ.get("DUMPER_SERVER_PORT") == "reuse":
|
||||
async def _dumper_control_handler(method: str, request: Request):
|
||||
body_bytes = await request.body()
|
||||
body = await request.json() if body_bytes else {}
|
||||
if not isinstance(body, dict):
|
||||
return ORJSONResponse(
|
||||
status_code=400,
|
||||
content={"error": "Request body must be a JSON object."},
|
||||
)
|
||||
obj = DumperControlReqInput(method=method, body=body)
|
||||
results = await _global_state.tokenizer_manager.dumper_control(obj)
|
||||
if any(not r.success for r in results):
|
||||
|
||||
Reference in New Issue
Block a user