nsmcp::ChatCompletionsBackend method streamDrain (public)

 <instance of nsmcp::ChatCompletionsBackend[i]> streamDrain key

Defined in /usr/local/ns/tcl/nsmcp/question-chat-completions.tcl

Drain currently buffered response bytes. Swap out buffered data under the shared mutex while retaining response metadata and total-byte counters.

Parameters:
key (required)
Retained stream or configuration key.
Returns:
The stream-state dictionary containing the drained data.

Testcases:
No testcase defined.
[ show source ]
Show another procedure: