UNPKG

@promptbook/remote-server

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

27 lines (26 loc) 1.28 kB
import type { SetOptional } from 'type-fest'; import type { ExecutionTools } from '../../../execution/ExecutionTools'; import type { KnowledgeSourceJson } from '../../../pipeline/PipelineJson/KnowledgeSourceJson'; import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeOptions'; import type { ScraperSourceHandler } from '../Scraper'; /** * Tools needed for knowledge source handler creation. * * @private internal utility of `makeKnowledgeSourceHandler` */ type MakeKnowledgeSourceHandlerTools = Pick<ExecutionTools, 'fs' | 'fetch'>; /** * Options relevant for knowledge source handler creation. * * @private internal utility of `makeKnowledgeSourceHandler` */ type MakeKnowledgeSourceHandlerOptions = Pick<PrepareAndScrapeOptions, 'rootDirname' | 'isVerbose'>; /** * Factory function that creates a handler for processing knowledge sources. * Provides standardized processing of different types of knowledge sources * across various scraper implementations. * * @public exported from `@promptbook/core` */ export declare function makeKnowledgeSourceHandler(knowledgeSource: SetOptional<KnowledgeSourceJson, 'name'>, tools: MakeKnowledgeSourceHandlerTools, options?: MakeKnowledgeSourceHandlerOptions): Promise<ScraperSourceHandler>; export {};