@langchain/core
Version:
Core LangChain.js abstractions and schemas
16 lines • 692 B
text/typescript
import { ContentBlock } from "../messages/content/index.cjs";
import { ChatGenerationChunk } from "../outputs.cjs";
import { ChatModelStreamEvent } from "./event.cjs";
/**
* 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.cts.map