UNPKG

prompt-compose

Version:

A JS library for building and managing GPT prompts documents.

37 lines (35 loc) 1.63 kB
export type PromptIO = StatementPrompt | string; export type StatementPrompt = (input?: PromptIO) => PromptIO; export type ComposePrompt = (...compFns: PromptIO[]) => StatementPrompt; export const None: () => () => string; export const Statement: (inputStr?: PromptIO) => (nextInputStr?: PromptIO) => string; declare const CONSTANT: { CONFIG: { dividerType: string; dividerRepeat: number; dividerBefore: string; dividerAfter: string; tabType: string; tabRepeat: number; instructionSpacing: string; }; }; type CONFIG_TYPE = typeof CONSTANT.CONFIG; export function getConfig(): { dividerType: string; dividerRepeat: number; dividerBefore: string; dividerAfter: string; tabType: string; tabRepeat: number; instructionSpacing: string; }; export function setConfig(newConfig: Partial<CONFIG_TYPE>): void; export const Divider: () => (nextInputStr?: import("base-components/components.interface").PromptIO) => string; export const Tabs: (prompt: PromptIO) => (input?: PromptIO) => string; export const compose: (...strFns: PromptIO[]) => (input?: PromptIO) => string; export const Instruction: (instructionTitle: PromptIO, instructionText: PromptIO) => (input?: PromptIO) => string; export const Section: (instructionTitle: PromptIO, ...content: PromptIO[]) => (input?: PromptIO) => string; export function Format(dataStructureSample: Array<any> | Object): (input?: import("base-components/components.interface").PromptIO) => string; export function System(instruction: PromptIO): (input?: PromptIO) => string; //# sourceMappingURL=types.d.ts.map