MCPcopy Create free account
hub / github.com/Writesonic/GPTRouter / streamCompletion

Function streamCompletion

src/utils/streamCompletion.ts:44–46  ·  view source on GitHub ↗
(data: any)

Source from the content-addressed store, hash-verified

42 * @returns {AsyncIterable<any>} - An asynchronous iterable that yields parsed messages from the input data stream.
43 */
44export default async function* streamCompletion(data: any) {
45 yield* linesToMessages(chunksToLines(data));
46}

Callers

nothing calls this directly

Calls 2

linesToMessagesFunction · 0.85
chunksToLinesFunction · 0.85

Tested by

no test coverage detected