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