UNPKG

@gptp/core

Version:

Library to supercharge your use of large language models

20 lines (19 loc) 886 B
import { Promisable } from 'type-fest'; import { string_name } from '.././types/typeAliases'; import { TaskProgress } from '../types/TaskProgress'; /** * Executor is a simple async function that takes input parameters and returns result parameters _(along with all intermediate parameters and input parameters = it extends input object)_. * Executor is made by combining execution tools and prompt template pipeline library. * * It can be done in two ways: * - From `PromptTemplatePipelineLibrary.getExecutor` method * - `createPtpExecutor` utility function * * @see https://github.com/webgptorg/ptp#executor */ export interface PtpExecutor { (inputParameters: Record<string_name, string>, onProgress: (taskProgress: TaskProgress) => Promisable<void>): Promise<Record<string_name, string>>; } /** * TODO: [🧠] Should this file be in /execution or /types folder? */