MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / start_response_stream

Method start_response_stream

examples/server/server.py:9161–9178  ·  view source on GitHub ↗
(
        self,
        state: "OpenAIFormatter.ResponsesStream",
    )

Source from the content-addressed store, hash-verified

9159 )
9160
9161 def start_response_stream(
9162 self,
9163 state: "OpenAIFormatter.ResponsesStream",
9164 ) -> List[Dict[str, Any]]:
9165 if state.started:
9166 return []
9167 state.started = True
9168 response = self._response_stream_response(
9169 state,
9170 status="in_progress",
9171 usage=None,
9172 incomplete_details=None,
9173 completed_at=None,
9174 )
9175 return [
9176 self._response_event(state, "response.created", response=response),
9177 self._response_event(state, "response.in_progress", response=response),
9178 ]
9179
9180 @staticmethod
9181 def _response_item_status(

Callers 3

create_responseFunction · 0.80
responses_websocketFunction · 0.80

Calls 2

_response_eventMethod · 0.95

Tested by

no test coverage detected