MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / getTextPart

Function getTextPart

packages/core/src/helpers/stream.ts:34–36  ·  view source on GitHub ↗
(chunk: ChunkStream)

Source from the content-addressed store, hash-verified

32 * @returns The text content of the first choice's delta, or an empty string if it doesn't exist.
33 */
34export const getTextPart = (chunk: ChunkStream) => {
35 return chunk.choices[0]?.delta?.content || '';
36};
37
38/**
39 * Handles the response stream from a given `Response` object.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected