@promptbook/utils
Version:
Promptbook: Run AI apps in plain human language across multiple models and platforms
31 lines (30 loc) • 1.22 kB
TypeScript
import type { string_agent_name } from '../../types/typeAliases';
import type { string_url_image } from '../../types/typeAliases';
import type { string_book } from './string_book';
export interface AgentBasicInformation {
/**
* Name of the agent
* This is the first line of the agent source
*/
agentName: string_agent_name | null;
/**
* Optional description of the agent
* This is the line starting with "PERSONA"
*/
personaDescription: string | null;
/**
* Optional profile image URL
* This is the line starting with "META IMAGE"
*/
profileImageUrl: string_url_image;
}
/**
* Parses basic information from agent source
*
* There are 2 similar functions:
* - `parseAgentSource` which is a lightweight parser for agent source, it parses basic information and its purpose is to be quick and synchronous. The commitments there are hardcoded.
* - `createAgentModelRequirements` which is an asynchronous function that creates model requirements it applies each commitment one by one and works asynchronously.
*
* @public exported from `@promptbook/core`
*/
export declare function parseAgentSource(agentSource: string_book): AgentBasicInformation;