UNPKG

@promptbook/google

Version:

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

57 lines (56 loc) 1.92 kB
import type { string_prompt } from '../types/typeAliases'; import type { really_unknown } from '../utils/organization/really_unknown'; /** * Prompt string wrapper to retain prompt context across interpolations. * * @public exported from `@promptbook/utils` */ export declare class PromptString extends String { /** * @param value Prompt content. */ constructor(value: string_prompt); /** * Returns the prompt as a primitive string. */ toString(): string_prompt; /** * Returns the prompt as a primitive string for implicit coercion. */ valueOf(): string_prompt; /** * Ensures template literal coercion returns the raw string. */ [Symbol.toPrimitive](): string_prompt; } /** * Tag function for notating a prompt as template literal * * Note: There are 3 similar functions: * 1) `prompt` for notating single prompt exported from `@promptbook/utils` * 2) `promptTemplate` alias for `prompt` * 3) `book` for notating and validating entire books exported from `@promptbook/utils` * * @param strings * @param values * @returns prompt content wrapped as a PromptString * @public exported from `@promptbook/utils` */ export declare function prompt(strings: TemplateStringsArray, ...values: Array<really_unknown>): PromptString; /** * Tag function for notating a prompt as template literal * * Note: There are 3 similar functions: * 1) `prompt` for notating single prompt exported from `@promptbook/utils` * 2) `promptTemplate` alias for `prompt` * 3) `book` for notating and validating entire books exported from `@promptbook/utils` * * @alias prompt * @public exported from `@promptbook/utils` */ export declare const promptTemplate: typeof prompt; /** * TODO: Maybe split into multiple files * TODO: [🧠][🈴] Where is the best location for this file * Note: [💞] Ignore a discrepancy between file name and entity name */