UNPKG

@promptbook/vercel

Version:

Promptbook: Turn your company's scattered knowledge into AI ready books

20 lines (19 loc) 1.18 kB
import type { KnowledgePiecePreparedJson } from '../../pipeline/PipelineJson/KnowledgePieceJson'; import type { KnowledgeSourceJson } from '../../pipeline/PipelineJson/KnowledgeSourceJson'; import type { PrepareAndScrapeOptions } from '../../prepare/PrepareAndScrapeOptions'; import type { ExecutionTools } from '../../execution/ExecutionTools'; /** * Prepares the knowledge pieces * * @see https://github.com/webgptorg/promptbook/discussions/41 * @public exported from `@promptbook/core` */ export declare function prepareKnowledgePieces(knowledgeSources: ReadonlyArray<KnowledgeSourceJson>, tools: Pick<ExecutionTools, 'llm' | 'fs' | 'scrapers'>, options: PrepareAndScrapeOptions): Promise<ReadonlyArray<Omit<KnowledgePiecePreparedJson, 'preparationIds'>>>; /** * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time * Put `knowledgePieces` into `PrepareKnowledgeOptions` * TODO: [🪂] More than max things can run in parallel by accident [1,[2a,2b,_],[3a,3b,_]] * TODO: [🧠][❎] Do here proper M:N mapping * [x] One source can make multiple pieces * [ ] One piece can have multiple sources */