UNPKG

@langchain/core

Version:
16 lines • 688 B
import { ContentBlock } from "../messages/content/index.js"; import { ChatGenerationChunk } from "../outputs.js"; import { ChatModelStreamEvent } from "./event.js"; /** * Convert an async iterable of legacy `ChatGenerationChunk`s into * `ChatModelStreamEvent`s with typed deltas. */ export 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. */ export declare function finalizeContentBlock(block: ContentBlock): ContentBlock; //# sourceMappingURL=compat.d.ts.map