MCPcopy Index your code
hub / github.com/PaddlePaddle/FastDeploy / to_api_json_response

Method to_api_json_response

fastdeploy/engine/request.py:677–686  ·  view source on GitHub ↗

Convert ControlResponse into a JSONResponse.

(self)

Source from the content-addressed store, hash-verified

675 )
676
677 def to_api_json_response(self) -> JSONResponse:
678 """Convert ControlResponse into a JSONResponse."""
679 status = "success" if self.error_code == 200 else "error"
680 content = {
681 "request_id": self.request_id,
682 "status": status,
683 "error_message": self.error_message,
684 "result": self.result,
685 }
686 return JSONResponse(status_code=self.error_code, content=content)
687
688 def __repr__(self) -> str:
689 """Provide a clean representation of the control response."""

Callers 11

pauseFunction · 0.80
resumeFunction · 0.80
is_pausedFunction · 0.80
sleepFunction · 0.80
wakeupFunction · 0.80
update_weightsFunction · 0.80
abort_requestsFunction · 0.80
update_model_weightFunction · 0.80
clear_load_weightFunction · 0.80

Calls

no outgoing calls