MCPcopy Index your code
hub / github.com/AI45Lab/Code / collectStreamText

Function collectStreamText

scripts/docs_api_contract_smoke.mjs:202–210  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

200}
201
202async function collectStreamText(stream) {
203 let text = '';
204 while (true) {
205 const { value, done } = await stream.next();
206 if (done) break;
207 if (value?.text) text += value.text;
208 }
209 return text;
210}
211
212const fake = await startFakeOpenAiServer();
213const workspace = makeWorkspace();

Callers 1

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected