MCPcopy
hub / github.com/Lightning-AI/LitServe / put_response

Method put_response

src/litserve/loops/base.py:351–364  ·  view source on GitHub ↗
(
        self,
        transport: MessageTransport,
        response_queue_id: int,
        uid: str,
        response_data: Any,
        status: LitAPIStatus,
        response_type: LoopResponseType,
    )

Source from the content-addressed store, hash-verified

349 return self._worker_id
350
351 def put_response(
352 self,
353 transport: MessageTransport,
354 response_queue_id: int,
355 uid: str,
356 response_data: Any,
357 status: LitAPIStatus,
358 response_type: LoopResponseType,
359 ) -> None:
360 # Skip sending the start status if we dont plan to restart the workers
361 if status == LitAPIStatus.START and not self._restart_workers:
362 return
363
364 transport.send((uid, (response_data, status, response_type, self.worker_id)), consumer_id=response_queue_id)
365
366 def put_error_response(
367 self,

Callers 13

put_error_responseMethod · 0.95
collate_requestsFunction · 0.80
run_streaming_loopMethod · 0.80
process_requestsMethod · 0.80
prefillMethod · 0.80
runMethod · 0.80
run_single_loopMethod · 0.80
process_requestsMethod · 0.80
run_batched_loopMethod · 0.80

Calls 1

sendMethod · 0.45

Tested by 1