UNPKG

@gptp/core

Version:

Library to supercharge your use of large language models

17 lines (16 loc) 577 B
import { string_markdown } from '../.././types/typeAliases'; /** * Extracts exactly ONE code block from markdown. * * Note: This function is similar to extractBlocksFromMarkdown but it validates that there is exactly one code block. * Note: If there are multiple or no code blocks the function throws an error * * @param markdown any valid markdown * @returns code block with language and content * * @private within the library */ export declare function extractOneBlockFromMarkdown(markdown: string_markdown): { language: string | null; content: string; };