@promptbook/remote-server
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
54 lines (53 loc) • 1.75 kB
TypeScript
import type { string_prompt } from '../types/string_prompt';
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;