@promptbook/langtail
Version:
It's time for a paradigm shift. The future of software in plain English, French or Latin
29 lines (28 loc) • 1.75 kB
TypeScript
import type { ExecutionTools } from '../execution/ExecutionTools';
import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';
import type { PipelineString } from '../pipeline/PipelineString';
import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions';
/**
* Compile pipeline from string (markdown) format to JSON format
*
* Note: There are 3 similar functions:
* - `pipelineStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
* - `pipelineStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
* - `preparePipeline` - just one step in the compilation process
*
* Note: This function does not validate logic of the pipeline only the parsing
* Note: This function acts as compilation process
*
* @param pipelineString {Promptbook} in string markdown format (.book.md)
* @param tools - Tools for the preparation and scraping - if not provided together with `llm`, the preparation will be skipped
* @param options - Options and tools for the compilation
* @returns {Promptbook} compiled in JSON format (.book.json)
* @throws {ParseError} if the promptbook string is not valid
* @public exported from `@promptbook/core`
*/
export declare function pipelineStringToJson(pipelineString: PipelineString, tools?: Pick<ExecutionTools, 'llm' | 'fs' | 'scrapers'>, options?: PrepareAndScrapeOptions): Promise<PipelineJson>;
/**
* TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
* TODO: [🧠] Should be in generated JSON file GENERATOR_WARNING
*/