UNPKG

together-ai-sdk

Version:

A typescript SDK for the Together AI API

9 lines (8 loc) 446 B
/** * Streams events from a reader and calls a callback with each event. * The reader can return partial events or multiple events in a single read, * so this function handles those cases * @param reader - the reader to stream from * @param callback - the callback to call with each event */ export declare const streamEvents: (reader: ReadableStreamDefaultReader<Uint8Array>, callback: (v: 'done' | {}) => Promise<void>) => Promise<void>;