import { ContentBlock } from "../messages/content/index.js";
import { ChatGenerationChunk } from "../outputs.js";
import { ChatModelStreamEvent } from "./event.js";

//#region src/language_models/compat.d.ts
/**
 * Convert an async iterable of legacy `ChatGenerationChunk`s into
 * `ChatModelStreamEvent`s with typed deltas.
 */
declare function convertChunksToEvents(chunks: AsyncIterable<ChatGenerationChunk>, options?: {
  signal?: AbortSignal;
}): AsyncGenerator<ChatModelStreamEvent>;
/**
 * Finalize a content block for the finish event.
 * For tool calls, parse the accumulated JSON args string.
 */
declare function finalizeContentBlock(block: ContentBlock): ContentBlock;
//#endregion
export { convertChunksToEvents, finalizeContentBlock };
//# sourceMappingURL=compat.d.ts.map