MCPcopy Create free account
hub / github.com/github/copilot-sdk / HttpResponseChunk

Method HttpResponseChunk

go/rpc/zrpc.go:12211–12221  ·  view source on GitHub ↗

HttpResponseChunk delivers a body byte range (or a terminal transport error) for an in-flight response, correlated by requestId. Set `end` true on the last chunk. When `error` is set the response terminates with a transport-level failure and the runtime raises an APIConnectionError. RPC method: llm

(ctx context.Context, params *LlmInferenceHTTPResponseChunkRequest)

Source from the content-addressed store, hash-verified

12209//
12210// Returns: Whether the chunk was accepted.
12211func (a *ServerLlmInferenceAPI) HttpResponseChunk(ctx context.Context, params *LlmInferenceHTTPResponseChunkRequest) (*LlmInferenceHTTPResponseChunkResult, error) {
12212 raw, err := a.client.Request(ctx, "llmInference.httpResponseChunk", params)
12213 if err != nil {
12214 return nil, err
12215 }
12216 var result LlmInferenceHTTPResponseChunkResult
12217 if err := json.Unmarshal(raw, &result); err != nil {
12218 return nil, err
12219 }
12220 return &result, nil
12221}
12222
12223// HttpResponseStart delivers the response head (status + headers) for an in-flight request,
12224// correlated by the requestId the runtime supplied in httpRequestStart. Must be called

Callers 3

writeRawMethod · 0.80
endMethod · 0.80
sinkErrorMethod · 0.80

Calls 1

RequestMethod · 0.45

Tested by

no test coverage detected