@gptp/core
Version:
Library to supercharge your use of large language models
31 lines (30 loc) • 806 B
TypeScript
/**
* Represents all the tools needed to interact with the user.
*
* @see https://github.com/webgptorg/ptp#user-interface-tools
*/
export interface UserInterfaceTools {
/**
* Asks the user to answer a free-text (multiline) question
*
* @param options the question to ask
* @returns the answer from the user
*/
promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
}
export interface UserInterfaceToolsPromptDialogOptions {
/**
* Prompt message
*
* Note: This is not a prompt to language model but a prompt to the user
*/
prompt: string;
/**
* Default value for the input/textarea
*/
defaultValue: string | null;
/**
* Placeholder for the input/textarea
*/
placeholder?: string;
}